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
44600ea8
Commit
44600ea8
authored
5 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add simpler accessor
parent
e695dfde
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/gc.v
+14
-1
14 additions, 1 deletion
theories/base_logic/lib/gc.v
with
14 additions
and
1 deletion
theories/base_logic/lib/gc.v
+
14
−
1
View file @
44600ea8
...
...
@@ -205,7 +205,7 @@ Section gc.
(** An accessor to make use of [gc_mapsto].
This opens the invariant *before* consuming [gc_mapsto] so that you can use
this before opening an atomic update that provides [gc_mapsto]!. *)
Lemma
gc_acc
ess
E
:
Lemma
gc_acc
_strong
E
:
↑
gcN
⊆
E
→
gc_inv
L
V
=
{
E
,
E
∖
↑
gcN
}
=∗
∀
l
v
I
,
gc_mapsto
l
v
I
-∗
(
⌜
I
v
⌝
∗
l
↦
v
∗
(
∀
w
,
⌜
I
w
⌝
-∗
l
↦
w
==∗
gc_mapsto
l
w
I
∗
|
=
{
E
∖
↑
gcN
,
E
}=>
True
))
.
...
...
@@ -230,6 +230,19 @@ Section gc.
iMod
(
"Hclose"
with
"[H● HsepM]"
);
[
iExists
_;
by
iFrame
|
by
iModIntro
]
.
Qed
.
(** Derive a more standard accessor. *)
Lemma
gc_acc
E
l
v
I
:
↑
gcN
⊆
E
→
gc_inv
L
V
-∗
gc_mapsto
l
v
I
=
{
E
,
E
∖
↑
gcN
}
=∗
(
⌜
I
v
⌝
∗
l
↦
v
∗
(
∀
w
,
⌜
I
w
⌝
-∗
l
↦
w
=
{
E
∖
↑
gcN
,
E
}
=∗
gc_mapsto
l
w
I
))
.
Proof
.
iIntros
(
HN
)
"#Hinv Hl"
.
iMod
(
gc_acc_strong
with
"Hinv"
)
as
"Hacc"
;
first
done
.
iDestruct
(
"Hacc"
with
"Hl"
)
as
"(HI & Hl & Hclose)"
.
iModIntro
.
iFrame
.
iIntros
(
w
)
"HI Hl"
.
iMod
(
"Hclose"
with
"HI Hl"
)
as
"[$ $]"
.
Qed
.
Lemma
is_gc_access
l
I
E
:
↑
gcN
⊆
E
→
gc_inv
L
V
-∗
is_gc_loc
l
I
=
{
E
,
E
∖
↑
gcN
}
=∗
...
...
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