dijkstra: updated proof on moloch

parent 3a867752
......@@ -214,7 +214,8 @@ Definition inv_succ2(src:vertex) (s:(set vertex)) (q:(set vertex)) (d:(map
~ (mem y su))) -> (((mem y s) \/ (mem y q)) /\ ((get d y) <= ((get d
x) + (weight x y))%Z)%Z)).
Require Import Why3. Ltac ae := why3 "alt-ergo".
Require Import Why3. Ltac ae := why3 "alt-ergo" timelimit 3.
Ltac z := why3 "z3" timelimit 3.
(* Why3 goal *)
Theorem WP_parameter_shortest_path_code : forall (src:vertex) (dst:vertex),
......@@ -274,7 +275,7 @@ intuition; try ae.
assert (case: (v2 = v1 \/ v2 <> v1)) by ae. destruct case.
subst v2 d4; rewrite Select_eq.
apply Path_cons.
why3 "z3".
z.
ae.
trivial.
subst d4; rewrite Select_neq.
......@@ -284,7 +285,7 @@ ae.
assert (case: (v2 = v1 \/ v2 <> v1)) by ae. destruct case.
subst v2 d4; rewrite Select_eq.
apply Path_cons.
why3 "z3".
z.
ae.
trivial.
ae.
......
......@@ -214,7 +214,8 @@ Definition inv_succ2(src:vertex) (s:(set vertex)) (q:(set vertex)) (d:(map
~ (mem y su))) -> (((mem y s) \/ (mem y q)) /\ ((get d y) <= ((get d
x) + (weight x y))%Z)%Z)).
Require Import Why3. Ltac ae := why3 "alt-ergo".
Require Import Why3. Ltac ae := why3 "alt-ergo" timelimit 3.
Ltac z := why3 "z3" timelimit 3.
Require Import Classical.
Lemma inside_or_exit:
......@@ -263,16 +264,17 @@ intros src dst d (h1,h2) q d1 visited ((h3,h4),h5) q1 d2 visited1
assert (is_empty su) by ae.
clear result h19 h20.
assert (inv_succ src visited2 q3 d3) by why3 "z3".
assert (inv_succ src visited2 q3 d3).
unfold inv_succ. split; z.
assert (mem src visited2) by ae.
destruct (inside_or_exit visited2 src x dx); auto.
destruct H2 as (y, (z, (dy, (a1, (a2, (a3, (a4, a5))))))).
unfold min in h21.
assert (mem z q3) by why3 "z3".
assert (mem z q3) by z.
assert (get d3 z <= get d3 y + weight y z)%Z by ae.
assert (dy = get d3 y) by why3 "z3".
why3 "z3".
assert (dy = get d3 y) by z.
z.
Qed.
......@@ -12,7 +12,7 @@
<prover
id="2"
name="Coq"
version="8.3pl3"/>
version="8.3pl4"/>
<prover
id="3"
name="Z3"
......@@ -139,7 +139,7 @@
edited="dijkstra_DijkstraShortestPath_Length_nonneg_1.v"
obsolete="false"
archived="false">
<result status="valid" time="0.65"/>
<result status="valid" time="0.48"/>
</proof>
</goal>
<goal
......@@ -174,7 +174,7 @@
edited="dijkstra_DijkstraShortestPath_Path_shortest_path_1.v"
obsolete="false"
archived="false">
<result status="valid" time="1.03"/>
<result status="valid" time="0.73"/>
</proof>
</goal>
<goal
......@@ -209,7 +209,7 @@
edited="dijkstra_DijkstraShortestPath_Completeness_lemma_1.v"
obsolete="false"
archived="false">
<result status="valid" time="1.22"/>
<result status="valid" time="0.61"/>
</proof>
</goal>
<goal
......@@ -244,7 +244,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.81"/>
<result status="valid" time="0.48"/>
</proof>
<proof
prover="3"
......@@ -252,7 +252,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.32"/>
<result status="valid" time="0.14"/>
</proof>
</goal>
<goal
......@@ -356,7 +356,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.91"/>
<result status="valid" time="0.57"/>
</proof>
</goal>
<goal
......@@ -697,7 +697,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.62"/>
<result status="valid" time="0.44"/>
</proof>
</goal>
<goal
......@@ -717,7 +717,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.47"/>
<result status="valid" time="0.28"/>
</proof>
</goal>
<goal
......@@ -757,7 +757,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="3.83"/>
<result status="valid" time="2.01"/>
</proof>
</goal>
<goal
......@@ -777,7 +777,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="3.13"/>
<result status="valid" time="1.89"/>
</proof>
</goal>
<goal
......@@ -797,7 +797,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="1.55"/>
<result status="valid" time="1.09"/>
</proof>
</goal>
<goal
......@@ -813,12 +813,12 @@
name="expl:VC for shortest_path_code"/>
<proof
prover="2"
timelimit="5"
timelimit="30"
memlimit="1000"
edited="dijkstra_DijkstraShortestPath_WP_parameter_shortest_path_code_2.v"
obsolete="false"
archived="false">
<result status="valid" time="19.28"/>
<result status="valid" time="12.97"/>
</proof>
</goal>
</transf>
......@@ -895,7 +895,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="3.78"/>
<result status="valid" time="2.58"/>
</proof>
</goal>
<goal
......@@ -915,7 +915,7 @@
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="2.38"/>
<result status="valid" time="1.70"/>
</proof>
</goal>
</transf>
......@@ -991,18 +991,18 @@
expl="17. loop invariant preservation"
sum="b3e2133fbfd60019bb154555b798e714"
proved="true"
expanded="false"
expanded="true"
shape="amemV18V12Iainfix &lt;V19amixfix []V15V17IapathV0V18V19FFIaminV17V14V15FIainfix =V16aTrueNIais_emptyV13Nqainfix =V16aTrueFIainv_succ2V0V12V14V15V11V13AainvV0V12V14V15AasubsetV13ag_succV11FIainfix =V12aaddV11V8FIashortest_pathV0V11amixfix []V7V11Iainfix =V10aremoveV11V6AaminV11V6V7FFIais_emptyV6NIainfix =V9aTrueNIais_emptyV6qainfix =V9aTrueFIamemV21V8Iainfix &lt;V22amixfix []V7V20IapathV0V21V22FFIaminV20V6V7FAainv_succV0V8V6V7AainvV0V8V6V7FIainfix =V4amixfix [&lt;-]V2V0c0Aainfix =V3aaddV0aemptyAais_emptyV5FIamemV1avAamemV0avFF">
<label
name="expl:VC for shortest_path_code"/>
<proof
prover="2"
timelimit="5"
timelimit="30"
memlimit="1000"
edited="dijkstra_DijkstraShortestPath_WP_parameter_shortest_path_code_3.v"
obsolete="false"
archived="false">
<result status="valid" time="3.20"/>
<result status="valid" time="2.08"/>
</proof>
</goal>
<goal
......
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