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
open Typed
type sat_decl_aux =
| Assume of string * Expr.t * bool
| PredDef of Expr.t * string
| RwtDef of (Expr.t rwt_rule) list
| Query of string * Expr.t * goal_sort
| ThAssume of Expr.th_elt
| Push of int
| Pop of int
type sat_tdecl = {
st_loc : Loc.t;
st_decl : sat_decl_aux
}
let print_aux fmt = function
| Assume (name, e, b) ->
Format.fprintf fmt "assume %s(%b): @[<hov>%a@]" name b Expr.print e
| PredDef (e, name) ->
Format.fprintf fmt "pred-def %s: @[<hov>%a@]" name Expr.print e
| RwtDef l ->
Format.fprintf fmt "rwrts: @[<v>%a@]"
(Util.print_list_pp
~sep:Format.pp_print_space
~pp:(print_rwt Expr.print)
) l
| Query (name, e, sort) ->
Format.fprintf fmt "query %s(%a): @[<hov>%a@]"
name print_goal_sort sort Expr.print e
| ThAssume t ->
Format.fprintf fmt "th assume %a" Expr.print_th_elt t
| Push n -> Format.fprintf fmt "Push %d" n
| Pop n -> Format.fprintf fmt "Pop %d" n
let print fmt decl = print_aux fmt decl.st_decl