Commit 3feba002 authored by MARCHE Claude's avatar MARCHE Claude
Browse files

prover example: update sessions in progress

parent 53bed3cb
......@@ -68,7 +68,7 @@ module Logic
function pop (l:list 'a) : list 'a = match l with
| Nil -> default
| Cons x q -> q
| Cons _x q -> q
end
function unroll (tm:int) (t0:int) (h:list int) (b:func int (list 'a))
......
......@@ -2,178 +2,142 @@
<!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="0.95.1" timelimit="5" memlimit="1000"/>
<prover id="1" name="CVC3" version="2.4.1" timelimit="5" memlimit="1000"/>
<prover id="7" name="Alt-Ergo" version="0.99.1" timelimit="5" memlimit="1000"/>
<file name="../Firstorder_symbol_impl.mlw">
<file name="../Firstorder_symbol_impl.mlw" expanded="true">
<theory name="Types" sum="d41d8cd98f00b204e9800998ecf8427e">
</theory>
<theory name="Logic" sum="8942ac6e2361c16c38459a751e0dbd63">
<goal name="WP_parameter nlsize_positive_lemma_symbol" expl="VC for nlsize_positive_lemma_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.03"/></proof>
<theory name="Logic" sum="8942ac6e2361c16c38459a751e0dbd63" expanded="true">
<goal name="WP_parameter nlsize_positive_lemma_symbol" expl="VC for nlsize_positive_lemma_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.03" steps="5"/></proof>
</goal>
<goal name="WP_parameter shiftb_compose_lemma_symbol" expl="VC for shiftb_compose_lemma_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.08"/></proof>
<goal name="WP_parameter shiftb_compose_lemma_symbol" expl="VC for shiftb_compose_lemma_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.08" steps="146"/></proof>
</goal>
<goal name="WP_parameter nlmodel_subst_commutation_lemma_symbol" expl="VC for nlmodel_subst_commutation_lemma_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.02"/></proof>
<goal name="WP_parameter nlmodel_subst_commutation_lemma_symbol" expl="VC for nlmodel_subst_commutation_lemma_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.02" steps="25"/></proof>
</goal>
<goal name="WP_parameter nlmodel_rename_commutation_lemma_symbol" expl="VC for nlmodel_rename_commutation_lemma_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.04"/></proof>
<goal name="WP_parameter nlmodel_rename_commutation_lemma_symbol" expl="VC for nlmodel_rename_commutation_lemma_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.04" steps="39"/></proof>
</goal>
<goal name="WP_parameter bound_depth_of_symbol_in_symbol_nonnegative" expl="VC for bound_depth_of_symbol_in_symbol_nonnegative">
<proof prover="0" obsolete="true"><result status="valid" time="0.04"/></proof>
<goal name="WP_parameter bound_depth_of_symbol_in_symbol_nonnegative" expl="VC for bound_depth_of_symbol_in_symbol_nonnegative" expanded="true">
<proof prover="7"><result status="valid" time="0.04" steps="34"/></proof>
</goal>
<goal name="WP_parameter model_equal_symbol" expl="VC for model_equal_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.04"/></proof>
<goal name="WP_parameter model_equal_symbol" expl="VC for model_equal_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.04" steps="65"/></proof>
</goal>
</theory>
<theory name="Impl" sum="68dce20711cd1fde227ae722087cc947">
<goal name="WP_parameter bind_var_symbol_in_symbol" expl="VC for bind_var_symbol_in_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.10"/></proof>
<theory name="Impl" sum="68dce20711cd1fde227ae722087cc947" expanded="true">
<goal name="WP_parameter bind_var_symbol_in_symbol" expl="VC for bind_var_symbol_in_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.10" steps="210"/></proof>
</goal>
<goal name="WP_parameter unbind_var_symbol_in_symbol" expl="VC for unbind_var_symbol_in_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.16"/></proof>
<goal name="WP_parameter unbind_var_symbol_in_symbol" expl="VC for unbind_var_symbol_in_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.16" steps="280"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol" expl="VC for subst_base_symbol_in_symbol">
<transf name="split_goal_wp">
<goal name="WP_parameter subst_base_symbol_in_symbol.1" expl="1. precondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.02"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol" expl="VC for subst_base_symbol_in_symbol" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter subst_base_symbol_in_symbol.1" expl="1. precondition" expanded="true">
<proof prover="7"><result status="valid" time="0.02" steps="7"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol.2" expl="2. precondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.04"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol.2" expl="2. precondition" expanded="true">
<proof prover="7"><result status="valid" time="0.04" steps="40"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol.3" expl="3. postcondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.04"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol.3" expl="3. postcondition" expanded="true">
<proof prover="7"><result status="valid" time="0.04" steps="56"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol.4" expl="4. postcondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.02"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol.4" expl="4. postcondition" expanded="true">
<proof prover="7"><result status="valid" time="0.02" steps="9"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol.5" expl="5. postcondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.02"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol.5" expl="5. postcondition" expanded="true">
<proof prover="7"><result status="valid" time="0.02" steps="11"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol.6" expl="6. postcondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.02"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol.6" expl="6. postcondition" expanded="true">
<proof prover="7"><result status="valid" time="0.02" steps="8"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol.7" expl="7. postcondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.03"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol.7" expl="7. postcondition" expanded="true">
<proof prover="7"><result status="valid" time="0.03" steps="12"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol.8" expl="8. postcondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.03"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol.8" expl="8. postcondition" expanded="true">
<proof prover="7"><result status="valid" time="0.03" steps="31"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol.9" expl="9. postcondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.03"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol.9" expl="9. postcondition" expanded="true">
<proof prover="7"><result status="valid" time="0.03" steps="8"/></proof>
</goal>
<goal name="WP_parameter subst_base_symbol_in_symbol.10" expl="10. postcondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.03"/></proof>
<goal name="WP_parameter subst_base_symbol_in_symbol.10" expl="10. postcondition" expanded="true">
<proof prover="7"><result status="valid" time="0.03" steps="9"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter construct_symbol" expl="VC for construct_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.06"/></proof>
<goal name="WP_parameter construct_symbol" expl="VC for construct_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.06" steps="73"/></proof>
</goal>
<goal name="WP_parameter destruct_symbol" expl="VC for destruct_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.04"/></proof>
<goal name="WP_parameter destruct_symbol" expl="VC for destruct_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.04" steps="56"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol" expl="VC for nlsubst_symbol_in_symbol">
<proof prover="0" obsolete="true"><result status="timeout" time="5.01"/></proof>
<transf name="split_goal_wp">
<goal name="WP_parameter nlsubst_symbol_in_symbol.1" expl="1. precondition">
<proof prover="0" obsolete="true"><result status="timeout" time="4.33"/></proof>
<transf name="inline_goal">
<goal name="WP_parameter nlsubst_symbol_in_symbol.1.1" expl="1. precondition">
<transf name="split_goal_wp">
<goal name="WP_parameter nlsubst_symbol_in_symbol.1.1.1" expl="1. precondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.12"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol" expl="VC for nlsubst_symbol_in_symbol" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter nlsubst_symbol_in_symbol.1" expl="1. precondition" expanded="true">
<transf name="inline_goal" expanded="true">
<goal name="WP_parameter nlsubst_symbol_in_symbol.1.1" expl="1. precondition" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter nlsubst_symbol_in_symbol.1.1.1" expl="1. precondition" expanded="true">
<proof prover="7"><result status="valid" time="0.12" steps="21"/></proof>
</goal>
</transf>
</goal>
</transf>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.2" expl="2. precondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.03"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.2" expl="2. precondition" expanded="true">
<proof prover="7"><result status="valid" time="0.03" steps="14"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.3" expl="3. precondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.03"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.3" expl="3. precondition" expanded="true">
<proof prover="7"><result status="valid" time="0.03" steps="38"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.4" expl="4. postcondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.03"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.4" expl="4. postcondition" expanded="true">
<proof prover="7"><result status="valid" time="0.03" steps="18"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.5" expl="5. precondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.04"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.5" expl="5. precondition" expanded="true">
<proof prover="7"><result status="valid" time="0.04" steps="51"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.6" expl="6. precondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.06"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.6" expl="6. precondition" expanded="true">
<proof prover="7"><result status="valid" time="0.06" steps="59"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.7" expl="7. precondition">
<proof prover="0" obsolete="true"><result status="valid" time="0.05"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.7" expl="7. precondition" expanded="true">
<proof prover="7"><result status="valid" time="0.05" steps="16"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.8" expl="8. assertion">
<transf name="split_goal_wp">
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.1" expl="1. assertion">
<goal name="WP_parameter nlsubst_symbol_in_symbol.8" expl="8. assertion" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.1" expl="1. assertion" expanded="true">
<proof prover="1"><result status="valid" time="1.61"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.2" expl="2. assertion">
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.2" expl="2. assertion" expanded="true">
<proof prover="7"><result status="valid" time="0.08" steps="103"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.3" expl="3. assertion">
<proof prover="1"><result status="valid" time="1.41"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.3" expl="3. assertion" expanded="true">
<proof prover="1"><result status="valid" time="0.78"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.4" expl="4. assertion">
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.4" expl="4. assertion" expanded="true">
<proof prover="7"><result status="valid" time="0.03" steps="17"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.5" expl="5. assertion">
<goal name="WP_parameter nlsubst_symbol_in_symbol.8.5" expl="5. assertion" expanded="true">
<proof prover="7"><result status="valid" time="0.08" steps="101"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.9" expl="9. postcondition">
<proof prover="0" obsolete="true"><result status="timeout" time="4.98"/></proof>
<transf name="inline_goal">
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1" expl="1. postcondition">
<proof prover="0" obsolete="true"><result status="timeout" time="4.99"/></proof>
<transf name="split_goal_wp">
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1.1" expl="1. VC for nlsubst_symbol_in_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.59"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.9" expl="9. postcondition" expanded="true">
<transf name="inline_goal" expanded="true">
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1" expl="1. postcondition" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1.1" expl="1. VC for nlsubst_symbol_in_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.27" steps="613"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1.2" expl="2. VC for nlsubst_symbol_in_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.18"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1.2" expl="2. VC for nlsubst_symbol_in_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.18" steps="77"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1.3" expl="3. VC for nlsubst_symbol_in_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="0.11"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1.3" expl="3. VC for nlsubst_symbol_in_symbol" expanded="true">
<proof prover="7"><result status="valid" time="0.11" steps="140"/></proof>
</goal>
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1.4" expl="4. VC for nlsubst_symbol_in_symbol">
<proof prover="0" obsolete="true"><result status="valid" time="1.47"/></proof>
<goal name="WP_parameter nlsubst_symbol_in_symbol.9.1.4" expl="4. VC for nlsubst_symbol_in_symbol" expanded="true">
<proof prover="7"><result status="valid" time="1.47" steps="502"/></proof>
</goal>
</transf>
......
......@@ -70,7 +70,8 @@ endif
replay:
for i in $(MLWUTIL) $(MLWIMPL); do \
why3 replay -q -L . $$i ; \
echo "Replaying $$i..." ; \
why3 $(WHY3FLAGS) replay -q $$i ; \
done
depend: .depend
......
module Funcs
use import option.Option
use import Functions.Func
(* Abstraction definition axiom :
constant some : func 'a (option 'a) = (\ x:'a. Some x) *)
constant some : func 'a (option 'a)
axiom some_def : forall x:'a. some x = Some x
(* Abstraction definition axiom :
constant ocase (f:func 'a 'b) (d:'b) : func (option 'a) 'b =
(\ x:'a. match x with None -> d | Some x -> f x end) *)
function ocase (f:func 'a 'b) (d:'b) : func (option 'a) 'b
axiom ocase_def : forall f:func 'a 'b,d:'b,x:option 'a.
ocase f d x = match x with None -> d | Some x -> f x end
lemma ocase_some : forall f:func 'a 'b,d:'b,x:'a.
ocase f d (Some x) = f x
lemma ocase_none : forall f:func 'a 'b,d:'b.
......@@ -24,14 +24,14 @@ module Funcs
ensures { rcompose some (ocase f d) = f }
=
assert { extensionalEqual (rcompose some (ocase f d)) f }
function omap (f:func 'a 'b) (x:option 'a) : option 'b = match x with
| None -> None
| Some x -> Some (f x)
end
function olift (f:func 'a 'b) : func (option 'a) (option 'b) = ocase (compose some f) None
lemma olift_def : forall f:func 'a 'b,x:option 'a. olift f x = omap f x
lemma olift_none : forall f:func 'a 'b. olift f None = None
lemma olift_some : forall f:func 'a 'b,x:'a. olift f (Some x) = Some (f x)
lemma olift_none_inversion : forall f:func 'a 'b,x:option 'a. olift f x = None <-> x = None
......@@ -41,26 +41,25 @@ module Funcs
=
match x with
| None -> ()
| Some x' -> ()
| Some _x' -> ()
end
let lemma olift_identity (u:unit) : unit
ensures { olift (identity:func 'a 'a) = identity }
=
assert { extensionalEqual (olift (identity:func 'a 'a)) identity }
let lemma olift_composition (g:func 'b 'c) (f:func 'a 'b) : unit
ensures { compose (olift g) (olift f) = olift (compose g f) }
=
assert { extensionalEqual (compose (olift g) (olift f)) (olift (compose g f)) }
lemma olift_some_commutation : forall f:func 'a 'b.
compose some f = compose (olift f) some
let lemma olift_update (f:func 'a 'b) (x:'a) (y:'b) : unit
ensures { olift (f[x<-y]) = (olift f)[Some x <- Some y] }
=
assert { extensionalEqual (olift (f[x <- y])) ((olift f)[Some x <- Some y]) }
end
end
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