Commit 2242838b authored by Andrei Paskevich's avatar Andrei Paskevich

Peano: move division and minmax into separate modules

parent c687def9
This diff is collapsed.
......@@ -2,33 +2,33 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="Alt-Ergo" version="1.30" timelimit="1" steplimit="0" memlimit="1000"/>
<prover id="1" name="CVC4" version="1.4" timelimit="5" steplimit="0" memlimit="1000"/>
<prover id="1" name="CVC4" version="1.5" timelimit="5" steplimit="0" memlimit="1000"/>
<prover id="2" name="Alt-Ergo" version="2.0.0" timelimit="1" steplimit="0" memlimit="1000"/>
<file name="../monoid.mlw" proved="true">
<theory name="MonoidSumDef" proved="true">
<goal name="VC agg" expl="VC for agg" proved="true">
<proof prover="0"><result status="valid" time="0.01" steps="13"/></proof>
<proof prover="2"><result status="valid" time="0.01" steps="14"/></proof>
</goal>
<goal name="agg_sing_core" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="22"/></proof>
<proof prover="2"><result status="valid" time="0.00" steps="22"/></proof>
</goal>
<goal name="VC agg_cat" expl="VC for agg_cat" proved="true">
<proof prover="0"><result status="valid" time="0.07" steps="435"/></proof>
<proof prover="2"><result status="valid" time="0.07" steps="375"/></proof>
</goal>
<goal name="MS.M.assoc" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="2"/></proof>
<proof prover="2"><result status="valid" time="0.00" steps="2"/></proof>
</goal>
<goal name="MS.M.neutral" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="3"/></proof>
<proof prover="2"><result status="valid" time="0.00" steps="3"/></proof>
</goal>
<goal name="MS.agg_empty" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="3"/></proof>
<proof prover="2"><result status="valid" time="0.00" steps="3"/></proof>
</goal>
<goal name="MS.agg_sing" proved="true">
<proof prover="1"><result status="valid" time="0.03"/></proof>
</goal>
<goal name="MS.agg_cat" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="2"/></proof>
<proof prover="2"><result status="valid" time="0.00" steps="2"/></proof>
</goal>
</theory>
</file>
......
......@@ -2,31 +2,31 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="Alt-Ergo" version="1.30" timelimit="1" steplimit="0" memlimit="1000"/>
<prover id="1" name="Alt-Ergo" version="2.0.0" timelimit="1" steplimit="0" memlimit="1000"/>
<file name="../preorder.mlw" proved="true">
<theory name="Full" proved="true">
<goal name="Eq.Refl" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="3"/></proof>
<proof prover="1"><result status="valid" time="0.00" steps="3"/></proof>
</goal>
<goal name="Eq.Trans" proved="true">
<proof prover="0"><result status="valid" time="0.01" steps="34"/></proof>
<proof prover="1"><result status="valid" time="0.01" steps="48"/></proof>
</goal>
<goal name="Eq.Symm" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="9"/></proof>
<proof prover="1"><result status="valid" time="0.00" steps="5"/></proof>
</goal>
<goal name="Lt.Trans" proved="true">
<proof prover="0"><result status="valid" time="0.01" steps="34"/></proof>
<proof prover="1"><result status="valid" time="0.01" steps="49"/></proof>
</goal>
<goal name="Lt.Asymm" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="5"/></proof>
<proof prover="1"><result status="valid" time="0.00" steps="5"/></proof>
</goal>
</theory>
<theory name="TotalFull" proved="true">
<goal name="Lt.Total" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="3"/></proof>
<proof prover="1"><result status="valid" time="0.00" steps="11"/></proof>
</goal>
<goal name="lt_def2" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="7"/></proof>
<proof prover="1"><result status="valid" time="0.00" steps="13"/></proof>
</goal>
</theory>
</file>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -242,7 +242,6 @@ module McCarthy91Mach
n := !n - 10;
e := pred !e
end else begin
assert { spec !n = spec (spec (!n + 11)) };
n := !n + 11;
e := succ !e
end
......
......@@ -48,19 +48,16 @@
<goal name="VC f91_nonrec.3" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.03" steps="217"/></proof>
</goal>
<goal name="VC f91_nonrec.4" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.01" steps="20"/></proof>
<goal name="VC f91_nonrec.4" expl="integer overflow" proved="true">
<proof prover="3"><result status="valid" time="0.01" steps="16"/></proof>
</goal>
<goal name="VC f91_nonrec.5" expl="integer overflow" proved="true">
<proof prover="3"><result status="valid" time="0.01" steps="17"/></proof>
</goal>
<goal name="VC f91_nonrec.6" expl="loop variant decrease" proved="true">
<proof prover="3"><result status="valid" time="0.00" steps="18"/></proof>
<goal name="VC f91_nonrec.5" expl="loop variant decrease" proved="true">
<proof prover="3"><result status="valid" time="0.00" steps="17"/></proof>
</goal>
<goal name="VC f91_nonrec.7" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.04" steps="304"/></proof>
<goal name="VC f91_nonrec.6" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="3.56" steps="4952"/></proof>
</goal>
<goal name="VC f91_nonrec.8" expl="postcondition" proved="true">
<goal name="VC f91_nonrec.7" expl="postcondition" proved="true">
<proof prover="3"><result status="valid" time="0.00" steps="30"/></proof>
</goal>
</transf>
......
......@@ -98,7 +98,7 @@
<proof prover="4"><result status="valid" time="0.36" steps="1404"/></proof>
</goal>
<goal name="VC count_bt_queens" expl="VC for count_bt_queens" proved="true">
<proof prover="4"><result status="valid" time="4.08" steps="3486"/></proof>
<proof prover="4"><result status="valid" time="4.08" steps="3527"/></proof>
</goal>
<goal name="VC count_queens" expl="VC for count_queens" proved="true">
<proof prover="4"><result status="valid" time="0.01" steps="15"/></proof>
......
......@@ -70,19 +70,33 @@ module Peano
e.g. addition of two values of different signs
*)
end
module ComputerDivision
use int.Int
use int.ComputerDivision
use Peano
val div (x y: t) : t
requires { y.v <> 0 }
ensures { result.v = div x.v y.v }
val mod (x y: t) : t
requires { y.v <> 0 }
ensures { result.v = mod x.v y.v }
end
module MinMax
use int.Int
use int.MinMax
use Peano
val max (x y: t) : t
ensures { result.v = max x.v y.v }
val min (x y: t) : t
ensures { result.v = min x.v y.v }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment