-
Notifications
You must be signed in to change notification settings - Fork 1
/
vc.ml
44 lines (35 loc) · 950 Bytes
/
vc.ml
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
open Why3.Term
module Varinfo = struct
type t = Cil.varinfo
let compare v1 v2 = compare v1.Cil.vid v2.Cil.vid
end
module VarinfoMap : (Map.S with type key = Cil.varinfo) =
Map.Make(Varinfo)
module OrderedString = struct
type t = string
let compare : string -> string -> int = compare
end
module StrMap : (Map.S with type key = string) =
Map.Make(OrderedString)
type assignment_info = {
a_newvar : lsymbol;
a_oldvar : lsymbol;
a_mask : term -> term;
a_index : term -> term;
a_rhs : term -> term;
a_mkind : Formula.var_kind;
}
type declaration =
(* automatically generated variable *)
| VarDecl of lsymbol
(* automatically generated assumption *)
| AxiomDecl of term * string option
(* assignment *)
| AsgnDecl of assignment_info
let axiom_decl ?(name) t = AxiomDecl (t, name)
type vc = {
(* vc_asgn : assignment_info list; *)
vc_decls : declaration list;
vc_goal : term;
vc_name : string option;
}