tptp-tff0.drv 7.65 KB
Newer Older
1
(* Why driver for first-order tptp provers supporting TFF0 *)
Andrei Paskevich's avatar
Andrei Paskevich committed
2

3
printer "tptp-tff0"
Andrei Paskevich's avatar
Andrei Paskevich committed
4 5 6 7
filename "%f-%t-%g.p"

valid   "Proof found"
invalid "Completion found"
MARCHE Claude's avatar
MARCHE Claude committed
8 9 10 11 12 13 14
valid   "^% SZS status Theorem"
valid   "^% SZS status Unsatisfiable"
unknown "^% SZS status CounterSatisfiable" ""
unknown "^% SZS status Satisfiable" ""
timeout "^% SZS status Timeout"
unknown "^% SZS status GaveUp" ""
fail    "^% SZS status Error" ""
Andrei Paskevich's avatar
Andrei Paskevich committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
timeout "Ran out of time"
timeout "CPU time limit exceeded"
outofmemory "Out of Memory"
unknown "No Proof Found"            ""
fail    "Failure.*"                   "\"\\0\""
time "why3cpulimit time : %s s"


(* to be improved *)

transformation "inline_trivial"

transformation "eliminate_builtin"
transformation "eliminate_definition"
transformation "eliminate_inductive"
transformation "eliminate_algebraic"
31
transformation "eliminate_literal"
32
transformation "eliminate_epsilon"
Andrei Paskevich's avatar
Andrei Paskevich committed
33

34
transformation "discriminate"
Andrei Paskevich's avatar
Andrei Paskevich committed
35
transformation "encoding_smt"
36 37

import "discrimination.gen"
Andrei Paskevich's avatar
Andrei Paskevich committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

theory BuiltIn
  syntax predicate (=)  "(%1 = %2)"
  syntax type int  "$int"
  syntax type real "$real"

  meta "encoding : kept" type int
  meta "encoding : kept" type real
  meta "eliminate_algebraic" "no_index"
end

theory int.Int
  syntax function zero "0"
  syntax function one  "1"

  syntax function (+)  "$sum(%1,%2)"
  syntax function (-)  "$difference(%1,%2)"
  syntax function (*)  "$product(%1,%2)"
  syntax function (-_) "$uminus(%1)"

  syntax predicate (<=) "$lesseq(%1,%2)"
  syntax predicate (<)  "$less(%1,%2)"
  syntax predicate (>=) "$greatereq(%1,%2)"
  syntax predicate (>)  "$greater(%1,%2)"

  remove prop CommutativeGroup.Comm.Comm
64 65 66 67 68
  remove prop CommutativeGroup.Assoc
  remove prop CommutativeGroup.Unit_def_l
  remove prop CommutativeGroup.Unit_def_r
  remove prop CommutativeGroup.Inv_def_l
  remove prop CommutativeGroup.Inv_def_r
Andrei Paskevich's avatar
Andrei Paskevich committed
69
  remove prop Assoc.Assoc
70 71
  remove prop Mul_distr_l
  remove prop Mul_distr_r
Andrei Paskevich's avatar
Andrei Paskevich committed
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
  remove prop Comm.Comm
  remove prop Unitary
  remove prop Refl
  remove prop Trans
  remove prop Antisymm
  remove prop Total
  remove prop NonTrivialRing
  remove prop CompatOrderAdd
  remove prop ZeroLessOne
end

theory real.Real
  syntax function zero "0.0"
  syntax function one  "1.0"

  syntax function (+)  "$sum(%1,%2)"
  syntax function (-)  "$difference(%1,%2)"
  syntax function (*)  "$product(%1,%2)"
  syntax function (-_) "$uminus(%1)"

  syntax function (/)  "$quotient(%1,%2)"
  syntax function inv  "$quotient(1.0,%1)"

  syntax predicate (<=) "$lesseq(%1,%2)"
  syntax predicate (<)  "$less(%1,%2)"
  syntax predicate (>=) "$greatereq(%1,%2)"
  syntax predicate (>)  "$greater(%1,%2)"

  remove prop CommutativeGroup.Comm.Comm
