z3.drv 2.82 KB
Newer Older
1 2 3

(* Why driver for SMT syntax *)

4
prelude ";;; this is a prelude for Z3"
5 6

printer "smtv1"
7
filename "%f-%t-%g.smt"
8

9 10
valid "^unsat"
unknown "^\\(unknown\\|sat\\|Fail\\)" "Unknown"
11 12

(* À discuter *)
13
transformation "simplify_recursive_definition"      
Francois Bobot's avatar
sorry  
Francois Bobot committed
14
transformation "inline_trivial"
15

16
transformation "eliminate_builtin"
17 18 19
transformation "eliminate_definition"
transformation "eliminate_inductive"
transformation "eliminate_algebraic"
20
transformation "simplify_formula"
21
transformation "simplify_trivial_quantification"
22

23
transformation "encoding_decorate"
24
(* transformation "encoding_decorate_every_simple" *)
25 26

theory BuiltIn
27 28 29 30
  syntax type int   "Int"
  syntax type real  "Real"
  syntax logic (=)  "(= %1 %2)"
  syntax logic (<>) "(not (= %1 %2))"
31 32 33 34 35
end


theory int.Int

36
  prelude ";;; this is a prelude for Z3, Arithmetic"
37 38 39

  syntax logic zero "0"

40 41 42 43
  syntax logic (+)  "(+ %1 %2)"
  syntax logic (-)  "(- %1 %2)"
  syntax logic (*)  "(* %1 %2)"
  syntax logic (-_) "(- %1)"
44

45 46 47 48
  syntax logic (<=) "(<= %1 %2)"
  syntax logic (<)  "(< %1 %2)"
  syntax logic (>=) "(>= %1 %2)"
  syntax logic (>)  "(> %1 %2)"
49 50 51 52 53 54 55 56 57

  remove prop CommutativeGroup.Comm.Comm
  remove prop CommutativeGroup.Assoc.Assoc
  remove prop CommutativeGroup.Unit_def
  remove prop CommutativeGroup.Inv_def
  remove prop Assoc.Assoc
  remove prop Mul_distr
  remove prop Comm.Comm
  remove prop Unitary
58 59 60 61
  remove prop Refl
  remove prop Trans
  remove prop Antisymm
  remove prop Total
62 63 64

end

65 66 67 68 69 70 71

theory real.Real

  prelude ";;; this is a prelude for Z3, Arithmetic"

  syntax logic zero "0"

72 73 74 75 76
  syntax logic (+)  "(+ %1 %2)"
  syntax logic (-)  "(- %1 %2)"
  syntax logic (*)  "(* %1 %2)"
  syntax logic (/)  "(/ %1 %2)"
  syntax logic (-_) "(- %1)"
77 78
  syntax logic inv  "(/ 1.0 %1)"

79 80 81 82
  syntax logic (<=) "(<= %1 %2)"
  syntax logic (<)  "(< %1 %2)"
  syntax logic (>=) "(>= %1 %2)"
  syntax logic (>)  "(> %1 %2)"
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102

  remove prop CommutativeGroup.Comm.Comm
  remove prop CommutativeGroup.Assoc.Assoc
  remove prop CommutativeGroup.Unit_def
  remove prop CommutativeGroup.Inv_def
  remove prop Inverse
  remove prop Assoc.Assoc
  remove prop Mul_distr
  remove prop Comm.Comm
  remove prop Unitary
  remove prop Refl
  remove prop Trans
  remove prop Antisymm
  remove prop Total

end

(*
(* L'encodage des types sommes bloquent cette théorie builtin *)
theory bool.Bool
103 104
   syntax type bool   "bool"
   syntax logic True  "true"
105
   syntax logic False "false"
106 107 108 109 110
   syntax logic andb  "(and %1 %2)"
   syntax logic orb   "(or %1 %2)"
   syntax logic xorb  "(xor %1 %2)"
   syntax logic notb  "(not %1)" 
   meta cloned "encoding_decorate : kept" type bool
111 112 113 114
end
*)


Francois Bobot's avatar
Francois Bobot committed
115 116 117 118 119 120 121 122
theory int.EuclideanDivision
   syntax logic div "(div %1 %2)"
   syntax logic mod "(mod %1 %2)"
   remove prop Mod_bound
   remove prop Div_mod
   remove prop Mod_1
   remove prop Div_1
end
123 124 125 126

(*
Local Variables: 
mode: why
127
compile-command: "unset LANG; make -C .. bench"
128 129
End: 
*)