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
f5973a55
Commit
f5973a55
authored
5 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
begin porting GC locations to extensional invariants
parent
9af73ff6
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
+7
-5
7 additions, 5 deletions
theories/base_logic/lib/gc.v
with
7 additions
and
5 deletions
theories/base_logic/lib/gc.v
+
7
−
5
View file @
f5973a55
...
@@ -25,9 +25,9 @@ Local Notation "l ↦ v" := (mapsto l 1 v) (at level 20) : bi_scope.
...
@@ -25,9 +25,9 @@ Local Notation "l ↦ v" := (mapsto l 1 v) (at level 20) : bi_scope.
Definition
gc_mapUR
(
L
V
:
Type
)
`{
Countable
L
}
:
ucmraT
:=
gmapUR
L
$
prodR
Definition
gc_mapUR
(
L
V
:
Type
)
`{
Countable
L
}
:
ucmraT
:=
gmapUR
L
$
prodR
(
optionR
$
exclR
$
leibnizO
V
)
(
optionR
$
exclR
$
leibnizO
V
)
(
agreeR
$
leibnizO
(
V
→
Prop
))
.
(
agreeR
(
V
-
d
>
Prop
O
))
.
Definition
to_gc_map
{
L
V
:
Type
}
`{
Countable
L
}
(
gcm
:
gmap
L
(
V
*
(
V
→
Prop
)))
:
gc_mapUR
L
V
:=
Definition
to_gc_map
{
L
V
:
Type
}
`{
Countable
L
}
(
gcm
:
gmap
L
(
V
*
(
V
-
d
>
Prop
O
)))
:
gc_mapUR
L
V
:=
prod_map
(
λ
x
,
Excl'
x
)
to_agree
<$>
gcm
.
prod_map
(
λ
x
,
Excl'
x
)
to_agree
<$>
gcm
.
Class
gcG
(
L
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
L
}
:=
GcG
{
Class
gcG
(
L
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
L
}
:=
GcG
{
...
@@ -53,7 +53,7 @@ Section defs.
...
@@ -53,7 +53,7 @@ Section defs.
Context
`{
!
invG
Σ
,
!
gen_heapG
L
V
Σ
,
gG
:
!
gcG
L
V
Σ
}
.
Context
`{
!
invG
Σ
,
!
gen_heapG
L
V
Σ
,
gG
:
!
gcG
L
V
Σ
}
.
Definition
gc_inv_P
:
iProp
Σ
:=
Definition
gc_inv_P
:
iProp
Σ
:=
(
∃
gcm
:
gmap
L
(
V
*
(
V
→
Prop
)),
(
∃
gcm
:
gmap
L
(
V
*
(
V
-
d
>
Prop
O
)),
own
(
gc_name
gG
)
(
●
to_gc_map
gcm
)
∗
[
∗
map
]
l
↦
p
∈
gcm
,
⌜
p
.
2
p
.
1
⌝
∗
l
↦
p
.
1
)
%
I
.
own
(
gc_name
gG
)
(
●
to_gc_map
gcm
)
∗
[
∗
map
]
l
↦
p
∈
gcm
,
⌜
p
.
2
p
.
1
⌝
∗
l
↦
p
.
1
)
%
I
.
Definition
gc_inv
:
iProp
Σ
:=
inv
gcN
gc_inv_P
.
Definition
gc_inv
:
iProp
Σ
:=
inv
gcN
gc_inv_P
.
...
@@ -72,7 +72,7 @@ Arguments gc_inv _ _ {_ _ _ _ _ _}.
...
@@ -72,7 +72,7 @@ Arguments gc_inv _ _ {_ _ _ _ _ _}.
Section
to_gc_map
.
Section
to_gc_map
.
Context
{
L
V
:
Type
}
`{
Countable
L
}
.
Context
{
L
V
:
Type
}
`{
Countable
L
}
.
Implicit
Types
(
gcm
:
gmap
L
(
V
*
(
V
→
Prop
)))
.
Implicit
Types
(
gcm
:
gmap
L
(
V
*
(
V
-
d
>
Prop
O
)))
.
Lemma
to_gc_map_valid
gcm
:
✓
to_gc_map
gcm
.
Lemma
to_gc_map_valid
gcm
:
✓
to_gc_map
gcm
.
Proof
.
intros
l
.
rewrite
lookup_fmap
.
by
case
(
gcm
!!
l
)
.
Qed
.
Proof
.
intros
l
.
rewrite
lookup_fmap
.
by
case
(
gcm
!!
l
)
.
Qed
.
...
@@ -118,6 +118,7 @@ Section gc.
...
@@ -118,6 +118,7 @@ Section gc.
Context
{
L
V
:
Type
}
`{
Countable
L
}
.
Context
{
L
V
:
Type
}
`{
Countable
L
}
.
Context
`{
!
invG
Σ
,
!
gen_heapG
L
V
Σ
,
gG
:
!
gcG
L
V
Σ
}
.
Context
`{
!
invG
Σ
,
!
gen_heapG
L
V
Σ
,
gG
:
!
gcG
L
V
Σ
}
.
Implicit
Types
(
l
:
L
)
(
v
:
V
)
(
I
:
V
→
Prop
)
.
Implicit
Types
(
l
:
L
)
(
v
:
V
)
(
I
:
V
→
Prop
)
.
Implicit
Types
(
gcm
:
gmap
L
(
V
*
(
V
-
d
>
PropO
)))
.
Global
Instance
is_gc_loc_persistent
l
I
:
Persistent
(
is_gc_loc
l
I
)
.
Global
Instance
is_gc_loc_persistent
l
I
:
Persistent
(
is_gc_loc
l
I
)
.
Proof
.
rewrite
/
is_gc_loc
.
apply
_
.
Qed
.
Proof
.
rewrite
/
is_gc_loc
.
apply
_
.
Qed
.
...
@@ -166,7 +167,7 @@ Section gc.
...
@@ -166,7 +167,7 @@ Section gc.
Qed
.
Qed
.
Lemma
is_gc_lookup_Some
l
gcm
I
:
Lemma
is_gc_lookup_Some
l
gcm
I
:
is_gc_loc
l
I
-∗
own
(
gc_name
gG
)
(
●
to_gc_map
gcm
)
-∗
⌜∃
v
,
gcm
!!
l
=
Some
(
v
,
I
)
⌝.
is_gc_loc
l
I
-∗
own
(
gc_name
gG
)
(
●
to_gc_map
gcm
)
-∗
⌜∃
v
,
gcm
!!
l
≡
Some
(
v
,
I
)
⌝.
Proof
.
Proof
.
iIntros
"Hgc_l H◯"
.
iIntros
"Hgc_l H◯"
.
iCombine
"H◯ Hgc_l"
as
"Hcomb"
.
iCombine
"H◯ Hgc_l"
as
"Hcomb"
.
...
@@ -180,6 +181,7 @@ Section gc.
...
@@ -180,6 +181,7 @@ Section gc.
rewrite
->
Some_included_total
in
Hincl
.
rewrite
->
Some_included_total
in
Hincl
.
apply
pair_included
in
Hincl
.
simpl
in
Hincl
.
apply
pair_included
in
Hincl
.
simpl
in
Hincl
.
destruct
Hincl
as
[_
Hincl
%
to_agree_included
]
.
destruct
Hincl
as
[_
Hincl
%
to_agree_included
]
.
fold_leibniz
.
subst
I''
.
done
.
fold_leibniz
.
subst
I''
.
done
.
Qed
.
Qed
.
...
...
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