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
Viewing commit
c676b529
Prev
Next
Show latest version
5 files
+
81
−
48
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
c676b529
Made equivalence lemma more applicable using typeclass resolution
· c676b529
Jonas Kastberg
authored
4 years ago
theories/channel/channel.v
+
4
−
6
Options
@@ -299,10 +299,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]"
.
@@ -314,7 +310,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"
.
@@ -326,7 +323,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