Commit 92211e8b authored by Léon Gondelman's avatar Léon Gondelman

mini-compiler : fully automatic proof of compilation for arithmetic expressions

parent 1469c893
......@@ -81,8 +81,8 @@ theory Vm "Virtual Machine for IMP language"
| Iconst int (* push n on stack *)
| Ivar id (* push the value of variable *)
| Isetvar id (* pop an integer, assign it to variable *)
| Ibranch_fwd pos (* skip ofs instructions forward *)
| Ibranch_bwd pos (* skip ofs instructions backward *)
| Ibranch pos (* skip ofs instructions *)
(*| Ibranch_bwd pos (* skip ofs instructions backward *)*)
| Iadd (* pop two values, push their sum *)
| Isub (* pop two values, push their difference *)
| Imul (* pop two values, push their product *)
......@@ -123,8 +123,8 @@ theory Vm "Virtual Machine for IMP language"
function ible (ofs:int) : code = Cons (Ible ofs) Nil
function ibne (ofs:int) : code = Cons (Ibne ofs) Nil
function ibgt (ofs:int) : code = Cons (Ibgt ofs) Nil
function ibranchf (ofs: int) : code = Cons (Ibranch_fwd ofs) Nil
function ibranchb (ofs: int) : code = Cons (Ibranch_bwd ofs) Nil
function ibranch (ofs: int) : code = Cons (Ibranch ofs) Nil
(*function ibranchb (ofs: int) : code = Cons (Ibranch_bwd ofs) Nil*)
constant ihalt : code = (Cons Ihalt Nil)
(* The semantics of the virtual machine is given in small-step style,
......@@ -221,21 +221,21 @@ theory Vm "Virtual Machine for IMP language"
(VMS p2 s m)
| trans_branch_fwd:
| trans_branch:
forall c: code, p ofs: pos.
codeseq_at c p (ibranchf ofs) ->
codeseq_at c p (ibranch ofs) ->
forall m: state, s: stack.
transition c
(VMS p s m)
(VMS (p + 1 + ofs) s m)
| trans_branch_bwd:
(* | trans_branch_bwd:
forall c: code, p ofs: pos.
codeseq_at c p (ibranchb ofs) ->
forall m: state, s: stack.
transition c
(VMS p s m)
(VMS (p + 1 - ofs) s m)
(VMS (p + 1 - ofs) s m) *)
......
......@@ -6,28 +6,28 @@
<prover id="1" name="Alt-Ergo" version="0.95.2" timelimit="5" memlimit="1000"/>
<prover id="2" name="Vampire" version="0.6" timelimit="5" memlimit="1000"/>
<file name="../vm.mlw" expanded="true">
<theory name="ReflTransClosure" expanded="true">
<goal name="transZero" sum="5f576931016c6e98a82af4eb636fe96b" expanded="true">
<theory name="ReflTransClosure" sum="858a40c1dde55e8befdaee8ae005e423">
<goal name="transZero">
<proof prover="0"><result status="valid" time="0.00"/></proof>
</goal>
<goal name="transOne" sum="82b3748ce6112311cfc4ad0fed4a6acb">
<goal name="transOne">
<proof prover="0"><result status="valid" time="0.04"/></proof>
</goal>
<goal name="transition_star_one" sum="38add69295b2304d8481416ed2bc245d">
<goal name="transition_star_one">
<proof prover="0"><result status="valid" time="0.00"/></proof>
</goal>
<goal name="WP_parameter trans_star" expl="VC for trans_star" sum="810b09de5d400a18ebdbff965c9e4a3b">
<goal name="WP_parameter trans_star" expl="VC for trans_star">
<proof prover="1"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="transition_star_transitive" sum="4e21189c07ea29a045e6b2320a077ab7">
<goal name="transition_star_transitive">
<proof prover="1"><result status="valid" time="0.02"/></proof>
</goal>
</theory>
<theory name="Vm" expanded="true">
<goal name="codeseq_at_app_right" sum="0b8a571ad0b8d9ed101bbce6ac5b93ed" expanded="true">
<theory name="Vm" sum="030cc7eb9172e9aca56370af11cf7236" expanded="true">
<goal name="codeseq_at_app_right">
<proof prover="2"><result status="valid" time="0.28"/></proof>
</goal>
<goal name="codeseq_at_app_left" sum="43d50744644159935e1cbb0a6447b570" expanded="true">
<goal name="codeseq_at_app_left">
<proof prover="0"><result status="valid" time="0.01"/></proof>
</goal>
</theory>
......
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