Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
5c322c15
Commit
5c322c15
authored
Feb 17, 2013
by
MARCHE Claude
Browse files
fixed drivers for division
parent
d417b053
Changes
11
Hide whitespace changes
Inline
Side-by-side
drivers/alt_ergo.drv
View file @
5c322c15
...
...
@@ -7,14 +7,36 @@ theory BuiltIn
meta "eliminate_algebraic" "keep_recs"
end
(*
theory int.EuclideanDivision
syntax function div "(%1 / %2)"
syntax function mod "(%1 % %2)"
(* protection against wrongs semantics for negative arguments *)
prelude "logic safe_div: int, int -> int"
prelude "axiom safe_div_def: forall x, y:int. x >= 0 and y > 0 -> safe_div(x,y) = x / y"
prelude "logic safe_mod: int, int -> int"
prelude "axiom safe_mod_def: forall x, y:int. x >= 0 and y > 0 -> safe_mod(x,y) = x % y"
syntax function div "safe_div(%1,%2)"
syntax function mod "safe_mod(%1,%2)"
end
theory int.ComputerDivision
(* protection against wrongs semantics for negative arguments *)
prelude "logic safe_div: int, int -> int"
prelude "axiom safe_div_def: forall x, y:int. x >= 0 and y > 0 -> safe_div(x,y) = x / y"
prelude "logic safe_mod: int, int -> int"
prelude "axiom safe_mod_def: forall x, y:int. x >= 0 and y > 0 -> safe_mod(x,y) = x % y"
syntax function div "safe_div(%1,%2)"
syntax function mod "safe_mod(%1,%2)"
end
*)
theory map.Map
syntax type map "(%1,%2) farray"
...
...
drivers/alt_ergo_0.94.drv
View file @
5c322c15
...
...
@@ -10,18 +10,36 @@ theory BuiltIn
meta "eliminate_algebraic" "keep_recs"
end
(*
theory int.EuclideanDivision
(* workaround for the "-1 % 32 = -1" bug *)
prelude "logic safe_modulo: int, int -> int"
prelude "axiom safe_modulo_def: forall x, y:int. x >= 0 and y > 0 -> safe_modulo(x,y) = x % y"
syntax function div "(%1 / %2)"
syntax function mod "safe_modulo(%1,%2)"
(* protection against wrongs semantics for negative arguments *)
prelude "logic safe_div: int, int -> int"
prelude "axiom safe_div_def: forall x, y:int. x >= 0 and y > 0 -> safe_div(x,y) = x / y"
prelude "logic safe_mod: int, int -> int"
prelude "axiom safe_mod_def: forall x, y:int. x >= 0 and y > 0 -> safe_mod(x,y) = x % y"
syntax function div "safe_div(%1,%2)"
syntax function mod "safe_mod(%1,%2)"
end
*)
theory int.ComputerDivision
(* protection against wrongs semantics for negative arguments *)
prelude "logic safe_div: int, int -> int"
prelude "axiom safe_div_def: forall x, y:int. x >= 0 and y > 0 -> safe_div(x,y) = x / y"
prelude "logic safe_mod: int, int -> int"
prelude "axiom safe_mod_def: forall x, y:int. x >= 0 and y > 0 -> safe_mod(x,y) = x % y"
syntax function div "safe_div(%1,%2)"
syntax function mod "safe_mod(%1,%2)"
end
(*
Local Variables:
...
...
drivers/alt_ergo_smt2.drv
View file @
5c322c15
...
...
@@ -69,13 +69,6 @@ theory int.Int
end
theory int.EuclideanDivision
syntax function div "(div %1 %2)"
syntax function mod "(mod %1 %2)"
end
theory real.Real
prelude ";;; this is a prelude for Alt-Ergo real arithmetic"
...
...
drivers/cvc3_bare.drv
View file @
5c322c15
...
...
@@ -146,17 +146,6 @@ theory bool.Bool
syntax function notb "(~ %1)"
end
(*
theory int.EuclideanDivision
syntax function div "(div %1 %2)"
syntax function mod "(mod %1 %2)"
remove prop Mod_bound
remove prop Div_mod
remove prop Mod_1
remove prop Div_1
end
*)
theory map.Map
syntax type map "(ARRAY %1 OF %2)"
...
...
drivers/cvc4_bare.drv
View file @
5c322c15
...
...
@@ -152,7 +152,9 @@ theory bool.Bool
end
*)
(* CVC4 division does not seem to be the Euclidean one
(* CVC4 division seems to be neither the Euclidean one,
nor the Computer one *)
(*
theory int.EuclideanDivision
syntax function div "(div %1 %2)"
syntax function mod "(mod %1 %2)"
...
...
@@ -161,8 +163,18 @@ theory int.EuclideanDivision
remove prop Mod_1
remove prop Div_1
end
theory int.ComputerDivision
syntax function div "(div %1 %2)"
syntax function mod "(mod %1 %2)"
remove prop Mod_bound
remove prop Div_mod
remove prop Mod_1
remove prop Div_1
end
*)
(*
theory real.Truncate
syntax function floor "(to_int %1)"
...
...
drivers/verit.drv
View file @
5c322c15
...
...
@@ -129,17 +129,6 @@ theory bool.Bool
end
(* needs to checked
theory int.EuclideanDivision
syntax function div "(div %1 %2)"
syntax function mod "(mod %1 %2)"
remove prop Mod_bound
remove prop Div_mod
remove prop Mod_1
remove prop Div_1
end
*)
(*
Local Variables:
mode: why
...
...
drivers/yices_bare.drv
View file @
5c322c15
...
...
@@ -133,18 +133,6 @@ theory bool.Bool
end
(* needs to be checked
theory int.EuclideanDivision
syntax function div "(div %1 %2)"
syntax function mod "(mod %1 %2)"
remove prop Mod_bound
remove prop Div_mod
remove prop Mod_1
remove prop Div_1
end
*)
theory map.Map
syntax type map "(-> %1 %2)"
meta "encoding : lskept" function get
...
...
drivers/z3_bare.drv
View file @
5c322c15
...
...
@@ -132,7 +132,7 @@ theory bool.Bool
syntax function implb "(=> %1 %2)"
end
(*
n
ee
d
s to be
checked
(*
div/mod of Z3 s
ee
m
s to be
Euclidean Division *)
theory int.EuclideanDivision
syntax function div "(div %1 %2)"
syntax function mod "(mod %1 %2)"
...
...
@@ -141,7 +141,6 @@ theory int.EuclideanDivision
remove prop Mod_1
remove prop Div_1
end
*)
theory real.FromInt
syntax function from_int "(to_real %1)"
...
...
drivers/z3_smtv1.drv
View file @
5c322c15
...
...
@@ -132,17 +132,6 @@ end
*)
(* needs to be checked
theory int.EuclideanDivision
syntax function div "(div %1 %2)"
syntax function mod "(mod %1 %2)"
remove prop Mod_bound
remove prop Div_mod
remove prop Mod_1
remove prop Div_1
end
*)
(*
Local Variables:
mode: why
...
...
examples/bitvectors/neg_as_xor/why3session.xml
View file @
5c322c15
...
...
@@ -7,33 +7,37 @@
version=
"0.94"
/>
<prover
id=
"1"
name=
"Alt-Ergo"
version=
"0.95"
/>
<prover
id=
"2"
name=
"Coq"
version=
"8.3pl4"
/>
<prover
id=
"
2
"
id=
"
3
"
name=
"Z3"
version=
"2.19"
/>
<prover
id=
"
3
"
id=
"
4
"
name=
"Z3"
version=
"3.2"
/>
<file
name=
"../neg_as_xor.why"
verified=
"
fals
e"
expanded=
"
fals
e"
>
verified=
"
tru
e"
expanded=
"
tru
e"
>
<theory
name=
"TestNegAsXOR"
locfile=
"../neg_as_xor.why"
loclnum=
"2"
loccnumb=
"7"
loccnume=
"19"
verified=
"
fals
e"
verified=
"
tru
e"
expanded=
"true"
>
<goal
name=
"Nth_j"
locfile=
"../neg_as_xor.why"
loclnum=
"13"
loccnumb=
"8"
loccnume=
"13"
sum=
"ffa7aadc98c7c81aa8afa142b455755d"
proved=
"
fals
e"
expanded=
"
fals
e"
proved=
"
tru
e"
expanded=
"
tru
e"
shape=
"ainfix =anthajV0aFalseIainfix <=V0c62Aainfix <=c0V0F"
>
<proof
prover=
"0"
...
...
@@ -43,6 +47,14 @@
archived=
"false"
>
<result
status=
"timeout"
time=
"5.03"
/>
</proof>
<proof
prover=
"1"
timelimit=
"3"
memlimit=
"1000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"0.83"
/>
</proof>
</goal>
<goal
name=
"sign_of_j"
...
...
@@ -78,7 +90,7 @@
<result
status=
"valid"
time=
"0.06"
/>
</proof>
<proof
prover=
"
2
"
prover=
"
3
"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -86,7 +98,7 @@
<result
status=
"valid"
time=
"0.69"
/>
</proof>
<proof
prover=
"
3
"
prover=
"
4
"
timelimit=
"10"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -111,7 +123,7 @@
<result
status=
"valid"
time=
"0.07"
/>
</proof>
<proof
prover=
"
2
"
prover=
"
3
"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -119,7 +131,7 @@
<result
status=
"valid"
time=
"0.71"
/>
</proof>
<proof
prover=
"
3
"
prover=
"
4
"
timelimit=
"11"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -144,7 +156,7 @@
<result
status=
"valid"
time=
"0.04"
/>
</proof>
<proof
prover=
"
2
"
prover=
"
3
"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -152,7 +164,7 @@
<result
status=
"valid"
time=
"0.11"
/>
</proof>
<proof
prover=
"
3
"
prover=
"
4
"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -211,7 +223,7 @@
<result
status=
"valid"
time=
"0.03"
/>
</proof>
<proof
prover=
"
2
"
prover=
"
3
"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -219,7 +231,7 @@
<result
status=
"valid"
time=
"0.00"
/>
</proof>
<proof
prover=
"
3
"
prover=
"
4
"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -244,7 +256,7 @@
<result
status=
"valid"
time=
"0.92"
/>
</proof>
<proof
prover=
"
2
"
prover=
"
3
"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -252,7 +264,7 @@
<result
status=
"valid"
time=
"0.71"
/>
</proof>
<proof
prover=
"
3
"
prover=
"
4
"
timelimit=
"10"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -277,7 +289,7 @@
<result
status=
"valid"
time=
"0.58"
/>
</proof>
<proof
prover=
"
2
"
prover=
"
3
"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -285,7 +297,7 @@
<result
status=
"valid"
time=
"0.72"
/>
</proof>
<proof
prover=
"
3
"
prover=
"
4
"
timelimit=
"10"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -310,7 +322,7 @@
<result
status=
"valid"
time=
"1.77"
/>
</proof>
<proof
prover=
"
2
"
prover=
"
3
"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -318,7 +330,7 @@
<result
status=
"valid"
time=
"0.97"
/>
</proof>
<proof
prover=
"
3
"
prover=
"
4
"
timelimit=
"10"
memlimit=
"1000"
obsolete=
"false"
...
...
@@ -352,7 +364,7 @@
expanded=
"true"
shape=
"ainfix =adouble_of_bv64abw_xorV0ajaprefix -.adouble_of_bv64V0Iainfix <aexpV0c2047Aainfix <c0aexpV0F"
>
<proof
prover=
"
1
"
prover=
"
2
"
timelimit=
"5"
memlimit=
"1000"
edited=
"neg_as_xor_TestNegAsXOR_MainResult_1.v"
...
...
examples/tests-provers/div/why3session.xml
View file @
5c322c15
...
...
@@ -73,8 +73,8 @@
</proof>
<proof
prover=
"1"
timelimit=
"
5
"
memlimit=
"
4
000"
timelimit=
"
3
"
memlimit=
"
1
000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"0.00"
/>
...
...
@@ -115,7 +115,7 @@
prover=
"6"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
fals
e"
obsolete=
"
tru
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.97"
/>
</proof>
...
...
@@ -125,7 +125,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"
4.9
8"
/>
<result
status=
"unknown"
time=
"
10.0
8"
/>
</proof>
<proof
prover=
"8"
...
...
@@ -170,8 +170,8 @@
</proof>
<proof
prover=
"1"
timelimit=
"
5
"
memlimit=
"
4
000"
timelimit=
"
3
"
memlimit=
"
1
000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"0.01"
/>
...
...
@@ -212,7 +212,7 @@
prover=
"6"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
fals
e"
obsolete=
"
tru
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.97"
/>
</proof>
...
...
@@ -222,7 +222,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"
4.96
"
/>
<result
status=
"unknown"
time=
"
10.07
"
/>
</proof>
<proof
prover=
"8"
...
...
@@ -267,8 +267,8 @@
</proof>
<proof
prover=
"1"
timelimit=
"
5
"
memlimit=
"
4
000"
timelimit=
"
3
"
memlimit=
"
1
000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"0.01"
/>
...
...
@@ -309,7 +309,7 @@
prover=
"6"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
fals
e"
obsolete=
"
tru
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.96"
/>
</proof>
...
...
@@ -319,7 +319,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"
4.98
"
/>
<result
status=
"unknown"
time=
"
10.07
"
/>
</proof>
<proof
prover=
"8"
...
...
@@ -364,8 +364,8 @@
</proof>
<proof
prover=
"1"
timelimit=
"
5
"
memlimit=
"
4
000"
timelimit=
"
3
"
memlimit=
"
1
000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"0.00"
/>
...
...
@@ -406,7 +406,7 @@
prover=
"6"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
fals
e"
obsolete=
"
tru
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.98"
/>
</proof>
...
...
@@ -416,7 +416,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"
4.9
8"
/>
<result
status=
"unknown"
time=
"
10.0
8"
/>
</proof>
<proof
prover=
"8"
...
...
@@ -461,8 +461,8 @@
</proof>
<proof
prover=
"1"
timelimit=
"
5
"
memlimit=
"
4
000"
timelimit=
"
3
"
memlimit=
"
1
000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"0.04"
/>
...
...
@@ -503,7 +503,7 @@
prover=
"6"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
fals
e"
obsolete=
"
tru
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.98"
/>
</proof>
...
...
@@ -513,7 +513,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"
4.9
7"
/>
<result
status=
"unknown"
time=
"
10.0
7"
/>
</proof>
<proof
prover=
"8"
...
...
@@ -537,7 +537,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"timeout"
time=
"
6.61
"
/>
<result
status=
"timeout"
time=
"
5.17
"
/>
</proof>
</goal>
<goal
...
...
@@ -558,8 +558,8 @@
</proof>
<proof
prover=
"1"
timelimit=
"
5
"
memlimit=
"
4
000"
timelimit=
"
3
"
memlimit=
"
1
000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"0.11"
/>
...
...
@@ -600,7 +600,7 @@
prover=
"6"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
fals
e"
obsolete=
"
tru
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.96"
/>
</proof>
...
...
@@ -610,7 +610,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"
4.96
"
/>
<result
status=
"unknown"
time=
"
10.08
"
/>
</proof>
<proof
prover=
"8"
...
...
@@ -634,7 +634,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"timeout"
time=
"
6.60
"
/>
<result
status=
"timeout"
time=
"
5.13
"
/>
</proof>
</goal>
<goal
...
...
@@ -655,8 +655,8 @@
</proof>
<proof
prover=
"1"
timelimit=
"
5
"
memlimit=
"
4
000"
timelimit=
"
3
"
memlimit=
"
1
000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"0.02"
/>
...
...
@@ -697,7 +697,7 @@
prover=
"6"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
fals
e"
obsolete=
"
tru
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.97"
/>
</proof>
...
...
@@ -707,7 +707,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"
4.9
8"
/>
<result
status=
"unknown"
time=
"
10.0
8"
/>
</proof>
<proof
prover=
"8"
...
...
@@ -752,8 +752,8 @@
</proof>
<proof
prover=
"1"
timelimit=
"
5
"
memlimit=
"
4
000"
timelimit=
"
3
"
memlimit=
"
1
000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"0.02"
/>
...
...
@@ -794,7 +794,7 @@
prover=
"6"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
fals
e"
obsolete=
"
tru
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.97"
/>
</proof>
...
...
@@ -804,7 +804,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"unknown"
time=
"
4
.9
8
"
/>
<result
status=
"unknown"
time=
"
9
.9
6
"
/>