1 (* Why driver for SMT2 syntax *)
3 prelude ";;; this is a prelude for MathSAT5"
4 prelude "(set-logic AUFNIRA)"
7 filename "%f-%t-%g.smt2"
10 unknown "^\\(unknown\\|sat\\|Fail\\)" ""
11 outofmemory "(error \".*out of memory\")\\|Cannot allocate memory"
12 time "why3cpulimit time : %s s"
15 (* Performed introductions depending on whether counterexamples are
16 requested, as said by the meta "get_counterexmp". When this meta
17 set, this transformation introduces the model variables that are
18 still embedded in the goal. When it is not set, it removes all
19 these unused-ce-related variables, even in the context. *)
20 transformation "counterexamples_dependent_intros"
22 transformation "inline_trivial"
23 transformation "eliminate_builtin"
24 transformation "eliminate_definition"
25 transformation "eliminate_inductive"
26 transformation "eliminate_epsilon"
27 transformation "eliminate_algebraic"
28 transformation "eliminate_literal"
30 transformation "simplify_formula"
31 (*transformation "simplify_trivial_quantification"*)
33 transformation "discriminate"
34 transformation "encoding_smt"
38 syntax type real "Real"
39 syntax predicate (=) "(= %1 %2)"
41 meta "encoding:kept" type int
46 prelude ";;; this is a prelude for Z3 integer arithmetic"
48 syntax function zero "0"
49 syntax function one "1"
51 syntax function (+) "(+ %1 %2)"
52 syntax function (-) "(- %1 %2)"
53 syntax function (*) "(* %1 %2)"
54 syntax function (-_) "(- %1)"
56 syntax predicate (<=) "(<= %1 %2)"
57 syntax predicate (<) "(< %1 %2)"
58 syntax predicate (>=) "(>= %1 %2)"
59 syntax predicate (>) "(> %1 %2)"
61 remove prop MulComm.Comm
62 remove prop MulAssoc.Assoc
63 remove prop Unit_def_l
64 remove prop Unit_def_r
68 remove prop Mul_distr_l
69 remove prop Mul_distr_r
76 remove prop NonTrivialRing
77 remove prop CompatOrderAdd
78 remove prop ZeroLessOne
85 prelude ";;; this is a prelude for Z3 real arithmetic"
87 syntax function zero "0.0"
88 syntax function one "1.0"
90 syntax function (+) "(+ %1 %2)"
91 syntax function (-) "(- %1 %2)"
92 syntax function (*) "(* %1 %2)"
93 syntax function (/) "(/ %1 %2)"
94 syntax function (-_) "(- %1)"
95 syntax function inv "(/ 1.0 %1)"
97 syntax predicate (<=) "(<= %1 %2)"
98 syntax predicate (<) "(< %1 %2)"
99 syntax predicate (>=) "(>= %1 %2)"
100 syntax predicate (>) "(> %1 %2)"
102 remove prop MulComm.Comm
103 remove prop MulAssoc.Assoc
104 remove prop Unit_def_l
105 remove prop Unit_def_r
106 remove prop Inv_def_l
107 remove prop Inv_def_r
109 remove prop Mul_distr_l
110 remove prop Mul_distr_r
118 remove prop NonTrivialRing
119 remove prop CompatOrderAdd
120 remove prop ZeroLessOne
122 meta "encoding:kept" type real
127 syntax type bool "Bool"
128 syntax function True "true"
129 syntax function False "false"
130 meta "encoding:kept" type bool
134 syntax function andb "(and %1 %2)"
135 syntax function orb "(or %1 %2)"
136 syntax function xorb "(xor %1 %2)"
137 syntax function notb "(not %1)"
138 syntax function implb "(=> %1 %2)"
142 syntax function ite "(ite %1 %2 %3)"
143 meta "encoding:lskept" function ite
146 (* needs to be checked
147 theory int.EuclideanDivision
148 syntax function div "(div %1 %2)"
149 syntax function mod "(mod %1 %2)"
150 remove prop Mod_bound
158 syntax function from_int "(to_real %1)"
169 syntax function floor "(to_int %1)"
170 remove prop Floor_down
171 remove prop Floor_monotonic
176 syntax type (->) "(Array %1 %2)"
177 syntax function (@) "(select %1 %2)"
179 meta "encoding:lskept" function (@)
183 syntax function get "(select %1 %2)"
184 syntax function set "(store %1 %2 %3)"
186 meta "encoding:lskept" function get
187 meta "encoding:lskept" function set
191 meta "encoding:lskept" function const
192 (* syntax function const "(const[%t0] %1)" *)