Commit ad56b76e authored by Asma Tafat-Bouzid's avatar Asma Tafat-Bouzid

blocking semantic (proofs)

parent 9577acb9
......@@ -696,13 +696,13 @@ Fixpoint wp(e:expr) (q:fmla) {struct e}: fmla :=
end.
Unset Implicit Arguments.
Axiom wp_implies : forall (p:fmla) (q:fmla), (forall (sigma:(map mident
Axiom monotonicite : forall (p:fmla) (q:fmla), (forall (sigma:(map mident
value)) (pi:(list (ident* value)%type)), (eval_fmla sigma pi p) ->
(eval_fmla sigma pi q)) -> forall (sigma:(map mident value)) (pi:(list
(ident* value)%type)) (e:expr), (eval_fmla sigma pi (wp e p)) ->
(eval_fmla sigma pi (wp e q)).
Axiom wp_conj : forall (sigma:(map mident value)) (pi:(list (ident*
Axiom distib_conj : forall (sigma:(map mident value)) (pi:(list (ident*
value)%type)) (e:expr) (p:fmla) (q:fmla), (eval_fmla sigma pi (wp e (Fand p
q))) <-> ((eval_fmla sigma pi (wp e p)) /\ (eval_fmla sigma pi (wp e q))).
......@@ -721,6 +721,15 @@ Definition is_value(e:expr): Prop :=
Axiom decide_value : forall (e:expr), (~ (is_value e)) \/ exists v:value,
(e = (Evalue v)).
Axiom bool_value : forall (e:expr) (sigmat:(map mident datatype)) (pit:(list
(ident* datatype)%type)), (type_expr sigmat pit e TYbool) ->
((is_value e) -> ((e = (Evalue (Vbool false))) \/
(e = (Evalue (Vbool true))))).
Axiom unit_value : forall (e:expr) (sigmat:(map mident datatype)) (pit:(list
(ident* datatype)%type)), (type_expr sigmat pit e TYunit) ->
((is_value e) -> (e = (Evalue Vvoid))).
(* Why3 goal *)
Theorem progress : forall (e:expr) (sigma:(map mident value)) (pi:(list
(ident* value)%type)) (sigmat:(map mident datatype)) (pit:(list (ident*
......@@ -814,16 +823,28 @@ apply one_step_deref.
(* case 4.1: e' not a value *)
destruct (decide_value e).
intros sigma pi typ_sigma typ_pi type q h1 h2 h3 h4.
generalize (IHe _ _ _ (conj h1 H)).
inversion h1; subst.
(*
generalize (IHe sigma pi _ _ _ _ H6 h3 H).
simpl in h3.
pose (q' := (Flet (fresh_from q e) (Tvar result)
(Flet result (msubst_term (Tvalue Vvoid) m (fresh_from q e))
(msubst q m (fresh_from q e))))).
fold q' in h3.
intro; clear IHe.
intros (sigma' & pi' & e' & h).
exists sigma'.
exists pi'.
exists (Eassign i e').
apply one_step_assign_ctxt; auto.
apply one_step_assign_ctxt; auto.*)
admit.
(* case 4.2: e' is a value *)
elim H; clear H; intros v He_v.
subst e.
intros sigma pi q (h2 & h3).
intros sigma pi q h2 h3.
eexists.
exists pi.
eexists.
......@@ -832,27 +853,30 @@ eapply one_step_assign_value.
(* case 5: e = e1; e2 *)
destruct (decide_value e1).
(* case 5.1: e1 not a value *)
intros sigma pi q (h1 & _).
(*intros sigma pi q (h1 & _).
generalize (IHe1 _ _ _ (conj h1 H)).
intros (sigma' & pi' & e' & h).
exists sigma'.
exists pi'.
exists (Eseq e' e2).
eapply one_step_seq_ctxt; auto.
eapply one_step_seq_ctxt; auto.*)
admit.
(* case 5.2: e1 is a value *)
elim H; clear H; intros v He_v.
subst e1.
intros sigma pi q (h2 & h3).
clear IHe1 IHe2.
intros sigma pi sigmat pit ty q h1 h2 h3 h4.
inversion h1; subst.
assert (h : Evalue v = Vvoid)
eexists.
exists pi.
eexists.
assert (h: v = Vvoid).
(* problem : typage pour savoir que v est void *)
admit.
subst v.
eapply one_step_seq_value.
(* case 6: e = let i = e1 in e2 *)
destruct (decide_value e1).
(* case 6.1: e1 not a value *)
......
......@@ -28,30 +28,34 @@
version="1.4"/>
<prover
id="6"
name="Gappa"
version="0.14.1"/>
<prover
id="7"
name="Simplify"
version="1.5.4"/>
<prover
id="7"
id="8"
name="Spass"
version="3.7"/>
<prover
id="8"
id="9"
name="Vampire"
version="0.6"/>
<prover
id="9"
id="10"
name="Yices"
version="1.0.25"/>
<prover
id="10"
id="11"
name="Z3"
version="2.19"/>
<prover
id="11"
id="12"
name="Z3"
version="3.2"/>
<prover
id="12"
id="13"
name="veriT"
version="dev"/>
<file
......@@ -698,44 +702,46 @@
</proof>
</goal>
<goal
name="wp_implies"
name="monotonicite"
locfile="blocking_semantics2/../blocking_semantics2.mlw"
loclnum="729" loccnumb="8" loccnume="18"
sum="b6cc858b6fd9021e369507349b37d450"
loclnum="729" loccnumb="8" loccnume="20"
sum="968d7276e08a0c1311547ab117a38e5f"
proved="false"
expanded="false"
shape="aeval_fmlaV2V3awpV4V1Iaeval_fmlaV2V3awpV4V0FIaeval_fmlaV5V6V1Iaeval_fmlaV5V6V0FF">
<proof
prover="0"
prover="4"
timelimit="3"
memlimit="0"
obsolete="false"
archived="false">
<result status="timeout" time="3.11"/>
edited="blocking_semantics2_WP_monotonicite_1.v"
obsolete="true"
archived="false"><undone/>
</proof>
</goal>
<goal
name="wp_conj"
name="distib_conj"
locfile="blocking_semantics2/../blocking_semantics2.mlw"
loclnum="738" loccnumb="8" loccnume="15"
sum="23b08f704d04d428d797d85ae2c3604c"
loclnum="738" loccnumb="8" loccnume="19"
sum="e60575064b55782ffe8f8558d7a46584"
proved="false"
expanded="false"
shape="aeval_fmlaV0V1awpV2V4Aaeval_fmlaV0V1awpV2V3qaeval_fmlaV0V1awpV2aFandV3V4F">
<proof
prover="0"
prover="4"
timelimit="3"
memlimit="0"
obsolete="false"
archived="false">
<result status="timeout" time="3.01"/>
edited="blocking_semantics2_WP_distib_conj_1.v"
obsolete="true"
archived="false"><undone/>
</proof>
</goal>
<goal
name="wp_reduction"
locfile="blocking_semantics2/../blocking_semantics2.mlw"
loclnum="745" loccnumb="8" loccnume="20"
sum="90ce1e7997a6f9374db99d5513603a36"
sum="5059669b3b3a48cbf6d38d4db4c9921b"
proved="false"
expanded="false"
shape="aeval_fmlaV1V3awpV5V6Iaeval_fmlaV0V2awpV4V6FIaone_stepV0V2V4V1V3V5F">
......@@ -743,50 +749,26 @@
prover="0"
timelimit="3"
memlimit="0"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="3.01"/>
</proof>
</goal>
<goal
name="unique_type_expr"
name="decide_value"
locfile="blocking_semantics2/../blocking_semantics2.mlw"
loclnum="758" loccnumb="8" loccnume="24"
sum="0b3e72d881397d52b7b4cb3762a45cdf"
proved="false"
loclnum="758" loccnumb="8" loccnume="20"
sum="f83215fbe97c484fb91635a552886b42"
proved="true"
expanded="false"
shape="ainfix =V3V4Iatype_exprV1V2V0V4Iatype_exprV1V2V0V3F">
<proof
prover="7"
timelimit="3"
memlimit="0"
obsolete="false"
archived="false">
<result status="timeout" time="3.03"/>
</proof>
<proof
prover="10"
timelimit="3"
memlimit="0"
obsolete="false"
archived="false">
<result status="timeout" time="3.02"/>
</proof>
shape="ainfix =V0aEvalueV1EOais_valueV0NF">
<proof
prover="2"
timelimit="3"
memlimit="0"
obsolete="false"
archived="false">
<result status="timeout" time="3.03"/>
</proof>
<proof
prover="0"
timelimit="3"
memlimit="0"
obsolete="false"
archived="false">
<result status="timeout" time="3.02"/>
<result status="valid" time="0.10"/>
</proof>
<proof
prover="3"
......@@ -794,100 +776,75 @@
memlimit="0"
obsolete="false"
archived="false">
<result status="timeout" time="3.05"/>
<result status="valid" time="0.11"/>
</proof>
</goal>
<goal
name="bool_value"
locfile="blocking_semantics2/../blocking_semantics2.mlw"
loclnum="761" loccnumb="8" loccnume="18"
sum="c55b461e39acf5f00cb3885269caf6da"
proved="false"
expanded="true"
shape="ainfix =V0aVboolaTrueOainfix =V0aVboolaFalseIatype_exprV1V2aEvalueV0aTYboolF">
<proof
prover="12"
prover="11"
timelimit="3"
memlimit="0"
obsolete="false"
obsolete="true"
archived="false">
<result status="highfailure" time="0.00"/>
<result status="timeout" time="3.10"/>
</proof>
<proof
prover="8"
timelimit="3"
memlimit="0"
obsolete="false"
archived="false">
<result status="unknown" time="3.09"/>
</proof>
<proof
prover="6"
timelimit="3"
memlimit="0"
obsolete="false"
archived="false">
<result status="timeout" time="3.08"/>
</proof>
<proof
prover="11"
timelimit="3"
memlimit="0"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="3.09"/>
</proof>
<proof
prover="9"
prover="2"
timelimit="3"
memlimit="0"
obsolete="false"
obsolete="true"
archived="false">
<result status="highfailure" time="0.00"/>
<result status="timeout" time="3.01"/>
</proof>
<proof
prover="5"
prover="0"
timelimit="3"
memlimit="0"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="2.99"/>
<result status="timeout" time="3.04"/>
</proof>
<proof
prover="1"
prover="13"
timelimit="3"
memlimit="0"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="2.99"/>
<result status="failure" time="0.00"/>
</proof>
</goal>
<goal
name="decide_value"
locfile="blocking_semantics2/../blocking_semantics2.mlw"
loclnum="763" loccnumb="8" loccnume="20"
sum="0ef5efdcbbc54ecd2d269c3674a0dddb"
proved="false"
expanded="true"
shape="ainfix =V0aEvalueV1EOais_valueV0NF">
<proof
prover="0"
prover="3"
timelimit="3"
memlimit="0"
obsolete="false"
obsolete="true"
archived="false">
<result status="unknown" time="0.05"/>
<result status="timeout" time="3.01"/>
</proof>
<proof
prover="1"
prover="6"
timelimit="3"
memlimit="0"
obsolete="true"
archived="false">
<result status="unknown" time="0.04"/>
<result status="unknown" time="0.00"/>
</proof>
</goal>
<goal
name="bool_value"
locfile="blocking_semantics2/../blocking_semantics2.mlw"
loclnum="766" loccnumb="8" loccnume="18"
sum="562326be7f50f6b5aab48b1db49554e2"
proved="false"
expanded="true"
shape="ainfix =V0aEvalueaVboolaTrueOainfix =V0aEvalueaVboolaFalseIais_valueV0Iatype_exprV1V2V0aTYboolF">
<proof
prover="10"
prover="12"
timelimit="3"
memlimit="0"
obsolete="true"
......@@ -895,45 +852,36 @@
<result status="timeout" time="3.04"/>
</proof>
<proof
prover="2"
prover="7"
timelimit="3"
memlimit="0"
obsolete="true"
archived="false">
<result status="timeout" time="3.09"/>
</proof>
<proof
prover="0"
timelimit="3"
memlimit="0"
obsolete="false"
archived="false">
<result status="timeout" time="3.01"/>
</proof>
<proof
prover="3"
prover="9"
timelimit="3"
memlimit="0"
obsolete="true"
archived="false">
<result status="timeout" time="3.01"/>
<result status="unknown" time="3.09"/>
</proof>
<proof
prover="11"
prover="10"
timelimit="3"
memlimit="0"
obsolete="true"
archived="false">
<result status="timeout" time="3.01"/>
<result status="failure" time="0.00"/>
</proof>
<proof
prover="4"
prover="5"
timelimit="3"
memlimit="0"
edited="blocking_semantics2_WP_bool_value_1.v"
obsolete="true"
archived="false"><undone/>
archived="false">
<result status="timeout" time="2.98"/>
</proof>
<proof
prover="1"
......@@ -941,25 +889,34 @@
memlimit="0"
obsolete="true"
archived="false">
<result status="timeout" time="2.99"/>
<result status="timeout" time="2.98"/>
</proof>
</goal>
<goal
name="progress"
name="unit_value"
locfile="blocking_semantics2/../blocking_semantics2.mlw"
loclnum="771" loccnumb="8" loccnume="16"
sum="a5fb27f2ebabd38dfe9cb96e5cc0d7e2"
loclnum="766" loccnumb="8" loccnume="18"
sum="98db34c2bec77a5a4dfc821f3485399b"
proved="false"
expanded="false"
shape="aone_stepV1V2V0V7V8V9EIais_valueV0NIaeval_fmlaV1V2awpV0V6Iatype_fmlaV3aConsaTuple2aresultV5V4V6Iatype_exprV3V4V0V5F">
expanded="true"
shape="ainfix =V0aVvoidIatype_exprV1V2aEvalueV0aTYunitF">
<proof
prover="0"
prover="2"
timelimit="3"
memlimit="0"
obsolete="false"
obsolete="true"
archived="false">
<result status="timeout" time="3.10"/>
<result status="valid" time="0.63"/>
</proof>
</goal>
<goal
name="progress"
locfile="blocking_semantics2/../blocking_semantics2.mlw"
loclnum="770" loccnumb="8" loccnume="16"
sum="ef1b357ee2169570f65c8a198fc7bee8"
proved="false"
expanded="true"
shape="aone_stepV1V2V0V7V8V9EIais_valueV0NIaeval_fmlaV1V2awpV0V6Iatype_fmlaV3aConsaTuple2aresultV5V4V6Iatype_exprV3V4V0V5F">
<proof
prover="4"
timelimit="3"
......
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