101 102 103 104 105
  remove prop CommutativeGroup.Assoc
  remove prop CommutativeGroup.Unit_def_l
  remove prop CommutativeGroup.Unit_def_r
  remove prop CommutativeGroup.Inv_def_l
  remove prop CommutativeGroup.Inv_def_r
Andrei Paskevich's avatar
Andrei Paskevich committed
106
  remove prop Assoc.Assoc
107 108
  remove prop Mul_distr_l
  remove prop Mul_distr_r
Andrei Paskevich's avatar
Andrei Paskevich committed
109 110
  remove prop Comm.Comm
  remove prop Unitary
111
  remove prop Inverse
Andrei Paskevich's avatar
Andrei Paskevich committed
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
  remove prop Refl
  remove prop Trans
  remove prop Antisymm
  remove prop Total
  remove prop NonTrivialRing
  remove prop CompatOrderAdd
  remove prop ZeroLessOne
end

theory int.EuclideanDivision
  syntax function div "$quotient_e(%1,%2)"
  syntax function mod "$remainder_e(%1,%2)"

  remove prop Div_mod
  remove prop Div_bound
  remove prop Mod_bound
  remove prop Mod_1
  remove prop Div_1
  remove prop Div_inf
  remove prop Div_inf_neg
  remove prop Mod_0
  remove prop Div_1_left
  remove prop Div_minus1_left
  remove prop Mod_1_left
  remove prop Mod_minus1_left
end

theory tptp.Univ
  syntax type iType "$i"

  meta "encoding : kept" type iType
end

theory tptp.IntTrunc
  syntax function floor    "$floor(%1)"
Andrei Paskevich's avatar
Andrei Paskevich committed
147
  syntax function ceiling  "$ceiling(%1)"
Andrei Paskevich's avatar
Andrei Paskevich committed
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
  syntax function truncate "$truncate(%1)"
  syntax function round    "$round(%1)"

  syntax function to_int   "$to_int(%1)"

  syntax predicate is_int  "$is_int(%1)"
  syntax predicate is_rat  "$is_rat(%1)"
end

theory tptp.IntDivT
  syntax function div_t "$quotient_t(%1,%2)"
  syntax function mod_t "$remainder_t(%1,%2)"
end

theory tptp.IntDivF
  syntax function div_f "$quotient_f(%1,%2)"
  syntax function mod_f "$remainder_f(%1,%2)"
end

theory tptp.Rat
  syntax type rat "$rat"

  syntax function zero "0/1"
  syntax function one  "1/1"

  syntax function (+)  "$sum(%1,%2)"
  syntax function (-)  "$difference(%1,%2)"
  syntax function (*)  "$product(%1,%2)"
  syntax function (-_) "$uminus(%1)"

  syntax function (/)  "$quotient(%1,%2)"
179
  syntax function inv  "$quotient(1/1,%1)"
Andrei Paskevich's avatar
Andrei Paskevich committed
180 181 182 183 184 185 186 187 188 189 190 191

  syntax predicate (<=) "$lesseq(%1,%2)"
  syntax predicate (<)  "$less(%1,%2)"
  syntax predicate (>=) "$greatereq(%1,%2)"
  syntax predicate (>)  "$greater(%1,%2)"

  syntax function to_rat   "$to_rat(%1)"

  syntax predicate is_int  "$is_int(%1)"
  syntax predicate is_rat  "$is_rat(%1)"

  remove prop CommutativeGroup.Comm.Comm
192 193 194 195 196
  remove prop CommutativeGroup.Assoc
  remove prop CommutativeGroup.Unit_def_l
  remove prop CommutativeGroup.Unit_def_r
  remove prop CommutativeGroup.Inv_def_l
  remove prop CommutativeGroup.Inv_def_r
Andrei Paskevich's avatar
Andrei Paskevich committed
197
  remove prop Assoc.Assoc
198 199
  remove prop Mul_distr_l
  remove prop Mul_distr_r
