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
c
Commits
6885df92
Commit
6885df92
authored
Jun 17, 2018
by
Léon Gondelman
Browse files
Add a stronger rule for a_load_spec, which quantifies existentially over the fraction 'q'.
parent
1381c0cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/c_translation/translation.v
View file @
6885df92
...
...
@@ -133,14 +133,16 @@ Section proofs.
iPureIntro
.
apply
lvl_included
.
destruct
b'
;
eauto
.
Qed
.
Lemma
a_load_spec
R
Φ
q
e
:
awp
e
R
(
λ
v
,
∃
(
l
:
loc
)
(
w
:
val
),
⌜
v
=
#
l
⌝
∗
l
↦
U
{
q
}
w
∗
(
l
↦
U
{
q
}
w
-
∗
Φ
w
))
-
∗
Lemma
a_load_spec_exists_frac
R
Φ
e
:
awp
e
R
(
λ
v
,
∃
(
l
:
loc
)
(
q
:
frac
)
(
w
:
val
),
⌜
v
=
#
l
⌝
∗
l
↦
U
{
q
}
w
∗
(
l
↦
U
{
q
}
w
-
∗
Φ
w
))
-
∗
awp
(
a_load
e
)
R
Φ
.
Proof
.
iIntros
"H"
.
awp_apply
(
a_wp_awp
with
"H"
)
;
iIntros
(
v
)
"H"
.
awp_lam
.
iIntros
"H"
.
awp_apply
(
a_wp_awp
with
"H"
)
;
iIntros
(
v
)
"H"
.
awp_lam
.
iApply
awp_bind
.
iApply
(
awp_wand
with
"H"
).
clear
v
.
iIntros
(
v
).
iDestruct
1
as
(
l
w
)
"(% & Hl & HΦ)"
.
subst
.
iIntros
(
v
).
iDestruct
1
as
(
l
q
w
)
"(% & Hl & HΦ)"
.
subst
.
awp_lam
.
iApply
awp_atomic_env
.
iIntros
(
env
)
"Henv HR"
.
...
...
@@ -165,6 +167,17 @@ Section proofs.
-
iApply
"HΦ"
.
iExists
b'
.
iSplit
;
eauto
.
Qed
.
Lemma
a_load_spec
R
Φ
q
e
:
awp
e
R
(
λ
v
,
∃
(
l
:
loc
)
(
w
:
val
),
⌜
v
=
#
l
⌝
∗
l
↦
U
{
q
}
w
∗
(
l
↦
U
{
q
}
w
-
∗
Φ
w
))
-
∗
awp
(
a_load
e
)
R
Φ
.
Proof
.
iIntros
"H"
.
iApply
a_load_spec_exists_frac
.
awp_apply
(
awp_wand
with
"H"
).
iIntros
(
v
)
"H"
.
iDestruct
"H"
as
(
l
w
->)
"[H1 H2]"
.
eauto
with
iFrame
.
Qed
.
Lemma
a_un_op_spec
R
Φ
e
op
:
awp
e
R
(
λ
v
,
∃
w
,
⌜
un_op_eval
op
v
=
Some
w
⌝
∧
Φ
w
)
-
∗
awp
(
a_un_op
op
e
)
R
Φ
.
...
...
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