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
Iris
Commits
ccbb7d03
Commit
ccbb7d03
authored
Apr 21, 2016
by
Ralf Jung
Browse files
wp_load: use proof mode
parent
68be79c3
Pipeline
#522
passed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
heap_lang/heap.v
View file @
ccbb7d03
...
...
@@ -160,20 +160,17 @@ Section heap.
iIntros
"Hheap"
.
iApply
"HΦ"
.
by
rewrite
/
heap_mapsto
.
Qed
.
Lemma
wp_load
N
E
l
q
v
P
Φ
:
P
⊢
heap_ctx
N
→
nclose
N
⊆
E
→
P
⊢
(
▷
l
↦
{
q
}
v
★
▷
(
l
↦
{
q
}
v
-
★
Φ
v
))
→
P
⊢
WP
Load
(
Lit
(
LitLoc
l
))
@
E
{{
Φ
}}.
Lemma
wp_load
N
E
l
q
v
Φ
:
nclose
N
⊆
E
→
(
heap_ctx
N
★
▷
l
↦
{
q
}
v
★
▷
(
l
↦
{
q
}
v
-
★
Φ
v
))
⊢
WP
Load
(
Lit
(
LitLoc
l
))
@
E
{{
Φ
}}.
Proof
.
rewrite
/
heap_ctx
/
heap_
inv
=>
??
HP
Φ
.
iIntros
{?}
"[#Hinv [Hmapsto HΦ]]"
.
rewrite
/
heap_ctx
/
heap_
mapsto
.
apply
(
auth_fsa'
heap_inv
(
wp_fsa
_
)
id
)
with
N
heap_name
{[
l
:
=
Frac
q
(
DecAgree
v
)
]}
;
simpl
;
eauto
with
I
.
rewrite
HP
Φ
{
HP
Φ
}
;
apply
sep_mono_r
,
forall_intro
=>
h
;
apply
wand_intro_l
.
rewrite
-
assoc
;
apply
const_elim_sep_l
=>
?.
rewrite
-(
wp_load_pst
_
(<[
l
:
=
v
]>(
of_heap
h
)))
?lookup_insert
//.
rewrite
const_equiv
//
left_id
.
rewrite
/
heap_inv
of_heap_singleton_op
//.
apply
sep_mono_r
,
later_mono
,
wand_intro_l
.
by
rewrite
-
later_intro
.
iFrame
"Hmapsto"
.
iIntros
{
h
}
"[% Hheap]"
.
rewrite
/
heap_inv
.
iApply
(
wp_load_pst
_
(<[
l
:
=
v
]>(
of_heap
h
)))
;
first
by
rewrite
lookup_insert
.
rewrite
of_heap_singleton_op
//.
iFrame
"Hheap"
.
iNext
.
iIntros
"Hheap"
.
iFrame
"Hheap"
.
iSplit
;
first
by
iPureIntro
.
done
.
Qed
.
Lemma
wp_store
N
E
l
v'
e
v
P
Φ
:
...
...
heap_lang/proofmode.v
View file @
ccbb7d03
...
...
@@ -39,7 +39,7 @@ Lemma tac_wp_load Δ Δ' N E i l q v Φ :
Δ
'
⊢
Φ
v
→
Δ
⊢
WP
Load
(
Lit
(
LitLoc
l
))
@
E
{{
Φ
}}.
Proof
.
intros
.
eapply
wp_load
;
eauto
.
intros
.
rewrite
-
wp_load
//
-
always_and_sep_l
.
apply
and_intro
;
first
done
.
rewrite
strip_later_env_sound
-
later_sep
envs_lookup_split
//
;
simpl
.
by
apply
later_mono
,
sep_mono_r
,
wand_mono
.
Qed
.
...
...
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