Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 5c322c15 authored by MARCHE Claude's avatar MARCHE Claude
Browse files

fixed drivers for division

parent d417b053
......@@ -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"
......
......@@ -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:
......
......@@ -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"
......
......@@ -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)"
......
......@@ -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)"
......
......@@ -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
......
......@@ -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
......
......@@ -132,7 +132,7 @@ theory bool.Bool
syntax function implb "(=> %1 %2)"
end
(* needs to be checked
(* div/mod of Z3 seems 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)"
......
......@@ -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
......
......@@ -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="false"
expanded="false">
verified="true"
expanded="true">
<theory
name="TestNegAsXOR"
locfile="../neg_as_xor.why"
loclnum="2" loccnumb="7" loccnume="19"
verified="false"
verified="true"
expanded="true">
<goal
name="Nth_j"
locfile="../neg_as_xor.why"
loclnum="13" loccnumb="8" loccnume="13"
sum="ffa7aadc98c7c81aa8afa142b455755d"
proved="false"
expanded="false"
proved="true"
expanded="true"
shape="ainfix =anthajV0aFalseIainfix &lt;=V0c62Aainfix &lt;=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 &lt;aexpV0c2047Aainfix &lt;c0aexpV0F">
<proof
prover="1"
prover="2"
timelimit="5"
memlimit="1000"
edited="neg_as_xor_TestNegAsXOR_MainResult_1.v"
......
......@@ -73,8 +73,8 @@
</proof>
<proof
prover="1"
timelimit="5"
memlimit="4000"
timelimit="3"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.00"/>
......@@ -115,7 +115,7 @@
prover="6"
timelimit="5"
memlimit="4000"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="5.97"/>
</proof>
......@@ -125,7 +125,7 @@
memlimit="4000"
obsolete="false"
archived="false">
<result status="unknown" time="4.98"/>
<result status="unknown" time="10.08"/>
</proof>
<proof
prover="8"
......@@ -170,8 +170,8 @@
</proof>
<proof
prover="1"
timelimit="5"
memlimit="4000"
timelimit="3"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
......@@ -212,7 +212,7 @@
prover="6"
timelimit="5"
memlimit="4000"
obsolete="false"
obsolete="true"
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="4000"
timelimit="3"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
......@@ -309,7 +309,7 @@
prover="6"
timelimit="5"
memlimit="4000"
obsolete="false"
obsolete="true"
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="4000"
timelimit="3"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.00"/>
......@@ -406,7 +406,7 @@
prover="6"
timelimit="5"
memlimit="4000"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="5.98"/>
</proof>
......@@ -416,7 +416,7 @@
memlimit="4000"
obsolete="false"
archived="false">
<result status="unknown" time="4.98"/>
<result status="unknown" time="10.08"/>
</proof>
<proof
prover="8"
......@@ -461,8 +461,8 @@
</proof>
<proof
prover="1"
timelimit="5"
memlimit="4000"
timelimit="3"
memlimit="1000"
obsolete="false"
archived="false">
<result status="unknown" time="0.04"/>
......@@ -503,7 +503,7 @@
prover="6"
timelimit="5"
memlimit="4000"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="5.98"/>
</proof>
......@@ -513,7 +513,7 @@
memlimit="4000"
obsolete="false"
archived="false">
<result status="unknown" time="4.97"/>
<result status="unknown" time="10.07"/>
</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="4000"
timelimit="3"
memlimit="1000"
obsolete="false"
archived="false">
<result status="unknown" time="0.11"/>
......@@ -600,7 +600,7 @@
prover="6"
timelimit="5"
memlimit="4000"
obsolete="false"
obsolete="true"
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="4000"
timelimit="3"
memlimit="1000"
obsolete="false"
archived="false">
<result status="unknown" time="0.02"/>
......@@ -697,7 +697,7 @@
prover="6"
timelimit="5"
memlimit="4000"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="5.97"/>
</proof>
......@@ -707,7 +707,7 @@
memlimit="4000"
obsolete="false"
archived="false">
<result status="unknown" time="4.98"/>
<result status="unknown" time="10.08"/>
</proof>
<proof
prover="8"
......@@ -752,8 +752,8 @@
</proof>
<proof
prover="1"
timelimit="5"
memlimit="4000"
timelimit="3"
memlimit="1000"
obsolete="false"
archived="false">
<result status="unknown" time="0.02"/>
......@@ -794,7 +794,7 @@
prover="6"
timelimit="5"
memlimit="4000"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="5.97"/>
</proof>
......@@ -804,7 +804,7 @@
memlimit="4000"
obsolete="false"
archived="false">
<result status="unknown" time="4.98"/>
<result status="unknown" time="9.96"/>
</proof>