Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
Actris
Commits
67ddad0c
Commit
67ddad0c
authored
Apr 12, 2019
by
Jonas Kastberg Hinrichsen
Browse files
Receive session type spec done
parent
a6ab449f
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/logrel.v
View file @
67ddad0c
...
...
@@ -215,7 +215,8 @@ Section logrel.
Lemma
try_recv_vs
c
γ
s
(
P
:
val
→
Prop
)
st
E
:
↑
N
⊆
E
→
⟦
c
@
s
:
TRecv
P
st
⟧
{
γ
}
={
E
,
E
∖↑
N
}=
∗
⟦
c
@
s
:
TRecv
P
st
⟧
{
γ
}
={
E
,
E
∖↑
N
}=
∗
∃
l
r
,
chan_frag
(
st_c_name
γ
)
c
l
r
∗
(
▷
((
try_recv_fail
(
st_c_name
γ
)
c
l
r
(
to_side
s
)
={
E
∖↑
N
,
E
}=
∗
⟦
c
@
s
:
TRecv
P
st
⟧
{
γ
})
∧
...
...
@@ -299,4 +300,25 @@ Section logrel.
iModIntro
.
iExists
_
.
iSplit
=>
//.
Qed
.
Lemma
recv_st_spec
st
γ
c
s
(
P
:
val
→
Prop
)
:
{{{
⟦
c
@
s
:
TRecv
P
st
⟧
{
γ
}
}}}
recv
c
(
to_side
s
)
{{{
v
,
RET
v
;
⟦
c
@
s
:
st
v
⟧
{
γ
}
∗
⌜
P
v
⌝
}}}.
Proof
.
iIntros
(
Φ
)
"Hrecv HΦ"
.
iL
ö
b
as
"IH"
.
wp_rec
.
wp_apply
(
try_recv_st_spec
with
"Hrecv"
).
iIntros
(
v
)
"H"
.
iDestruct
"H"
as
"[H | H]"
.
-
iDestruct
"H"
as
"[Hv H]"
.
iDestruct
"Hv"
as
%->.
wp_pures
.
iApply
(
"IH"
with
"[H]"
)=>
//.
-
iDestruct
"H"
as
(
w
)
"[Hv H]"
.
iDestruct
"Hv"
as
%->.
wp_pures
.
iApply
"HΦ"
.
iFrame
.
Qed
.
End
logrel
.
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment