Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dan Frumin
iris-coq
Commits
f69e44a9
Commit
f69e44a9
authored
May 28, 2016
by
Robbert Krebbers
Browse files
Deallocation is a local update.
parent
cfb00b3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
algebra/gmap.v
View file @
f69e44a9
...
...
@@ -334,9 +334,18 @@ Qed.
End
freshness
.
(
*
Allocation
is
a
local
update
:
Just
use
composition
with
a
singleton
map
.
*
)
(
*
Deallocation
is
*
not
*
a
local
update
.
The
trouble
is
that
if
we
own
{
[
i
↦
x
]
}
,
then
the
frame
could
always
own
"core x"
,
and
prevent
deallocation
.
*
)
Global
Instance
gmap_delete_update
:
LocalUpdate
(
λ
m
,
∃
x
,
m
!!
i
=
Some
x
∧
∀
y
,
¬
✓
{
0
}
(
x
⋅
y
))
(
delete
i
).
Proof
.
split
;
first
apply
_.
intros
n
m1
m2
(
x
&
Hix
&
Hv
)
Hm
j
;
destruct
(
decide
(
i
=
j
))
as
[
<-|
].
-
rewrite
lookup_delete
!
lookup_op
lookup_delete
.
case
Hiy
:
(
m2
!!
i
)
=>
[
y
|
];
last
constructor
.
destruct
(
Hv
y
);
apply
cmra_validN_le
with
n
;
last
omega
.
move:
(
Hm
i
).
by
rewrite
lookup_op
Hix
Hiy
.
-
by
rewrite
lookup_op
!
lookup_delete_ne
// lookup_op.
Qed
.
(
*
Applying
a
local
update
at
a
position
we
own
is
a
local
update
.
*
)
Global
Instance
gmap_alter_update
`
{!
LocalUpdate
Lv
L
}
i
:
...
...
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