Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not merge] semantics-refactor #14

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
relations on suspended continuations
Andres Erbsen committed Jun 20, 2018
commit 7906d2023d7dfb5cbe242782a6b169d5619f5617
11 changes: 11 additions & 0 deletions src/ExprImp.v
Original file line number Diff line number Diff line change
@@ -64,6 +64,17 @@ Section ExprImp1.
| CSeq(s1:cont) (s2: stmt)
| CStack(st: state)(c: cont)(binds rets: list var).
End cont. Arguments cont : clear implicits.
Lemma cont_uninhabited (T:Set) (_:T -> False) (X : cont T) : False. Proof. induction X; eauto. Qed.
Fixpoint lift_cont {A B : Set} (P : A -> B -> Prop) (a : cont A) (b : cont B) {struct a} :=
match a, b with
| CSuspended a, CSuspended b =>
P a b
| CSeq a sa, CSeq b sb =>
lift_cont P a b /\ sa = sb
| CStack sta a ba ra, CStack stb b bb rb =>
(forall vss, agree_on sta vss stb) /\ lift_cont P a b /\ ba = bb /\ ra = rb
| _, _ => False
end.

Definition ioact : Set := (list var * ioaction * list (word (wXLEN))).
Definition ioret : Set := (list var * list (word wXLEN)).