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
Pierre Roux
Iris
Commits
79cd8d45
Commit
79cd8d45
authored
4 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
one gen_heap_init lemma is enough
parent
3cb0702d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
theories/base_logic/lib/gen_heap.v
+7
-13
7 additions, 13 deletions
theories/base_logic/lib/gen_heap.v
theories/heap_lang/adequacy.v
+1
-1
1 addition, 1 deletion
theories/heap_lang/adequacy.v
with
10 additions
and
14 deletions
CHANGELOG.md
+
2
−
0
View file @
79cd8d45
...
...
@@ -128,6 +128,8 @@ With this release, we dropped support for Coq 8.9.
by
`gen_heap`
.
*
Strengthen
`mapsto_valid_2`
conclusion from
`✓ (q1 + q2)%Qp`
to
`⌜✓ (q1 + q2)%Qp ∧ v1 = v2⌝`
.
*
Change
`gen_heap_init`
to also return ownership of the points-to facts for the
initial heap.
**Changes in `program_logic`:**
...
...
This diff is collapsed.
Click to expand it.
theories/base_logic/lib/gen_heap.v
+
7
−
13
View file @
79cd8d45
...
...
@@ -290,24 +290,18 @@ Section gen_heap.
Qed
.
End
gen_heap
.
(** This lemma drops ownership of the initial [σ] on the floor; see
[gen_heap_init_big] for a version of the lemma that preserves this ownership. *)
Lemma
gen_heap_init
`{
Countable
L
,
!
gen_heapPreG
L
V
Σ
}
σ
:
⊢
|
==>
∃
_
:
gen_heapG
L
V
Σ
,
gen_heap_interp
σ
.
⊢
|
==>
∃
_
:
gen_heapG
L
V
Σ
,
gen_heap_interp
σ
∗
([
∗
map
]
l
↦
v
∈
σ
,
l
↦
v
)
∗
([
∗
map
]
l
↦
_
∈
σ
,
meta_token
l
⊤
)
.
Proof
.
iMod
(
own_alloc
(
gmap_view_auth
1
(
σ
:
gmap
L
(
leibnizO
V
))))
as
(
γh
)
"Hh"
.
iMod
(
own_alloc
(
gmap_view_auth
1
(
∅
:
gmap
L
(
leibnizO
V
))))
as
(
γh
)
"Hh"
.
{
exact
:
gmap_view_auth_valid
.
}
iMod
(
own_alloc
(
gmap_view_auth
1
(
∅
:
gmap
L
gnameO
)))
as
(
γm
)
"Hm"
.
{
exact
:
gmap_view_auth_valid
.
}
iModIntro
.
iExists
(
GenHeapG
L
V
Σ
_
_
_
_
_
γh
γm
)
.
iExists
∅
;
simpl
.
iFrame
"Hh Hm"
.
by
rewrite
dom_empty_L
.
Qed
.
Lemma
gen_heap_init_big
`{
Countable
L
,
!
gen_heapPreG
L
V
Σ
}
σ
:
⊢
|
==>
∃
_
:
gen_heapG
L
V
Σ
,
gen_heap_interp
σ
∗
([
∗
map
]
l
↦
v
∈
σ
,
l
↦
v
)
∗
([
∗
map
]
l
↦
_
∈
σ
,
meta_token
l
⊤
)
.
Proof
.
iMod
(
gen_heap_init
∅
)
as
(
gen_heap
)
"Hinterp"
.
iExists
gen_heap
.
pose
(
gen_heap
:=
GenHeapG
L
V
Σ
_
_
_
_
_
γh
γm
)
.
iExists
gen_heap
.
iAssert
(
gen_heap_interp
∅
)
with
"[Hh Hm]"
as
"Hinterp"
.
{
iExists
∅
;
simpl
.
iFrame
"Hh Hm"
.
by
rewrite
dom_empty_L
.
}
iMod
(
gen_heap_alloc_big
with
"Hinterp"
)
as
"(Hinterp & $ & $)"
.
{
apply
map_disjoint_empty_r
.
}
rewrite
right_id_L
.
done
.
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/adequacy.v
+
1
−
1
View file @
79cd8d45
...
...
@@ -21,7 +21,7 @@ Definition heap_adequacy Σ `{!heapPreG Σ} s e σ φ :
adequate
s
e
σ
(
λ
v
_,
φ
v
)
.
Proof
.
intros
Hwp
;
eapply
(
wp_adequacy
_
_);
iIntros
(??)
""
.
iMod
(
gen_heap_init
σ
.(
heap
))
as
(?)
"Hh"
.
iMod
(
gen_heap_init
σ
.(
heap
))
as
(?)
"
[
Hh
_]
"
.
iMod
(
inv_heap_init
loc
(
option
val
))
as
(?)
">Hi"
.
iMod
(
proph_map_init
κs
σ
.(
used_proph_id
))
as
(?)
"Hp"
.
iModIntro
.
iExists
...
...
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