Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Simon Spies
Iris
Commits
2c926d86
Commit
2c926d86
authored
Jun 02, 2019
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gen_heap_alloc_gen: consistent order of argument usage
parent
a43d8ebf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
theories/base_logic/lib/gen_heap.v
theories/base_logic/lib/gen_heap.v
+2
-2
theories/heap_lang/lang.v
theories/heap_lang/lang.v
+1
-0
theories/heap_lang/lifting.v
theories/heap_lang/lifting.v
+2
-4
No files found.
theories/base_logic/lib/gen_heap.v
View file @
2c926d86
...
...
@@ -143,12 +143,12 @@ 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
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
.
assert
(
σ
!!
l
=
None
).
{
eapply
map_disjoint_Some_r
;
first
by
eauto
.
...
...
theories/heap_lang/lang.v
View file @
2c926d86
...
...
@@ -512,6 +512,7 @@ Proof.
move
:
Hj
.
rewrite
Z2Nat
.
id
//
=>
?.
by
rewrite
Hdisj
.
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
:
=
state_upd_heap
(
λ
h
,
heap_array
l
(
replicate
(
Z
.
to_nat
n
)
v
)
∪
h
)
σ
.
...
...
theories/heap_lang/lifting.v
View file @
2c926d86
...
...
@@ -238,8 +238,7 @@ Proof.
iIntros
(
σ
1
κ
κ
s
k
)
"[Hσ Hκs] !>"
;
iSplit
;
first
by
destruct
n
;
auto
with
lia
.
iNext
;
iIntros
(
v2
σ
2
efs
Hstep
)
;
inv_head_step
.
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
.
}
iModIntro
;
iSplit
;
auto
.
iFrame
.
iApply
"HΦ"
.
...
...
@@ -254,8 +253,7 @@ Proof.
iIntros
(
σ
1
κ
s
k
)
"[Hσ Hκs] !>"
;
iSplit
;
first
by
destruct
n
;
auto
with
lia
.
iIntros
(
κ
v2
σ
2
efs
Hstep
)
;
inv_head_step
.
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
.
}
iModIntro
;
iSplit
;
auto
.
iFrame
;
iSplit
;
auto
.
iApply
"HΦ"
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment