Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dmitry Khalanskiy
Iris
Commits
9459fc48
Commit
9459fc48
authored
Mar 15, 2016
by
Ralf Jung
Browse files
join-exist: prove worker
parent
c731c726
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/joining_existentials.v
View file @
9459fc48
From
iris
.
program_logic
Require
Import
saved_one_shot
hoare
.
From
iris
.
program_logic
Require
Import
saved_one_shot
hoare
tactics
.
From
iris
.
barrier
Require
Import
proof
specification
.
From
iris
.
heap_lang
Require
Import
notation
par
.
Import
uPred
.
Definition
client
eM
eW1
eW2
:
expr
[]
:
=
(
let
:
"b"
:
=
newbarrier
#()
in
(
eM
;;
^
signal
'
"b"
)
||
...
...
@@ -20,9 +21,16 @@ Definition barrier_res γ (P : X → iProp) : iProp :=
Lemma
worker_spec
e
γ
l
(
P
Q
:
X
→
iProp
)
(
R
:
iProp
)
Φ
:
R
⊢
(
∀
x
,
{{
P
x
}}
e
{{
λ
_
,
Q
x
}})
→
R
⊢
(
recv
heapN
N
l
(
barrier_res
γ
P
)
★
(
∀
v
:
val
,
barrier_res
γ
Q
-
★
Φ
v
))
→
R
⊢
WP
^
wait
(%
l
)
;;
e
{{
Φ
}}.
R
⊢
WP
wait
(%
l
)
;;
e
{{
Φ
}}.
Proof
.
Abort
.
intros
He
H
Φ
.
rewrite
-[
R
](
idemp
(
∧
)%
I
)
{
1
}
He
H
Φ
always_and_sep_l
{
He
H
Φ
}.
ewp
(
eapply
wait_spec
).
ecancel
[
recv
_
_
l
_
].
apply
wand_intro_r
.
wp_seq
.
rewrite
/
barrier_res
sep_exist_l
.
apply
exist_elim
=>
x
.
rewrite
(
forall_elim
x
)
/
ht
always_elim
impl_wand
!
assoc
.
to_front
[
P
x
;
_
-
★
_
]%
I
.
rewrite
wand_elim_r
!
wp_frame_r
.
apply
wp_mono
=>
v
.
rewrite
(
forall_elim
v
).
rewrite
-(
exist_intro
x
).
to_front
[
one_shot_own
_
_;
Q
_
].
by
rewrite
wand_elim_r
.
Qed
.
Context
(
P'
:
iProp
)
(
P
P1
P2
Q
Q1
Q2
:
X
→
iProp
).
Context
{
P_split
:
(
∃
x
:
X
,
P
x
)
⊢
((
∃
x
:
X
,
P1
x
)
★
(
∃
x
:
X
,
P2
x
))}.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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