equal
deleted
inserted
replaced
16 For each variable of type nat, an assumption is added that it is non-negative. |
16 For each variable of type nat, an assumption is added that it is non-negative. |
17 *) |
17 *) |
18 |
18 |
19 structure Svc = |
19 structure Svc = |
20 struct |
20 struct |
21 val trace = ref false; |
21 val trace = Unsynchronized.ref false; |
22 |
22 |
23 datatype expr = |
23 datatype expr = |
24 Buildin of string * expr list |
24 Buildin of string * expr list |
25 | Interp of string * expr list |
25 | Interp of string * expr list |
26 | UnInterp of string * expr list |
26 | UnInterp of string * expr list |
125 pos ["positive"]: true if an assumption, false if a goal*) |
125 pos ["positive"]: true if an assumption, false if a goal*) |
126 fun expr_of pos t = |
126 fun expr_of pos t = |
127 let |
127 let |
128 val params = rev (Term.rename_wrt_term t (Term.strip_all_vars t)) |
128 val params = rev (Term.rename_wrt_term t (Term.strip_all_vars t)) |
129 and body = Term.strip_all_body t |
129 and body = Term.strip_all_body t |
130 val nat_vars = ref ([] : string list) |
130 val nat_vars = Unsynchronized.ref ([] : string list) |
131 (*translation of a variable: record all natural numbers*) |
131 (*translation of a variable: record all natural numbers*) |
132 fun trans_var (a,T,is) = |
132 fun trans_var (a,T,is) = |
133 (if T = HOLogic.natT then nat_vars := (insert (op =) a (!nat_vars)) |
133 (if T = HOLogic.natT then nat_vars := (insert (op =) a (!nat_vars)) |
134 else (); |
134 else (); |
135 UnInterp (a ^ param_string is, [])) |
135 UnInterp (a ^ param_string is, [])) |