equal
deleted
inserted
replaced
|
1 (* Title: HOL/SMT/Tools/z3_interface.ML |
|
2 Author: Sascha Boehme, TU Muenchen |
|
3 |
|
4 Interface to Z3 based on a relaxed version of SMT-LIB. |
|
5 *) |
|
6 |
|
7 signature Z3_INTERFACE = |
|
8 sig |
|
9 val interface: string list -> SMT_Translate.config |
|
10 end |
|
11 |
|
12 structure Z3_Interface: Z3_INTERFACE = |
|
13 struct |
|
14 |
|
15 fun z3_builtin_fun bf c ts = |
|
16 (case Const c of |
|
17 @{term "op / :: real => _"} => SOME ("/", ts) |
|
18 | _ => bf c ts) |
|
19 |
|
20 fun interface comments = |
|
21 let |
|
22 val {prefixes, strict, builtins, serialize} = |
|
23 SMTLIB_Interface.interface comments |
|
24 val {builtin_typ, builtin_num, builtin_fun} = builtins |
|
25 in |
|
26 {prefixes = prefixes, |
|
27 strict = strict, |
|
28 builtins = { |
|
29 builtin_typ = builtin_typ, |
|
30 builtin_num = builtin_num, |
|
31 builtin_fun = z3_builtin_fun builtin_fun}, |
|
32 serialize = serialize} |
|
33 end |
|
34 |
|
35 end |