Skip to content
Snippets Groups Projects
Commit f5bd0369 authored by Jonas Kastberg Hinrichsen's avatar Jonas Kastberg Hinrichsen
Browse files

Changed branching to be over sides

parent 3fa2232a
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ Section branching_specs. ...@@ -57,7 +57,7 @@ Section branching_specs.
then "b1" then "b1"
else "b2". else "b2".
Lemma select_st_spec st1 st2 γ c s (b : bool) : Lemma select_st_spec st1 st2 γ c s (b : side) :
{{{ c @ s : st1 <+> st2 {N,γ} }}} {{{ c @ s : st1 <+> st2 {N,γ} }}}
select c #s #b select c #s #b
{{{ RET #(); c @ s : (if b then st1 else st2) {N,γ} }}}. {{{ RET #(); c @ s : (if b then st1 else st2) {N,γ} }}}.
...@@ -68,7 +68,7 @@ Section branching_specs. ...@@ -68,7 +68,7 @@ Section branching_specs.
wp_apply (send_st_spec N bool with "[$Hst //]"); wp_apply (send_st_spec N bool with "[$Hst //]");
iIntros "Hstl". iIntros "Hstl".
iApply "HΦ". iApply "HΦ".
eauto. by destruct b.
Qed. Qed.
Lemma branch_st_spec st1 st2 γ c s (b1 b2 : val) Φ : Lemma branch_st_spec st1 st2 γ c s (b1 b2 : val) Φ :
......
...@@ -14,14 +14,14 @@ Section BranchingExampleProofs. ...@@ -14,14 +14,14 @@ Section BranchingExampleProofs.
{{{ True }}} {{{ True }}}
branch_example b branch_example b
{{{ v, RET v; match b with {{{ v, RET v; match b with
| true => v = #5 | Left => v = #5
| false => v = #() | Right => v = #()
end }}}. end }}}.
Proof. Proof.
iIntros (Φ H) "HΦ". iIntros (Φ H) "HΦ".
rewrite /branch_example. rewrite /branch_example.
wp_apply (new_chan_st_spec N wp_apply (new_chan_st_spec N
((<?> v @ v = 5, TEnd) <+> (TEnd)))=> //; ((<?> v @ v = 5, TEnd) <+> (TEnd)))=> //;
iIntros (c γ) "[Hstl Hstr]". iIntros (c γ) "[Hstl Hstr]".
wp_apply (select_st_spec with "Hstl"); wp_apply (select_st_spec with "Hstl");
iIntros "Hstl". iIntros "Hstl".
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment