Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Actris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
Actris
Merge requests
!24
Protocol equivalence
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Protocol equivalence
jonas/iProto_equiv
into
master
Overview
0
Commits
5
Pipelines
0
Changes
5
Merged
Jonas Kastberg
requested to merge
jonas/iProto_equiv
into
master
4 years ago
Overview
0
Commits
5
Pipelines
0
Changes
5
Expand
0
0
Merge request reports
Compare
master
version 3
9a0b7aa7
4 years ago
version 2
dbba0d1c
4 years ago
version 1
ed1617d1
4 years ago
master (base)
and
version 3
latest version
b4f1cb2c
5 commits,
4 years ago
version 3
9a0b7aa7
5 commits,
4 years ago
version 2
dbba0d1c
4 commits,
4 years ago
version 1
ed1617d1
3 commits,
4 years ago
5 files
+
107
−
19
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
theories/channel/channel.v
+
20
−
6
Options
@@ -157,6 +157,22 @@ Section channel.
Proper
((
≡
)
==>
(
≡
)
==>
(
≡
)
==>
(
≡
)
==>
(
≡
))
(
@
iProto_choice
Σ
a
)
.
Proof
.
solve_proper
.
Qed
.
Lemma
iProto_choice_equiv
a1
a2
(
P11
P12
P21
P22
:
iProp
Σ
)
(
p11
p12
p21
p22
:
iProto
Σ
)
:
⌜
a1
=
a2
⌝
-∗
((
P11
≡
P12
):
iProp
Σ
)
-∗
(
P21
≡
P22
)
-∗
▷
(
p11
≡
p12
)
-∗
▷
(
p21
≡
p22
)
-∗
iProto_choice
a1
P11
P21
p11
p21
≡
iProto_choice
a2
P12
P22
p12
p22
.
Proof
.
iIntros
(
->
)
"#HP1 #HP2 #Hp1 #Hp2"
.
rewrite
/
iProto_choice
.
iApply
iProto_message_equiv
;
[
eauto
|
|
]
.
-
iIntros
"!>"
(
b
)
"H"
.
iExists
b
.
iSplit
;
[
done
|
]
.
destruct
b
;
[
iRewrite
-
"HP1"
;
iFrame
"H Hp1"
|
iRewrite
-
"HP2"
;
iFrame
"H Hp2"
]
.
-
iIntros
"!>"
(
b
)
"H"
.
iExists
b
.
iSplit
;
[
done
|
]
.
destruct
b
;
[
iRewrite
"HP1"
;
iFrame
"H Hp1"
|
iRewrite
"HP2"
;
iFrame
"H Hp2"
]
.
Qed
.
Lemma
iProto_dual_choice
a
P1
P2
p1
p2
:
iProto_dual
(
iProto_choice
a
P1
P2
p1
p2
)
≡
iProto_choice
(
action_dual
a
)
P1
P2
(
iProto_dual
p1
)
(
iProto_dual
p2
)
.
@@ -261,10 +277,6 @@ Section channel.
{{{
w
,
RET
w
;
(
⌜
w
=
NONEV
⌝
∗
c
↣
<
?.
.
x
>
MSG
v
x
{{
P
x
}};
p
x
)
∨
(
∃
.
.
x
,
⌜
w
=
SOMEV
(
v
x
)
⌝
∗
c
↣
p
x
∗
P
x
)
}}}
.
Proof
.
assert
(
∀
w
lp
(
m
:
TT
→
iMsg
Σ
),
iMsg_car
(
∃
.
.
x
,
m
x
)
%
msg
w
lp
⊣⊢
(
∃
.
.
x
,
iMsg_car
(
m
x
)
w
lp
))
as
iMsg_texist
.
{
intros
w
lp
m
.
clear
v
P
p
.
rewrite
/
iMsg_texist
iMsg_exist_eq
.
induction
TT
as
[|
T
TT
IH
];
simpl
;
[
done
|]
.
f_equiv
=>
x
.
apply
IH
.
}
rewrite
iProto_mapsto_eq
.
iIntros
(
Φ
)
"Hc HΦ"
.
wp_lam
;
wp_pures
.
iDestruct
"Hc"
as
(
γ
s
l
r
lk
->
)
"[#Hlk H]"
;
wp_pures
.
wp_apply
(
acquire_spec
with
"Hlk"
);
iIntros
"[Hlkd Hinv]"
.
@@ -276,7 +288,8 @@ Section channel.
iExists
γ
,
Left
,
l
,
r
,
lk
.
eauto
10
with
iFrame
.
}
wp_apply
(
lpop_spec
with
"Hr"
);
iIntros
(
v'
)
"[% Hr]"
;
simplify_eq
/=.
iMod
(
iProto_recv_l
with
"Hctx H"
)
as
(
q
)
"(Hctx & H & Hm)"
.
wp_pures
.
rewrite
iMsg_base_eq
.
iDestruct
(
iMsg_texist
with
"Hm"
)
as
(
x
<-
)
"[Hp HP]"
.
rewrite
iMsg_base_eq
.
iDestruct
(
iMsg_texist_exist
with
"Hm"
)
as
(
x
<-
)
"[Hp HP]"
.
wp_apply
(
release_spec
with
"[Hl Hr Hctx $Hlk $Hlkd]"
);
[
by
eauto
with
iFrame
|]
.
iIntros
"_"
.
wp_pures
.
iApply
"HΦ"
.
iRight
.
iExists
x
.
iSplit
;
[
done
|]
.
iFrame
"HP"
.
iExists
γ
,
Left
,
l
,
r
,
lk
.
iSplit
;
[
done
|]
.
iFrame
"Hlk"
.
@@ -288,7 +301,8 @@ Section channel.
iExists
γ
,
Right
,
l
,
r
,
lk
.
eauto
10
with
iFrame
.
}
wp_apply
(
lpop_spec
with
"Hl"
);
iIntros
(
v'
)
"[% Hl]"
;
simplify_eq
/=.
iMod
(
iProto_recv_r
with
"Hctx H"
)
as
(
q
)
"(Hctx & H & Hm)"
.
wp_pures
.
rewrite
iMsg_base_eq
.
iDestruct
(
iMsg_texist
with
"Hm"
)
as
(
x
<-
)
"[Hp HP]"
.
rewrite
iMsg_base_eq
.
iDestruct
(
iMsg_texist_exist
with
"Hm"
)
as
(
x
<-
)
"[Hp HP]"
.
wp_apply
(
release_spec
with
"[Hl Hr Hctx $Hlk $Hlkd]"
);
[
by
eauto
with
iFrame
|]
.
iIntros
"_"
.
wp_pures
.
iApply
"HΦ"
.
iRight
.
iExists
x
.
iSplit
;
[
done
|]
.
iFrame
"HP"
.
iExists
γ
,
Right
,
l
,
r
,
lk
.
iSplit
;
[
done
|]
.
iFrame
"Hlk"
.
Loading