Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jonas Kastberg
iris
Commits
c1449e94
Commit
c1449e94
authored
Jan 24, 2019
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make wp_par usable
parent
6d15d440
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
theories/heap_lang/lib/increment.v
theories/heap_lang/lib/increment.v
+1
-1
theories/heap_lang/lib/par.v
theories/heap_lang/lib/par.v
+3
-1
No files found.
theories/heap_lang/lib/increment.v
View file @
c1449e94
...
...
@@ -155,7 +155,7 @@ Section increment_client.
(* The continuation: From after the atomic triple to the postcondition of the WP *)
done
.
}
wp_apply
par
_spec
;
wp_pures
.
wp_apply
wp_
par
.
-
iAssumption
.
-
iAssumption
.
-
iIntros
(??)
"_ !>"
.
done
.
...
...
theories/heap_lang/lib/par.v
View file @
c1449e94
...
...
@@ -12,6 +12,8 @@ Definition par : val :=
let
:
"v1"
:
=
join
"handle"
in
(
"v1"
,
"v2"
).
Notation
"e1 ||| e2"
:
=
(
par
(
λ
:
<>,
e1
)%
E
(
λ
:
<>,
e2
)%
E
)
:
expr_scope
.
(* Not a value itself, but with *unlocked* value lambdas. *)
Local
Notation
"e1 ||| e2"
:
=
(
par
(
LamV
BAnon
e1
%
E
)
(
LamV
BAnon
e2
%
E
))
:
val_scope
.
Section
proof
.
Local
Set
Default
Proof
Using
"Type*"
.
...
...
@@ -37,7 +39,7 @@ Qed.
Lemma
wp_par
(
Ψ
1
Ψ
2
:
val
→
iProp
Σ
)
(
e1
e2
:
expr
)
(
Φ
:
val
→
iProp
Σ
)
:
WP
e1
{{
Ψ
1
}}
-
∗
WP
e2
{{
Ψ
2
}}
-
∗
(
∀
v1
v2
,
Ψ
1
v1
∗
Ψ
2
v2
-
∗
▷
Φ
(
v1
,
v2
)%
V
)
-
∗
WP
e1
|||
e2
{{
Φ
}}.
WP
(
e1
|||
e2
)%
V
{{
Φ
}}.
Proof
.
iIntros
"H1 H2 H"
.
wp_apply
(
par_spec
Ψ
1
Ψ
2
with
"[H1] [H2] [H]"
)
;
[
by
wp_lam
..|
auto
].
...
...
Write
Preview
Markdown
is supported
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