Debian Codegraph @

checker/analyze.mli

raw symbols SCIP
1 (** Representation of data allocated on the OCaml heap. *)
2 type data =
3 | Int of int
4 | Ptr of int
5 | Atm of int (* tag *)
6 | Fun of int (* address *)
7
8 type obj =
9 | Struct of int * data array (* tag × data *)
10 | Int64 of Int64.t (* Primitive integer *)
11 | Float64 of float (* Primitive float *)
12 | String of string
13
14 module LargeArray :
15 sig
16 type 'a t
17 val empty : 'a t
18 val length : 'a t -> int
19 val make : int -> 'a -> 'a t
20 val get : 'a t -> int -> 'a
21 val set : 'a t -> int -> 'a -> unit
22 end
23 (** A data structure similar to arrays but allowing to overcome the 2^22 length
24 limitation on 32-bit architecture. *)
25
26 val parse_channel : in_channel -> (data * obj LargeArray.t)
27 val parse_string : string -> (data * obj LargeArray.t)
28
29 (** {6 Functorized version} *)
30
31 module type Input =
32 sig
33 type t
34 val input_byte : t -> int
35 (** Input a single byte *)
36
37 val input_binary_int : t -> int
38 (** Input a big-endian 31-bits signed integer *)
39 end
40 (** Type of inputs *)
41
42 module type S =
43 sig
44 type input
45 val parse : input -> (data * obj LargeArray.t)
46 (** Return the entry point and the reification of the memory out of a
47 marshalled structure. *)
48 end
49
50 module Make (M : Input) : S with type input = M.t
51 (** Functorized version of the previous code. *)
52
53 val instantiate : data * obj LargeArray.t -> Obj.t
54 (** Create the OCaml object out of the reified representation. *)