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
Joshua Yanovski
iris-coq
Commits
68be79c3
Commit
68be79c3
authored
Apr 20, 2016
by
Robbert Krebbers
Browse files
Remove a FIXME and some cleanup.
parent
453d2b16
Changes
2
Hide whitespace changes
Inline
Side-by-side
heap_lang/heap.v
View file @
68be79c3
...
...
@@ -140,13 +140,13 @@ Section heap.
Proof
.
by
rewrite
heap_mapsto_op_eq
Qp_div_2
.
Qed
.
(
**
Weakest
precondition
*
)
Lemma
wp_alloc
N
E
e
v
P
Φ
:
Lemma
wp_alloc
N
E
e
v
Φ
:
to_val
e
=
Some
v
→
nclose
N
⊆
E
→
(
heap_ctx
N
★
▷
∀
l
,
l
↦
v
-
★
Φ
(
LitV
$
LitLoc
l
))
⊢
WP
Alloc
e
@
E
{{
Φ
}}
.
Proof
.
iIntros
{??}
"[#Hinv HΦ]"
.
rewrite
/
heap_ctx
.
iPvs
(
auth_empty
heap_name
)
as
"Hheap"
.
(
*
TODO
:
use
an
iTactic
*
)
(
*
TODO
:
change
[
auth_fsa
]
to
single
turnstile
and
use
[
iApply
]
*
)
apply
(
auth_fsa
heap_inv
(
wp_fsa
(
Alloc
e
)))
with
N
heap_name
∅
;
simpl
;
eauto
with
I
.
iFrame
"Hheap"
.
iIntros
{
h
}
.
rewrite
[
∅
⋅
h
]
left_id
.
...
...
@@ -156,10 +156,8 @@ Section heap.
rewrite
[
{
[
_
:=
_
]
}
⋅
∅
]
right_id
.
rewrite
-
of_heap_insert
-
(
insert_singleton_op
h
);
last
by
apply
of_heap_None
.
iFrame
"Hheap"
.
iSplit
.
{
(
*
FIXME
iTactic
for
introduction
of
constant
assertions
?
*
)
rewrite
const_equiv
;
first
done
.
split
;
first
done
.
by
apply
(
insert_valid
h
).
}
iIntros
"Hheap"
.
iApply
"HΦ"
.
rewrite
/
heap_mapsto
.
done
.
{
iPureIntro
;
split
;
first
done
.
by
apply
(
insert_valid
h
).
}
iIntros
"Hheap"
.
iApply
"HΦ"
.
by
rewrite
/
heap_mapsto
.
Qed
.
Lemma
wp_load
N
E
l
q
v
P
Φ
:
...
...
heap_lang/proofmode.v
View file @
68be79c3
...
...
@@ -25,8 +25,8 @@ Lemma tac_wp_alloc Δ Δ' N E j e v Φ :
Δ''
⊢
Φ
(
LitV
(
LitLoc
l
)))
→
Δ
⊢
WP
Alloc
e
@
E
{{
Φ
}}
.
Proof
.
intros
????
H
Δ
.
etrans
;
last
apply
:
wp_alloc
;
eauto
.
rewrite
-
always_and_sep_l
.
iSplit
;
first
done
.
intros
????
H
Δ
.
rewrite
-
wp_alloc
// -always_and_sep_l
.
apply
and_intro
;
first
done
.
rewrite
strip_later_env_sound
;
apply
later_mono
,
forall_intro
=>
l
.
destruct
(
H
Δ
l
)
as
(
Δ''
&?&
H
Δ'
).
rewrite
envs_app_sound
//; simpl.
by
rewrite
right_id
H
Δ'
.
...
...
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