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
Gaëtan Gilbert
Iris
Commits
2c926d86
Commit
2c926d86
authored
5 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
gen_heap_alloc_gen: consistent order of argument usage
parent
a43d8ebf
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
theories/base_logic/lib/gen_heap.v
+2
-2
2 additions, 2 deletions
theories/base_logic/lib/gen_heap.v
theories/heap_lang/lang.v
+1
-0
1 addition, 0 deletions
theories/heap_lang/lang.v
theories/heap_lang/lifting.v
+2
-4
2 additions, 4 deletions
theories/heap_lang/lifting.v
with
5 additions
and
6 deletions
theories/base_logic/lib/gen_heap.v
+
2
−
2
View file @
2c926d86
...
@@ -143,12 +143,12 @@ Section gen_heap.
...
@@ -143,12 +143,12 @@ Section gen_heap.
Qed
.
Qed
.
Lemma
gen_heap_alloc_gen
σ
σ'
:
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
.
Proof
.
revert
σ
;
induction
σ'
as
[|
l
v
σ'
Hl
IHσ'
]
using
map_ind
;
revert
σ
;
induction
σ'
as
[|
l
v
σ'
Hl
IHσ'
]
using
map_ind
;
iIntros
(
σ
Hσdisj
)
"Hσ"
.
iIntros
(
σ
Hσdisj
)
"Hσ"
.
-
by
rewrite
left_id
big_opM_empty
;
iFrame
.
-
by
rewrite
left_id
big_opM_empty
;
iFrame
.
-
iMod
(
IHσ'
with
"Hσ"
)
as
"[Hσ m]"
;
first
by
eapply
map_disjoint_insert_
r
.
-
iMod
(
IHσ'
with
"Hσ"
)
as
"[Hσ m]"
;
first
by
eapply
map_disjoint_insert_
l
.
rewrite
big_opM_insert
//
;
iFrame
.
rewrite
big_opM_insert
//
;
iFrame
.
assert
(
σ
!!
l
=
None
)
.
assert
(
σ
!!
l
=
None
)
.
{
eapply
map_disjoint_Some_r
;
first
by
eauto
.
{
eapply
map_disjoint_Some_r
;
first
by
eauto
.
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/lang.v
+
1
−
0
View file @
2c926d86
...
@@ -512,6 +512,7 @@ Proof.
...
@@ -512,6 +512,7 @@ Proof.
move
:
Hj
.
rewrite
Z2Nat
.
id
//
=>
?
.
by
rewrite
Hdisj
.
move
:
Hj
.
rewrite
Z2Nat
.
id
//
=>
?
.
by
rewrite
Hdisj
.
Qed
.
Qed
.
(* [h] is added on the right here to make [state_init_heap_singleton] true. *)
Definition
state_init_heap
(
l
:
loc
)
(
n
:
Z
)
(
v
:
val
)
(
σ
:
state
)
:
state
:=
Definition
state_init_heap
(
l
:
loc
)
(
n
:
Z
)
(
v
:
val
)
(
σ
:
state
)
:
state
:=
state_upd_heap
(
λ
h
,
heap_array
l
(
replicate
(
Z
.
to_nat
n
)
v
)
∪
h
)
σ
.
state_upd_heap
(
λ
h
,
heap_array
l
(
replicate
(
Z
.
to_nat
n
)
v
)
∪
h
)
σ
.
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/lifting.v
+
2
−
4
View file @
2c926d86
...
@@ -238,8 +238,7 @@ Proof.
...
@@ -238,8 +238,7 @@ Proof.
iIntros
(
σ1
κ
κs
k
)
"[Hσ Hκs] !>"
;
iSplit
;
first
by
destruct
n
;
auto
with
lia
.
iIntros
(
σ1
κ
κs
k
)
"[Hσ Hκs] !>"
;
iSplit
;
first
by
destruct
n
;
auto
with
lia
.
iNext
;
iIntros
(
v2
σ2
efs
Hstep
);
inv_head_step
.
iNext
;
iIntros
(
v2
σ2
efs
Hstep
);
inv_head_step
.
iMod
(
@
gen_heap_alloc_gen
with
"Hσ"
)
as
"[Hσ Hl]"
.
iMod
(
@
gen_heap_alloc_gen
with
"Hσ"
)
as
"[Hσ Hl]"
.
{
symmetry
.
{
apply
(
heap_array_map_disjoint
_
l
(
replicate
(
Z
.
to_nat
n
)
v
));
eauto
.
apply
(
heap_array_map_disjoint
_
l
(
replicate
(
Z
.
to_nat
n
)
v
));
eauto
.
rewrite
replicate_length
Z2Nat
.
id
;
auto
with
lia
.
}
rewrite
replicate_length
Z2Nat
.
id
;
auto
with
lia
.
}
iModIntro
;
iSplit
;
auto
.
iModIntro
;
iSplit
;
auto
.
iFrame
.
iApply
"HΦ"
.
iFrame
.
iApply
"HΦ"
.
...
@@ -254,8 +253,7 @@ Proof.
...
@@ -254,8 +253,7 @@ Proof.
iIntros
(
σ1
κs
k
)
"[Hσ Hκs] !>"
;
iSplit
;
first
by
destruct
n
;
auto
with
lia
.
iIntros
(
σ1
κs
k
)
"[Hσ Hκs] !>"
;
iSplit
;
first
by
destruct
n
;
auto
with
lia
.
iIntros
(
κ
v2
σ2
efs
Hstep
);
inv_head_step
.
iIntros
(
κ
v2
σ2
efs
Hstep
);
inv_head_step
.
iMod
(
@
gen_heap_alloc_gen
with
"Hσ"
)
as
"[Hσ Hl]"
.
iMod
(
@
gen_heap_alloc_gen
with
"Hσ"
)
as
"[Hσ Hl]"
.
{
symmetry
.
{
apply
(
heap_array_map_disjoint
_
l
(
replicate
(
Z
.
to_nat
n
)
v
));
eauto
.
apply
(
heap_array_map_disjoint
_
l
(
replicate
(
Z
.
to_nat
n
)
v
));
eauto
.
rewrite
replicate_length
Z2Nat
.
id
;
auto
with
lia
.
}
rewrite
replicate_length
Z2Nat
.
id
;
auto
with
lia
.
}
iModIntro
;
iSplit
;
auto
.
iModIntro
;
iSplit
;
auto
.
iFrame
;
iSplit
;
auto
.
iApply
"HΦ"
.
iFrame
;
iSplit
;
auto
.
iApply
"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