Commit 504531e0 authored by Martin Clochard's avatar Martin Clochard

in progress: formalization of why3 logic

parent 57d26f38
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!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.99.1" timelimit="5" memlimit="1000"/>
<prover id="1" name="CVC3" version="2.4.1" timelimit="5" memlimit="1000"/>
<prover id="2" name="Z3" version="4.3.1" timelimit="5" memlimit="1000"/>
<file name="../logic_typing.mlw" expanded="true">
<theory name="Env" sum="c9b6dd55389ebfd832ea23fa9c6a7092" expanded="true">
<goal name="WP_parameter constr_ty_list_length_nth" expl="VC for constr_ty_list_length_nth" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter constr_ty_list_length_nth.1" expl="1. variant decrease">
<proof prover="0"><result status="valid" time="0.09" steps="2"/></proof>
</goal>
<goal name="WP_parameter constr_ty_list_length_nth.2" expl="2. precondition">
<proof prover="0"><result status="valid" time="0.05" steps="2"/></proof>
</goal>
<goal name="WP_parameter constr_ty_list_length_nth.3" expl="3. postcondition" expanded="true">
<proof prover="1"><result status="valid" time="0.66"/></proof>
</goal>
<goal name="WP_parameter constr_ty_list_length_nth.4" expl="4. postcondition">
<proof prover="0"><result status="valid" time="0.10" steps="7"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter ty_wf_independence" expl="VC for ty_wf_independence">
<proof prover="0"><result status="valid" time="0.08" steps="47"/></proof>
</goal>
<goal name="WP_parameter tyl_wf_independence" expl="VC for tyl_wf_independence">
<proof prover="0"><result status="valid" time="0.08" steps="76"/></proof>
</goal>
<goal name="WP_parameter ty_wf_subst" expl="VC for ty_wf_subst">
<proof prover="0"><result status="valid" time="0.14" steps="136"/></proof>
</goal>
<goal name="WP_parameter tyl_wf_subst" expl="VC for tyl_wf_subst">
<proof prover="0"><result status="valid" time="0.34" steps="221"/></proof>
</goal>
</theory>
<theory name="Pattern" sum="92dff16c51685f061e7216d7ae6d75f1">
<goal name="WP_parameter pat_ty_collector_dom" expl="VC for pat_ty_collector_dom">
<proof prover="0"><result status="valid" time="0.85" steps="964"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom" expl="VC for patl_ty_collector_dom">
<transf name="split_goal_wp">
<goal name="WP_parameter patl_ty_collector_dom.1" expl="1. variant decrease">
<proof prover="0"><result status="valid" time="0.08" steps="24"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.2" expl="2. precondition">
<proof prover="0"><result status="valid" time="0.07" steps="13"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.3" expl="3. precondition">
<proof prover="0"><result status="valid" time="0.08" steps="13"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.4" expl="4. variant decrease">
<proof prover="0"><result status="valid" time="0.07" steps="27"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.5" expl="5. precondition">
<proof prover="0"><result status="valid" time="0.07" steps="18"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.6" expl="6. precondition">
<proof prover="0"><result status="valid" time="0.08" steps="18"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.7" expl="7. assertion">
<transf name="split_goal_wp">
<goal name="WP_parameter patl_ty_collector_dom.7.1" expl="1. assertion">
<proof prover="0"><result status="valid" time="0.06" steps="0"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.7.2" expl="2. assertion">
<proof prover="0"><result status="valid" time="0.09" steps="76"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.7.3" expl="3. assertion">
<proof prover="0"><result status="valid" time="0.10" steps="0"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.7.4" expl="4. assertion">
<proof prover="0"><result status="valid" time="0.09" steps="64"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.7.5" expl="5. assertion">
<proof prover="0"><result status="valid" time="0.06" steps="0"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.7.6" expl="6. assertion">
<proof prover="0"><result status="valid" time="0.07" steps="64"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.7.7" expl="7. assertion">
<proof prover="0"><result status="valid" time="0.08" steps="51"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.8" expl="8. postcondition">
<proof prover="0"><result status="valid" time="0.08" steps="32"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.9" expl="9. assertion">
<proof prover="0"><result status="valid" time="0.07" steps="0"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.10" expl="10. postcondition">
<proof prover="0"><result status="valid" time="0.08" steps="11"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.11" expl="11. postcondition">
<proof prover="0"><result status="valid" time="0.13" steps="10"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.12" expl="12. assertion">
<proof prover="0"><result status="valid" time="0.06" steps="0"/></proof>
</goal>
<goal name="WP_parameter patl_ty_collector_dom.13" expl="13. postcondition">
<proof prover="0"><result status="valid" time="0.12" steps="20"/></proof>
</goal>
</transf>
</goal>
</theory>
<theory name="Term" sum="e9e65ea0476b241aba871f9ce9907bb3">
<goal name="WP_parameter env_extension_wf" expl="VC for env_extension_wf">
<transf name="split_goal_wp">
<goal name="WP_parameter env_extension_wf.1" expl="1. assertion">
<transf name="split_goal_wp">
<goal name="WP_parameter env_extension_wf.1.1" expl="1.">
<proof prover="0"><result status="valid" time="0.10" steps="19"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.1.2" expl="2.">
<proof prover="0"><result status="valid" time="0.13" steps="15"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.1.3" expl="3.">
<proof prover="1"><result status="valid" time="0.26"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.1.4" expl="4.">
<proof prover="1"><result status="valid" time="0.25"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.1.5" expl="5.">
<proof prover="0"><result status="valid" time="0.18" steps="21"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.1.6" expl="6.">
<proof prover="0"><result status="valid" time="0.16" steps="22"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.1.7" expl="7.">
<proof prover="0"><result status="valid" time="0.09" steps="23"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.1.8" expl="8.">
<proof prover="0"><result status="valid" time="0.09" steps="24"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter env_extension_wf.2" expl="2. postcondition">
<transf name="introduce_premises">
<goal name="WP_parameter env_extension_wf.2.1" expl="1. postcondition">
<transf name="inline_goal">
<goal name="WP_parameter env_extension_wf.2.1.1" expl="1. postcondition">
<transf name="split_goal_wp">
<goal name="WP_parameter env_extension_wf.2.1.1.1" expl="1.">
<proof prover="0"><result status="valid" time="0.12" steps="18"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.2" expl="2.">
<proof prover="0"><result status="valid" time="0.10" steps="15"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.3" expl="3.">
<proof prover="0"><result status="valid" time="0.11" steps="16"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.4" expl="4.">
<proof prover="0"><result status="valid" time="0.13" steps="22"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.5" expl="5.">
<proof prover="0"><result status="valid" time="0.14" steps="37"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.6" expl="6.">
<proof prover="0"><result status="valid" time="0.12" steps="23"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.7" expl="7.">
<proof prover="0"><result status="valid" time="0.12" steps="24"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.8" expl="8.">
<proof prover="0"><result status="valid" time="0.09" steps="28"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.9" expl="9.">
<proof prover="2"><result status="valid" time="0.44"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.10" expl="10.">
<proof prover="0"><result status="valid" time="0.11" steps="22"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.11" expl="11.">
<proof prover="0"><result status="valid" time="0.17" steps="23"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.12" expl="12.">
<proof prover="0"><result status="valid" time="0.11" steps="18"/></proof>
</goal>
<goal name="WP_parameter env_extension_wf.2.1.1.13" expl="13.">
<proof prover="0"><result status="valid" time="0.16" steps="18"/></proof>
</goal>
</transf>
</goal>
</transf>
</goal>
</transf>
</goal>
</transf>
</goal>
</theory>
</file>
</why3session>
......@@ -49,6 +49,54 @@ module HO
= extensionality (compose g (ho_ite p t e))
(ho_ite p (compose g t) (compose g e))
function update (f:'a -> 'b) (x:'a) (y:'b) : 'a -> 'b =
\z. if z = x then y else f z
function ([ <- ]) (f:'a -> 'b) (x:'a) (y:'b) : 'a -> 'b = update f x y
constant all : 'a -> bool = \_.true
function union (a b:'a -> bool) : 'a -> bool = \x. a x \/ b x
use import int.Int
function range (a b:int) : int -> bool = \x. a <= x < b
use import list.List
use import list.Nth
use import list.NthLength
use import option.Option
function list_nth (l:list 'a) (d:int -> 'a) : int -> 'a =
\n. match nth n l with
| None -> d n
| Some x -> x
end
end
module PartialMap
use import HO
use import option.Option
type pmap 'a 'b = 'a -> option 'b
function extend (m1:'a -> option 'b) (m2:'a -> option 'b) : 'a -> option 'b =
\x. match m1 x with
| None -> m2 x
| s -> s
end
function domain (m:'a -> option 'b) : 'a -> bool =
\x. m x <> None
function complete (m:'a -> option 'b) (d:'a -> 'b) : 'a -> 'b =
\x. match m x with
| None -> d x
| Some x -> x
end
end
module Bind
......@@ -112,11 +160,12 @@ module Choice
function choice (p:'a -> bool) : 'a
lemma choice_def : forall p:'a -> bool. (exists x. p x) -> p (choice p)
axiom choice_def : forall p:'a -> bool. (exists x. p x) -> p (choice p)
val choice_def (p:'a -> bool) : unit
let choice_def (p:'a -> bool) : unit
requires { exists x. p x }
ensures { p (choice p) }
= ()
end
......
......@@ -2,10 +2,11 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="CVC3" version="2.4.1" timelimit="5" memlimit="1000"/>
<prover id="1" name="CVC4" version="1.4" timelimit="5" memlimit="1000"/>
<prover id="2" name="Spass" version="3.7" timelimit="5" memlimit="1000"/>
<prover id="3" name="Alt-Ergo" version="0.95.2" timelimit="5" memlimit="1000"/>
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" memlimit="1000"/>
<prover id="1" name="CVC3" version="2.4.1" timelimit="5" memlimit="1000"/>
<prover id="2" name="CVC4" version="1.4" timelimit="5" memlimit="1000"/>
<prover id="3" name="Z3" version="4.3.1" timelimit="5" memlimit="1000"/>
<prover id="4" name="Alt-Ergo" version="0.95.2" timelimit="5" memlimit="1000"/>
<file name="../support.mlw" expanded="true">
<theory name="HO" sum="cacf043d990e8fc0b8032e0b3427633c">
<goal name="WP_parameter extensionality" expl="VC for extensionality">
......@@ -13,74 +14,77 @@
<goal name="WP_parameter extensionality.1" expl="1. assertion">
<transf name="inline_goal">
<goal name="WP_parameter extensionality.1.1" expl="1. assertion">
<proof prover="3"><result status="valid" time="0.01" steps="1"/></proof>
<proof prover="4"><result status="valid" time="0.01" steps="1"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter extensionality.2" expl="2. postcondition">
<proof prover="3"><result status="valid" time="0.01" steps="4"/></proof>
<proof prover="4"><result status="valid" time="0.01" steps="4"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter compose_associative" expl="VC for compose_associative">
<proof prover="3"><result status="valid" time="0.01" steps="7"/></proof>
<proof prover="4"><result status="valid" time="0.01" steps="7"/></proof>
</goal>
<goal name="WP_parameter id_neutral" expl="VC for id_neutral">
<proof prover="3"><result status="valid" time="0.01" steps="43"/></proof>
<proof prover="4"><result status="valid" time="0.01" steps="43"/></proof>
</goal>
<goal name="WP_parameter compose_const_right" expl="VC for compose_const_right">
<proof prover="3"><result status="valid" time="0.01" steps="6"/></proof>
<proof prover="4"><result status="valid" time="0.01" steps="6"/></proof>
</goal>
<goal name="WP_parameter compose_const_left" expl="VC for compose_const_left">
<proof prover="3"><result status="valid" time="0.01" steps="6"/></proof>
<proof prover="4"><result status="valid" time="0.01" steps="6"/></proof>
</goal>
<goal name="WP_parameter ho_ite_compose_left" expl="VC for ho_ite_compose_left">
<proof prover="3"><result status="valid" time="0.02" steps="13"/></proof>
<proof prover="4"><result status="valid" time="0.02" steps="13"/></proof>
</goal>
</theory>
<theory name="Bind" sum="052c79c65246d9ae2ba93971e7aa46ab">
<theory name="PartialMap" sum="d41d8cd98f00b204e9800998ecf8427e" expanded="true">
</theory>
<theory name="Bind" sum="2ac974e6f1a13d733b204142230df4fe">
<goal name="WP_parameter bfold_identity" expl="VC for bfold_identity">
<proof prover="3"><result status="valid" time="0.04" steps="36"/></proof>
<proof prover="0"><result status="valid" time="0.04" steps="34"/></proof>
</goal>
<goal name="WP_parameter bfold_compose" expl="VC for bfold_compose">
<transf name="split_goal_wp">
<goal name="WP_parameter bfold_compose.1" expl="1. assertion">
<transf name="split_goal_wp">
<goal name="WP_parameter bfold_compose.1.1" expl="1. assertion">
<proof prover="3"><result status="valid" time="0.01" steps="31"/></proof>
<proof prover="0"><result status="valid" time="0.01" steps="19"/></proof>
</goal>
<goal name="WP_parameter bfold_compose.1.2" expl="2. assertion">
<proof prover="3"><result status="valid" time="0.01" steps="2"/></proof>
<proof prover="0"><result status="valid" time="0.01" steps="2"/></proof>
</goal>
<goal name="WP_parameter bfold_compose.1.3" expl="3. assertion">
<proof prover="3"><result status="valid" time="0.02" steps="29"/></proof>
<proof prover="0"><result status="valid" time="0.02" steps="24"/></proof>
</goal>
<goal name="WP_parameter bfold_compose.1.4" expl="4. assertion">
<proof prover="3"><result status="valid" time="0.01" steps="2"/></proof>
<proof prover="0"><result status="valid" time="0.01" steps="1"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter bfold_compose.2" expl="2. postcondition">
<proof prover="2"><result status="valid" time="0.06"/></proof>
<proof prover="3"><result status="valid" time="0.14"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter bfold_constructor" expl="VC for bfold_constructor">
<proof prover="3"><result status="valid" time="0.01" steps="23"/></proof>
<proof prover="0"><result status="valid" time="0.01" steps="35"/></proof>
</goal>
<goal name="bmap_compose">
<proof prover="0"><result status="unknown" time="0.84"/></proof>
<proof prover="1"><result status="valid" time="0.09"/></proof>
<proof prover="3"><result status="unknown" time="0.00"/></proof>
<proof prover="2"><result status="valid" time="0.09"/></proof>
</goal>
<goal name="bmap_id">
<proof prover="0"><result status="valid" time="0.02"/></proof>
<proof prover="1"><result status="valid" time="0.02"/></proof>
</goal>
<goal name="close_fold">
<proof prover="3"><result status="valid" time="0.01" steps="7"/></proof>
<proof prover="0"><result status="valid" time="0.01" steps="7"/></proof>
</goal>
</theory>
<theory name="Choice" sum="d41d8cd98f00b204e9800998ecf8427e" expanded="true">
<theory name="Choice" sum="68e1b9014aa75a68b118b93980778ee0">
<goal name="WP_parameter choice_def" expl="VC for choice_def">
<proof prover="0"><result status="valid" time="0.02" steps="2"/></proof>
</goal>
</theory>
</file>
</why3session>
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