Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
William Mansky
Iris
Commits
68be79c3
Commit
68be79c3
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Remove a FIXME and some cleanup.
parent
453d2b16
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
heap_lang/heap.v
+4
-6
4 additions, 6 deletions
heap_lang/heap.v
heap_lang/proofmode.v
+2
-2
2 additions, 2 deletions
heap_lang/proofmode.v
with
6 additions
and
8 deletions
heap_lang/heap.v
+
4
−
6
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
Φ
:
...
...
This diff is collapsed.
Click to expand it.
heap_lang/proofmode.v
+
2
−
2
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Δ'
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment