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
d903a458
Commit
d903a458
authored
5 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
show that allocating a single ref is like normal map insertion
parent
e9a19f54
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/base_logic/lib/gen_heap.v
+3
-3
3 additions, 3 deletions
theories/base_logic/lib/gen_heap.v
theories/heap_lang/lang.v
+8
-1
8 additions, 1 deletion
theories/heap_lang/lang.v
with
11 additions
and
4 deletions
theories/base_logic/lib/gen_heap.v
+
3
−
3
View file @
d903a458
...
...
@@ -143,17 +143,17 @@ Section gen_heap.
Qed
.
Lemma
gen_heap_alloc_gen
σ
σ'
:
σ
##
ₘ
σ'
→
gen_heap_ctx
σ
==∗
gen_heap_ctx
(
σ
∪
σ
'
)
∗
[
∗
map
]
l
↦
v
∈
σ'
,
l
↦
v
.
σ
##
ₘ
σ'
→
gen_heap_ctx
σ
==∗
gen_heap_ctx
(
σ
'
∪
σ
)
∗
[
∗
map
]
l
↦
v
∈
σ'
,
l
↦
v
.
Proof
.
revert
σ
;
induction
σ'
as
[|
l
v
σ'
Hl
IHσ'
]
using
map_ind
;
iIntros
(
σ
Hσdisj
)
"Hσ"
.
-
by
rewrite
righ
t_id
big_opM_empty
;
iFrame
.
-
by
rewrite
lef
t_id
big_opM_empty
;
iFrame
.
-
iMod
(
IHσ'
with
"Hσ"
)
as
"[Hσ m]"
;
first
by
eapply
map_disjoint_insert_r
.
rewrite
big_opM_insert
//
;
iFrame
.
assert
(
σ
!!
l
=
None
)
.
{
eapply
map_disjoint_Some_r
;
first
by
eauto
.
rewrite
lookup_insert
//.
}
rewrite
-
insert_union_
r
//.
rewrite
-
insert_union_
l
//.
iMod
(
gen_heap_alloc
with
"Hσ"
)
as
"[$ $]"
;
last
done
.
apply
lookup_union_None
;
split
;
auto
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/lang.v
+
8
−
1
View file @
d903a458
...
...
@@ -513,7 +513,14 @@ Proof.
Qed
.
Definition
state_init_heap
(
l
:
loc
)
(
n
:
Z
)
(
v
:
val
)
(
σ
:
state
)
:
state
:=
state_upd_heap
(
λ
h
,
h
∪
heap_array
l
(
replicate
(
Z
.
to_nat
n
)
v
))
σ
.
state_upd_heap
(
λ
h
,
heap_array
l
(
replicate
(
Z
.
to_nat
n
)
v
)
∪
h
)
σ
.
Lemma
state_init_heap_singleton
l
v
σ
:
state_init_heap
l
1
v
σ
=
state_upd_heap
<
[
l
:=
v
]
>
σ
.
Proof
.
destruct
σ
as
[
h
p
]
.
rewrite
/
state_init_heap
/=.
f_equiv
.
rewrite
right_id
insert_union_singleton_l
.
done
.
Qed
.
Inductive
head_step
:
expr
→
state
→
list
observation
→
expr
→
state
→
list
expr
→
Prop
:=
|
RecS
f
x
e
σ
:
...
...
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