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
Yixuan Chen
Iris
Commits
bf2b810d
Commit
bf2b810d
authored
4 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
reuse PreG class in G class where possible
parent
51cc75f3
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
iris/base_logic/lib/gen_inv_heap.v
+5
-5
5 additions, 5 deletions
iris/base_logic/lib/gen_inv_heap.v
iris/base_logic/lib/proph_map.v
+4
-4
4 additions, 4 deletions
iris/base_logic/lib/proph_map.v
iris/base_logic/lib/wsat.v
+8
-10
8 additions, 10 deletions
iris/base_logic/lib/wsat.v
with
17 additions
and
19 deletions
iris/base_logic/lib/gen_inv_heap.v
+
5
−
5
View file @
bf2b810d
...
@@ -30,17 +30,17 @@ Definition to_inv_heap {L V : Type} `{Countable L}
...
@@ -30,17 +30,17 @@ Definition to_inv_heap {L V : Type} `{Countable L}
(
h
:
gmap
L
(
V
*
(
V
-
d
>
PropO
)))
:
inv_heap_mapUR
L
V
:=
(
h
:
gmap
L
(
V
*
(
V
-
d
>
PropO
)))
:
inv_heap_mapUR
L
V
:=
prod_map
(
λ
x
,
Excl'
x
)
to_agree
<$>
h
.
prod_map
(
λ
x
,
Excl'
x
)
to_agree
<$>
h
.
Class
inv_heapPreG
(
L
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
L
}
:=
{
inv_heap_preG_inG
:>
inG
Σ
(
authR
(
inv_heap_mapUR
L
V
))
}
.
Class
inv_heapG
(
L
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
L
}
:=
Inv_HeapG
{
Class
inv_heapG
(
L
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
L
}
:=
Inv_HeapG
{
inv_heap_inG
:>
in
G
Σ
(
authR
(
inv_heap_mapUR
L
V
))
;
inv_heap_inG
:>
in
v_heapPreG
L
V
Σ
;
inv_heap_name
:
gname
inv_heap_name
:
gname
}
.
}
.
Global
Arguments
Inv_HeapG
_
_
{_
_
_
_}
.
Global
Arguments
Inv_HeapG
_
_
{_
_
_
_}
.
Global
Arguments
inv_heap_name
{_
_
_
_
_}
_
:
assert
.
Global
Arguments
inv_heap_name
{_
_
_
_
_}
_
:
assert
.
Class
inv_heapPreG
(
L
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
L
}
:=
{
inv_heap_preG_inG
:>
inG
Σ
(
authR
(
inv_heap_mapUR
L
V
))
}
.
Definition
inv_heapΣ
(
L
V
:
Type
)
`{
Countable
L
}
:
gFunctors
:=
Definition
inv_heapΣ
(
L
V
:
Type
)
`{
Countable
L
}
:
gFunctors
:=
#
[
GFunctor
(
authR
(
inv_heap_mapUR
L
V
))
]
.
#
[
GFunctor
(
authR
(
inv_heap_mapUR
L
V
))
]
.
...
...
This diff is collapsed.
Click to expand it.
iris/base_logic/lib/proph_map.v
+
4
−
4
View file @
bf2b810d
...
@@ -8,15 +8,15 @@ Local Notation proph_map P V := (gmap P (list V)).
...
@@ -8,15 +8,15 @@ Local Notation proph_map P V := (gmap P (list V)).
Definition
proph_val_list
(
P
V
:
Type
)
:=
list
(
P
*
V
)
.
Definition
proph_val_list
(
P
V
:
Type
)
:=
list
(
P
*
V
)
.
(** The CMRA we need. *)
(** The CMRA we need. *)
Class
proph_mapPreG
(
P
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
P
}
:=
{
proph_map_preG_inG
:>
inG
Σ
(
gmap_viewR
P
(
listO
$
leibnizO
V
))
}
.
Class
proph_mapG
(
P
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
P
}
:=
ProphMapG
{
Class
proph_mapG
(
P
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
P
}
:=
ProphMapG
{
proph_map_inG
:>
inG
Σ
(
gmap_viewR
P
(
listO
$
leibnizO
V
))
;
proph_map_inG
:>
proph_mapPreG
P
V
Σ
;
proph_map_name
:
gname
proph_map_name
:
gname
}
.
}
.
Global
Arguments
proph_map_name
{_
_
_
_
_}
_
:
assert
.
Global
Arguments
proph_map_name
{_
_
_
_
_}
_
:
assert
.
Class
proph_mapPreG
(
P
V
:
Type
)
(
Σ
:
gFunctors
)
`{
Countable
P
}
:=
{
proph_map_preG_inG
:>
inG
Σ
(
gmap_viewR
P
(
listO
$
leibnizO
V
))
}
.
Definition
proph_mapΣ
(
P
V
:
Type
)
`{
Countable
P
}
:
gFunctors
:=
Definition
proph_mapΣ
(
P
V
:
Type
)
`{
Countable
P
}
:
gFunctors
:=
#
[
GFunctor
(
gmap_viewR
P
(
listO
$
leibnizO
V
))]
.
#
[
GFunctor
(
gmap_viewR
P
(
listO
$
leibnizO
V
))]
.
...
...
This diff is collapsed.
Click to expand it.
iris/base_logic/lib/wsat.v
+
8
−
10
View file @
bf2b810d
...
@@ -8,10 +8,14 @@ From iris.prelude Require Import options.
...
@@ -8,10 +8,14 @@ From iris.prelude Require Import options.
exception of what's in the [invG] module. The module [invG] is thus exported in
exception of what's in the [invG] module. The module [invG] is thus exported in
[fancy_updates], which [wsat] is only imported. *)
[fancy_updates], which [wsat] is only imported. *)
Module
invG
.
Module
invG
.
Class
invPreG
(
Σ
:
gFunctors
)
:
Set
:=
WsatPreG
{
inv_inPreG
:>
inG
Σ
(
gmap_viewR
positive
(
laterO
(
iPropO
Σ
)));
enabled_inPreG
:>
inG
Σ
coPset_disjR
;
disabled_inPreG
:>
inG
Σ
(
gset_disjR
positive
);
}
.
Class
invG
(
Σ
:
gFunctors
)
:
Set
:=
WsatG
{
Class
invG
(
Σ
:
gFunctors
)
:
Set
:=
WsatG
{
inv_inG
:>
inG
Σ
(
gmap_viewR
positive
(
laterO
(
iPropO
Σ
)));
inv_inG
:>
invPreG
Σ
;
enabled_inG
:>
inG
Σ
coPset_disjR
;
disabled_inG
:>
inG
Σ
(
gset_disjR
positive
);
invariant_name
:
gname
;
invariant_name
:
gname
;
enabled_name
:
gname
;
enabled_name
:
gname
;
disabled_name
:
gname
;
disabled_name
:
gname
;
...
@@ -22,12 +26,6 @@ Module invG.
...
@@ -22,12 +26,6 @@ Module invG.
GFunctor
coPset_disjR
;
GFunctor
coPset_disjR
;
GFunctor
(
gset_disjR
positive
)]
.
GFunctor
(
gset_disjR
positive
)]
.
Class
invPreG
(
Σ
:
gFunctors
)
:
Set
:=
WsatPreG
{
inv_inPreG
:>
inG
Σ
(
gmap_viewR
positive
(
laterO
(
iPropO
Σ
)));
enabled_inPreG
:>
inG
Σ
coPset_disjR
;
disabled_inPreG
:>
inG
Σ
(
gset_disjR
positive
);
}
.
Global
Instance
subG_invΣ
{
Σ
}
:
subG
invΣ
Σ
→
invPreG
Σ
.
Global
Instance
subG_invΣ
{
Σ
}
:
subG
invΣ
Σ
→
invPreG
Σ
.
Proof
.
solve_inG
.
Qed
.
Proof
.
solve_inG
.
Qed
.
End
invG
.
End
invG
.
...
@@ -192,7 +190,7 @@ Proof.
...
@@ -192,7 +190,7 @@ Proof.
first
by
apply
gmap_view_auth_valid
.
first
by
apply
gmap_view_auth_valid
.
iMod
(
own_alloc
(
CoPset
⊤
))
as
(
γE
)
"HE"
;
first
done
.
iMod
(
own_alloc
(
CoPset
⊤
))
as
(
γE
)
"HE"
;
first
done
.
iMod
(
own_alloc
(
GSet
∅
))
as
(
γD
)
"HD"
;
first
done
.
iMod
(
own_alloc
(
GSet
∅
))
as
(
γD
)
"HD"
;
first
done
.
iModIntro
;
iExists
(
WsatG
_
_
_
_
γI
γE
γD
)
.
iModIntro
;
iExists
(
WsatG
_
_
γI
γE
γD
)
.
rewrite
/
wsat
/
ownE
-
lock
;
iFrame
.
rewrite
/
wsat
/
ownE
-
lock
;
iFrame
.
iExists
∅.
rewrite
fmap_empty
big_opM_empty
.
by
iFrame
.
iExists
∅.
rewrite
fmap_empty
big_opM_empty
.
by
iFrame
.
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