Skip to content
Snippets Groups Projects
Commit 4dc8fc9d authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Experiment.

parent 51ce4688
No related branches found
No related tags found
1 merge request!2Subprotocols with message swapping
...@@ -811,18 +811,11 @@ Section proto. ...@@ -811,18 +811,11 @@ Section proto.
iApply (proto_interp_le_l with "[H] Hle"). by iApply proto_interp_flip. iApply (proto_interp_le_l with "[H] Hle"). by iApply proto_interp_flip.
Qed. Qed.
(*
Lemma wtf a p1 pc2 :
▷ iProto_le p1 (proto_message a pc2) -∗
◇ ∃ pc2', iProto_le p1 (proto_message a pc2') ∧ ▷ ∀ v pc', pc2 v pc' ≡ pc2' v pc'.
Proof. Admitted.
*)
Lemma proto_interp_send vl pcl vsl vsr pl pr pl' : Lemma proto_interp_send vl pcl vsl vsr pl pr pl' :
proto_interp vsl vsr pl pr -∗ proto_interp vsl vsr pl pr -∗
iProto_le pl (proto_message Send pcl) -∗ iProto_le pl (proto_message Send pcl) -∗
pcl vl (proto_eq_next pl') -∗ pcl vl (proto_eq_next pl') -∗
proto_interp (vsl ++ [vl]) vsr pl' pr. ▷^(length vsr) proto_interp (vsl ++ [vl]) vsr pl' pr.
Proof. Proof.
iIntros "H Hle". iDestruct (proto_interp_le_l with "H Hle") as "H". iIntros "H Hle". iDestruct (proto_interp_le_l with "H Hle") as "H".
clear pl. iIntros "Hpcl". remember (length vsl + length vsr) as n eqn:Hn. clear pl. iIntros "Hpcl". remember (length vsl + length vsr) as n eqn:Hn.
...@@ -837,21 +830,21 @@ Section proto. ...@@ -837,21 +830,21 @@ Section proto.
rewrite proto_eq_next_dual. iFrame "Hpcl". iApply proto_interp_nil. rewrite proto_eq_next_dual. iFrame "Hpcl". iApply proto_interp_nil.
- iDestruct "H" as (vl' vsl' pc' pr' ->) "(Hpr & Hpc' & H)". - iDestruct "H" as (vl' vsl' pc' pr' ->) "(Hpr & Hpc' & H)".
iDestruct ("IH" with "[%] [//] H Hpcl") as "H"; [simpl; lia|]. iDestruct ("IH" with "[%] [//] H Hpcl") as "H"; [simpl; lia|].
iApply (proto_interp_le_r with "[-Hpr] Hpr"); clear pr. iNext. iApply (proto_interp_le_r with "[-Hpr] Hpr"); clear pr.
iApply proto_interp_unfold. iRight; iLeft. iApply proto_interp_unfold. iRight; iLeft.
iExists vl', (vsl' ++ [vl]), pc', pr'. iFrame. iExists vl', (vsl' ++ [vl]), pc', pr'. iFrame.
iSplit; [done|]. iApply iProto_le_refl. iSplit; [done|]. iApply iProto_le_refl.
- iDestruct "H" as (vr' vsr' pc' pl'' ->) "(Hle & Hpcl' & H)". - iDestruct "H" as (vr' vsr' pc' pl'' ->) "(Hle & Hpcl' & H) /=".
iDestruct (iProto_le_send_inv with "Hle") as (a pcl') "[Hpc Hle]". iDestruct (iProto_le_send_inv with "Hle") as (a pcl') "[Hpc Hle]".
iDestruct (proto_message_equivI with "Hpc") as (<-) "Hpc". iDestruct (proto_message_equivI with "Hpc") as (<-) "Hpc".
iRewrite ("Hpc" $! vr' (proto_eq_next pl'')) in "Hpcl'"; clear pc'. iRewrite ("Hpc" $! vr' (proto_eq_next pl'')) in "Hpcl'"; clear pc'.
iDestruct ("Hle" with "Hpcl' Hpcl") iDestruct ("Hle" with "Hpcl' Hpcl")
as (pc1 pc2 pc') "(Hpl'' & Hpl' & Hpc1 & Hpc2)". as (pc1 pc2 pt) "(Hpl'' & Hpl' & Hpc1 & Hpc2)".
(* STUCK HERE iNext. iDestruct (proto_interp_le_l with "H Hpl''") as "H".
iMod (wtf with "Hpl''") as (pc1') "[Hpl'' #Hpc]". iDestruct ("IH" with "[%] [//] H Hpc1") as "H"; [simpl; lia|..].
iDestruct (proto_interp_le_l with "H Hpl''") as "H". iNext. iApply proto_interp_unfold. iRight; iRight.
iDestruct ("IH" with "[%] [//] H [Hpc1]") as "H"; [simpl; lia|..]. iExists vr', vsr', _, pt. iSplit; [done|]. by iFrame.
*) Admitted. Qed.
Lemma proto_interp_recv vl vsl vsr pl pr pcr : Lemma proto_interp_recv vl vsl vsr pl pr pcr :
proto_interp (vl :: vsl) vsr pl pr -∗ proto_interp (vl :: vsl) vsr pl pr -∗
......
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