gmp_types.mli 2.51 KB
Newer Older
1
2
(**************************************************************************)
(*                                                                        *)
Patrick Baudin's avatar
Patrick Baudin committed
3
(*  This file is part of the Frama-C's E-ACSL plug-in.                    *)
4
(*                                                                        *)
5
(*  Copyright (C) 2012-2019                                               *)
Virgile Prevosto's avatar
Virgile Prevosto committed
6
(*    CEA (Commissariat à l'énergie atomique et aux énergies              *)
Julien Signoles's avatar
Julien Signoles committed
7
(*         alternatives)                                                  *)
8
9
10
11
12
13
14
15
16
17
18
(*                                                                        *)
(*  you can redistribute it and/or modify it under the terms of the GNU   *)
(*  Lesser General Public License as published by the Free Software       *)
(*  Foundation, version 2.1.                                              *)
(*                                                                        *)
(*  It is distributed in the hope that it will be useful,                 *)
(*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *)
(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *)
(*  GNU Lesser General Public License for more details.                   *)
(*                                                                        *)
(*  See the GNU Lesser General Public License version 2.1                 *)
Virgile Prevosto's avatar
Virgile Prevosto committed
19
(*  for more details (enclosed in the file licenses/LGPLv2.1).            *)
20
21
22
23
24
25
26
(*                                                                        *)
(**************************************************************************)

(** GMP Values. *)

open Cil_types

27
val init: unit -> unit
28
29
(** Must be called before any use of GMP *)

30
31
32
(**************************************************************************)
(******************************** Types ***********************************)
(**************************************************************************)
33

34
(** Signature of a GMP type *)
35
module type S = sig
36

37
  val t: unit -> typ
38
39
40
41
42
  (** @return the GMP type *)

  val t_as_ptr: unit -> typ
  (** type equivalent to [t] but seen as a pointer *)

43
  val is_now_referenced: unit -> unit
44
45
  (** Call this function when using this type for the first time. *)

46
  val is_t: typ -> bool
47
48
  (** @return true iff the given type is equivalent to the GMP type. *)

49
50
51
end

(** Representation of the unbounded integer type at runtime *)
52
module Z: S
53

54
55
(** Representation of the rational type at runtime *)
module Q: S
56
57
58
59
60
61

(*
Local Variables:
compile-command: "make -C ../../../../.."
End:
*)