-
Notifications
You must be signed in to change notification settings - Fork 521
Expand file tree
/
Copy pathds.mli
More file actions
101 lines (86 loc) · 2.88 KB
/
ds.mli
File metadata and controls
101 lines (86 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
open Al.Ast
module Env : Map.S with type key = string
val bound_rule : string -> bool
val bound_func : string -> bool
val lookup_algo : string -> algorithm
type env = value Env.t
val lookup_env : string -> env -> value
val lookup_env_opt : string -> env -> value option
module Store : sig
val get : unit -> value
val access : string -> value
end
module Info : sig
type info = { algo_name: string; instr: instr; mutable covered: bool }
val make_info : string -> instr -> info
val print : unit -> unit
val add : int -> info -> unit
val find : int -> info
end
module Register : sig
val add : string -> value -> unit
val add_with_var : Reference_interpreter.Script.var option -> value -> unit
exception ModuleNotFound of string
val find : string -> value
val get_module_name : Reference_interpreter.Script.var option -> string
end
module Modules : sig
val add : string -> Reference_interpreter.Ast.module_ -> unit
val add_with_var : Reference_interpreter.Script.var option -> Reference_interpreter.Ast.module_ -> unit
val find : string -> Reference_interpreter.Ast.module_
val get_module_name : Reference_interpreter.Script.var option -> string
end
module AlContext : sig
type mode =
(* Al context *)
| Al of string * arg list * instr list * env * int
(* Wasm context *)
| Wasm of int
(* Special context for enter/execute *)
| Enter of string * instr list * env
| Execute of value
(* Return register *)
| Return of value
val al : string * arg list * instr list * env * int -> mode
val wasm : int -> mode
val enter : string * instr list * env -> mode
val execute : value -> mode
val return : value -> mode
type t = mode list
val string_of_context : mode -> string
val tl : t -> t
val is_reducible : t -> bool
val can_tail_call : instr -> bool
val get_name : t -> string
val add_instrs : instr list -> t -> t
val set_env : env -> t -> t
val get_env : t -> env
val update_env : string -> value -> t -> t
val get_return_value : t -> value option
val increase_depth : t -> t
val decrease_depth : t -> t
end
module WasmContext : sig
type t = value * value list * value list
val get_context : unit -> t
val init_context : unit -> unit
val push_context : t -> unit
val pop_context : unit -> t
val string_of_context : t -> string
val string_of_context_stack : unit -> string
val get_top_context : unit -> value
val get_current_context : id -> value
val get_module_instance : unit -> value
val get_value_stack : unit -> value list
val pop_value_stack : unit -> value list
val push_value : value -> unit
val pop_value : unit -> value
val pop_instr : unit -> value
end
module Access : sig
val access_store : string list -> value
val access_frame : string list -> value
val access_state : string list -> value
val access_env : AlContext.t -> string -> string list -> value
end
val init : algorithm list -> unit