1 (** Why3 driver for Colibri (with floating point support) *)
3 prelude ";; produced by local colibri2.drv ;;"
4 prelude "(set-logic ALL)"
5 prelude "(set-info :smt-lib-version 2.6)"
7 filename "%f-%t-%g.psmt2"
8 unknown "^\\(unknown\\|sat\\|Fail\\)$" "\\1"
9 unknown "^(:reason-unknown \\([^)]*\\))$" "\\1"
10 time "why3cpulimit time : %s s"
12 steplimitexceeded "steplimitreached"
13 steps "^(steps \\([0-9]+.?[0-9]*\\))" 1
18 (* Performed introductions depending on whether counterexamples are
19 requested, as said by the meta "get_counterexmp". When this meta
20 set, this transformation introduces the model variables that are
21 still embedded in the goal. When it is not set, it removes all
22 these unused-ce-related variables, even in the context. *)
23 transformation "counterexamples_dependent_intros"
25 transformation "monomorphise_goal"
26 transformation "eliminate_builtin"
27 transformation "compile_match"
28 (* transformation "inline_trivial" *)
29 transformation "simplify_formula"
30 transformation "eliminate_inductive"
31 transformation "eliminate_literal"
32 transformation "eliminate_epsilon"
37 syntax type real "Real"
38 syntax predicate (=) "(= %1 %2)"
42 syntax predicate ignore'term "true"
47 prelude ";;; SMT-LIB2: integer arithmetic"
49 syntax function zero "0"
50 syntax function one "1"
52 syntax function (+) "(+ %1 %2)"
53 syntax function (-) "(- %1 %2)"
54 syntax function (*) "(* %1 %2)"
55 syntax function (-_) "(- %1)"
57 syntax predicate (<=) "(<= %1 %2)"
58 syntax predicate (<) "(< %1 %2)"
59 syntax predicate (>=) "(>= %1 %2)"
60 syntax predicate (>) "(> %1 %2)"
62 remove prop MulComm.Comm
63 remove prop MulAssoc.Assoc
64 remove prop Unit_def_l
65 remove prop Unit_def_r
69 remove prop Mul_distr_l
70 remove prop Mul_distr_r
77 remove prop NonTrivialRing
78 remove prop CompatOrderAdd
79 remove prop CompatOrderMult
80 remove prop ZeroLessOne
86 prelude ";;; SMT-LIB2: real arithmetic"
88 syntax function zero "0.0"
89 syntax function one "1.0"
91 syntax function (+) "(+ %1 %2)"
92 syntax function (-) "(- %1 %2)"
93 syntax function (*) "(* %1 %2)"
94 syntax function (/) "(/ %1 %2)"
95 syntax function (-_) "(- %1)"
96 syntax function inv "(/ 1.0 %1)"
98 syntax predicate (<=) "(<= %1 %2)"
99 syntax predicate (<) "(< %1 %2)"
100 syntax predicate (>=) "(>= %1 %2)"
101 syntax predicate (>) "(> %1 %2)"
103 remove prop MulComm.Comm
104 remove prop MulAssoc.Assoc
105 remove prop Unit_def_l
106 remove prop Unit_def_r
107 remove prop Inv_def_l
108 remove prop Inv_def_r
110 remove prop Mul_distr_l
111 remove prop Mul_distr_r
119 remove prop NonTrivialRing
120 remove prop CompatOrderAdd
121 remove prop CompatOrderMult
122 remove prop ZeroLessOne
127 syntax function sqrt "(colibri_sqrt %1)"
132 syntax function from_int "(to_real %1)"
134 (* remove allprops *)
138 syntax function abs "(colibri_abs_real %1)"
142 syntax function abs "(colibri_abs_int %1)"
145 theory int.EuclideanDivision
146 syntax function div "(div %1 %2)"
147 syntax function mod "(mod %1 %2)"
150 theory int.ComputerDivision
151 syntax function div "(colibri_cdiv %1 %2)"
152 syntax function mod "(colibri_crem %1 %2)"
164 syntax function floor "(to_int %1)"
165 syntax function ceil "(- (to_int (- %1)))"
167 (* remove allprops *)
172 syntax type bool "Bool"
173 syntax function True "true"
174 syntax function False "false"
178 syntax function andb "(and %1 %2)"
179 syntax function orb "(or %1 %2)"
180 syntax function xorb "(xor %1 %2)"
181 syntax function notb "(not %1)"
182 syntax function implb "(=> %1 %2)"
186 syntax function ite "(ite %1 %2 %3)"