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
a6ab449f
Commit
a6ab449f
authored
Apr 12, 2019
by
Jonas Kastberg Hinrichsen
Browse files
Defined try_recv_spec
parent
ca39cace
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/logrel.v
View file @
a6ab449f
...
...
@@ -271,4 +271,32 @@ Section logrel.
by
iFrame
(
HP
)
"Hcctx Hinv"
.
Qed
.
Lemma
try_recv_st_spec
st
γ
c
s
(
P
:
val
→
Prop
)
:
{{{
⟦
c
@
s
:
TRecv
P
st
⟧
{
γ
}
}}}
try_recv
c
(
to_side
s
)
{{{
v
,
RET
v
;
(
⌜
v
=
NONEV
⌝
∧
⟦
c
@
s
:
TRecv
P
st
⟧
{
γ
})
∨
(
∃
w
,
⌜
v
=
SOMEV
w
⌝
∧
⟦
c
@
s
:
st
w
⟧
{
γ
}
∗
⌜
P
w
⌝
)}}}.
Proof
.
iIntros
(
Φ
)
"Hrecv HΦ"
.
iApply
(
try_recv_spec
with
"[#]"
).
{
destruct
s
.
by
left
.
by
right
.
}
{
iDestruct
"Hrecv"
as
"[? [$ ?]]"
.
}
iMod
(
try_recv_vs
with
"Hrecv"
)
as
(
ls
lr
)
"[Hch H]"
;
first
done
.
iModIntro
.
iExists
ls
,
lr
.
iFrame
"Hch"
.
iIntros
"!>"
.
iIntros
(
v
)
"Hupd"
.
iApply
"HΦ"
.
destruct
v
;
try
by
iDestruct
"Hupd"
as
%
Hupd
;
inversion
Hupd
.
-
destruct
v
;
try
by
iDestruct
"Hupd"
as
%
Hupd
;
inversion
Hupd
.
destruct
l
;
try
by
iDestruct
"Hupd"
as
%
Hupd
;
inversion
Hupd
.
simpl
.
iLeft
.
iDestruct
"H"
as
"[H _]"
.
iMod
(
"H"
with
"Hupd"
)
as
"H"
.
iModIntro
.
iSplit
=>
//.
-
simpl
.
iRight
.
iDestruct
"H"
as
"[_ H]"
.
iMod
(
"H"
with
"Hupd"
)
as
"H"
.
iModIntro
.
iExists
_
.
iSplit
=>
//.
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