Debian Codegraph @

kernel/primred.mli

raw symbols SCIP
1 open Names
2 open Environ
3
4 (** {5 Reduction of primitives} *)
5 type _ action_kind =
6 | IncompatTypes : _ CPrimitives.prim_type -> Constant.t action_kind
7 | IncompatInd : _ CPrimitives.prim_ind -> inductive action_kind
8
9 type exn += IncompatibleDeclarations : 'a action_kind * 'a * 'a -> exn
10
11 (** May raise [IncomtibleDeclarations] *)
12 val add_retroknowledge : env -> Retroknowledge.action -> env
13
14 val get_int_type : env -> Constant.t
15 val get_float_type : env -> Constant.t
16 val get_string_type : env -> Constant.t
17 val get_cmp_type : env -> Constant.t
18 val get_bool_constructors : env -> constructor * constructor
19 val get_carry_constructors : env -> constructor * constructor
20 val get_pair_constructor : env -> constructor
21 val get_cmp_constructors : env -> constructor * constructor * constructor
22 val get_f_cmp_constructors : env -> constructor * constructor * constructor * constructor
23 val get_f_class_constructors :
24 env -> constructor * constructor * constructor * constructor
25 * constructor * constructor * constructor * constructor
26 * constructor
27
28 exception NativeDestKO (* Should be raised by get_* functions on failure *)
29
30 module type RedNativeEntries =
31 sig
32 type elem
33 type args
34 type evd (* will be unit in kernel, evar_map outside *)
35 type uinstance
36
37 val get : args -> int -> elem
38 val get_int : evd -> elem -> Uint63.t
39 val get_float : evd -> elem -> Float64.t
40 val get_string : evd -> elem -> Pstring.t
41 val get_parray : evd -> elem -> elem Parray.t
42 val mkInt : env -> Uint63.t -> elem
43 val mkFloat : env -> Float64.t -> elem
44 val mkString : env -> Pstring.t -> elem
45 val mkBool : env -> bool -> elem
46 val mkCarry : env -> bool -> elem -> elem (* true if carry *)
47 val mkIntPair : env -> elem -> elem -> elem
48 val mkFloatIntPair : env -> elem -> elem -> elem
49 val mkLt : env -> elem
50 val mkEq : env -> elem
51 val mkGt : env -> elem
52 val mkFLt : env -> elem
53 val mkFEq : env -> elem
54 val mkFGt : env -> elem
55 val mkFNotComparable : env -> elem
56 val mkPNormal : env -> elem
57 val mkNNormal : env -> elem
58 val mkPSubn : env -> elem
59 val mkNSubn : env -> elem
60 val mkPZero : env -> elem
61 val mkNZero : env -> elem
62 val mkPInf : env -> elem
63 val mkNInf : env -> elem
64 val mkNaN : env -> elem
65 val mkArray : env -> uinstance -> elem Parray.t -> elem -> elem
66 end
67
68 module type RedNative =
69 sig
70 type elem
71 type args
72 type evd
73 type uinstance
74 val red_prim : env -> evd -> CPrimitives.t -> uinstance -> args -> elem option
75 end
76
77 module RedNative :
78 functor (E:RedNativeEntries) ->
79 RedNative with type elem = E.elem
80 with type args = E.args
81 with type evd = E.evd
82 with type uinstance = E.uinstance