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
8008c189
Commit
8008c189
authored
4 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
provide _big variant of gen_heap_init
parent
5e47e4ce
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/base_logic/lib/gen_heap.v
+23
-11
23 additions, 11 deletions
theories/base_logic/lib/gen_heap.v
with
23 additions
and
11 deletions
theories/base_logic/lib/gen_heap.v
+
23
−
11
View file @
8008c189
...
...
@@ -126,17 +126,6 @@ Local Notation "l ↦{ q } v" := (mapsto l q v)
(
at
level
20
,
q
at
level
50
,
format
"l ↦{ q } v"
)
:
bi_scope
.
Local
Notation
"l ↦ v"
:=
(
mapsto
l
1
v
)
(
at
level
20
)
:
bi_scope
.
Lemma
gen_heap_init
`{
Countable
L
,
!
gen_heapPreG
L
V
Σ
}
σ
:
⊢
|
==>
∃
_
:
gen_heapG
L
V
Σ
,
gen_heap_interp
σ
.
Proof
.
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
.
Section
gen_heap
.
Context
{
L
V
}
`{
Countable
L
,
!
gen_heapG
L
V
Σ
}
.
Implicit
Types
P
Q
:
iProp
Σ
.
...
...
@@ -300,3 +289,26 @@ Section gen_heap.
rewrite
dom_insert_L
.
set_solver
.
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
σ
.
Proof
.
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
.
iMod
(
gen_heap_alloc_big
with
"Hinterp"
)
as
"(Hinterp & $ & $)"
.
{
apply
map_disjoint_empty_r
.
}
rewrite
right_id
.
done
.
Qed
.
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