Andrei Paskevich's avatar
Andrei Paskevich committed
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
  remove prop Comm.Comm
  remove prop Unitary
  remove prop Refl
  remove prop Trans
  remove prop Antisymm
  remove prop Total
  remove prop NonTrivialRing
  remove prop CompatOrderAdd
  remove prop ZeroLessOne

  meta "encoding : kept" type rat
end

theory tptp.RatTrunc
  syntax function floor    "$floor(%1)"
Andrei Paskevich's avatar
Andrei Paskevich committed
215
  syntax function ceiling  "$ceiling(%1)"
Andrei Paskevich's avatar
Andrei Paskevich committed
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
  syntax function truncate "$truncate(%1)"
  syntax function round    "$round(%1)"

  syntax function to_int   "$to_int(%1)"
end

theory tptp.RatDivE
  syntax function div "$quotient_e(%1,%2)"
  syntax function mod "$remainder_e(%1,%2)"
end

theory tptp.RatDivT
  syntax function div_t "$quotient_t(%1,%2)"
  syntax function mod_t "$remainder_t(%1,%2)"
end

theory tptp.RatDivF
  syntax function div_f "$quotient_f(%1,%2)"
  syntax function mod_f "$remainder_f(%1,%2)"
end

theory tptp.Real
  syntax function to_real "$to_real(%1)"
end

Andrei Paskevich's avatar
Andrei Paskevich committed
241 242 243 244 245 246 247 248 249 250 251
theory real.FromInt
  syntax function from_int "$to_real(%1)"

  remove prop Zero
  remove prop One
  remove prop Add
  remove prop Sub
  remove prop Mul
  remove prop Neg
end

Andrei Paskevich's avatar
Andrei Paskevich committed
252
theory real.Truncate
Andrei Paskevich's avatar
Andrei Paskevich committed
253
  syntax function floor    "$to_int(%1)"
Andrei Paskevich's avatar
Andrei Paskevich committed
254
  syntax function ceil     "$to_int($ceiling(%1))"
Andrei Paskevich's avatar
Andrei Paskevich committed
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
  syntax function truncate "$to_int($truncate(%1))"

  remove prop Truncate_int
  remove prop Truncate_down_pos
  remove prop Truncate_up_neg
  remove prop Real_of_truncate
  remove prop Truncate_monotonic
  remove prop Truncate_monotonic_int1
  remove prop Truncate_monotonic_int2
  remove prop Floor_int
  remove prop Ceil_int
  remove prop Floor_down
  remove prop Ceil_up
  remove prop Floor_monotonic
  remove prop Ceil_monotonic
Andrei Paskevich's avatar
Andrei Paskevich committed
270 271 272
end

theory tptp.RealTrunc
Andrei Paskevich's avatar
Andrei Paskevich committed
273 274 275
  syntax function floor    "$floor(%1)"
  syntax function ceiling  "$ceiling(%1)"
  syntax function truncate "$truncate(%1)"
Andrei Paskevich's avatar
Andrei Paskevich committed
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
  syntax function round    "$round(%1)"

  syntax function to_int   "$to_int(%1)"

  syntax predicate is_int  "$is_int(%1)"
  syntax predicate is_rat  "$is_rat(%1)"
end

theory tptp.RealDivE
  syntax function div "$quotient_e(%1,%2)"
  syntax function mod "$remainder_e(%1,%2)"
end

theory tptp.RealDivT
  syntax function div_t "$quotient_t(%1,%2)"
  syntax function mod_t "$remainder_t(%1,%2)"
end

theory tptp.RealDivF
  syntax function div_f "$quotient_f(%1,%2)"
  syntax function mod_f "$remainder_f(%1,%2)"
end

theory tptp.IntToRat
  syntax function to_rat   "$to_rat(%1)"
end

theory tptp.IntToReal
  syntax function to_real "$to_real(%1)"
end

theory tptp.RealToRat
  syntax function to_rat   "$to_rat(%1)"
end

theory tptp.RatToReal
  syntax function to_real "$to_real(%1)"
end

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