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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
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
Dongjae Lee
Iris
Commits
20bb7cc3
Commit
20bb7cc3
authored
1 year ago
by
Jacques-Henri Jourdan
Browse files
Options
Downloads
Patches
Plain Diff
Simplify NA-inv protocol.
parent
8e96888d
Branches
jh/simplify_na_inv
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iris/base_logic/lib/na_invariants.v
+9
-12
9 additions, 12 deletions
iris/base_logic/lib/na_invariants.v
with
9 additions
and
12 deletions
iris/base_logic/lib/na_invariants.v
+
9
−
12
View file @
20bb7cc3
...
@@ -24,8 +24,7 @@ Section defs.
...
@@ -24,8 +24,7 @@ Section defs.
own
p
(
CoPset
E
,
GSet
∅
)
.
own
p
(
CoPset
E
,
GSet
∅
)
.
Definition
na_inv
(
p
:
na_inv_pool_name
)
(
N
:
namespace
)
(
P
:
iProp
Σ
)
:
iProp
Σ
:=
Definition
na_inv
(
p
:
na_inv_pool_name
)
(
N
:
namespace
)
(
P
:
iProp
Σ
)
:
iProp
Σ
:=
∃
i
,
⌜
i
∈
(
↑
N
:
coPset
)
⌝
∧
∃
i
,
inv
N
(
P
∗
own
p
(
ε
,
GSet
{[
i
]})
∨
na_own
p
(
↑
N
))
.
inv
N
(
P
∗
own
p
(
ε
,
GSet
{[
i
]})
∨
na_own
p
{[
i
]})
.
End
defs
.
End
defs
.
Global
Instance
:
Params
(
@
na_inv
)
3
:=
{}
.
Global
Instance
:
Params
(
@
na_inv
)
3
:=
{}
.
...
@@ -47,9 +46,8 @@ Section proofs.
...
@@ -47,9 +46,8 @@ Section proofs.
Lemma
na_inv_iff
p
N
P
Q
:
na_inv
p
N
P
-∗
▷
□
(
P
↔
Q
)
-∗
na_inv
p
N
Q
.
Lemma
na_inv_iff
p
N
P
Q
:
na_inv
p
N
P
-∗
▷
□
(
P
↔
Q
)
-∗
na_inv
p
N
Q
.
Proof
.
Proof
.
rewrite
/
na_inv
.
iIntros
"(%i & % & HI) #HPQ"
.
rewrite
/
na_inv
.
iIntros
"(%i & HI) #HPQ"
.
iExists
i
.
iSplit
;
first
done
.
iApply
(
inv_iff
with
"HI"
)
.
iExists
i
.
iApply
(
inv_iff
with
"HI"
)
.
iIntros
"!> !>"
.
iIntros
"!> !>"
.
iSplit
;
iIntros
"[[? Ho]|$]"
;
iLeft
;
iFrame
"Ho"
;
by
iApply
"HPQ"
.
iSplit
;
iIntros
"[[? Ho]|$]"
;
iLeft
;
iFrame
"Ho"
;
by
iApply
"HPQ"
.
Qed
.
Qed
.
...
@@ -82,9 +80,8 @@ Section proofs.
...
@@ -82,9 +80,8 @@ Section proofs.
iMod
(
own_updateP
with
"Hempty"
)
as
([
m1
m2
])
"[Hm Hown]"
.
iMod
(
own_updateP
with
"Hempty"
)
as
([
m1
m2
])
"[Hm Hown]"
.
{
apply
prod_updateP'
.
{
apply
prod_updateP'
.
-
apply
cmra_updateP_id
,
(
reflexivity
(
R
:=
eq
))
.
-
apply
cmra_updateP_id
,
(
reflexivity
(
R
:=
eq
))
.
-
apply
(
gset_disj_alloc_empty_updateP_strong'
(
λ
i
,
i
∈
(
↑
N
:
coPset
)))=>
Ef
.
-
apply
gset_disj_alloc_empty_updateP'
.
}
apply
fresh_inv_name
.
}
simpl
.
iDestruct
"Hm"
as
%
(
<-
&
i
&
->
)
.
simpl
.
iDestruct
"Hm"
as
%
(
<-
&
i
&
->
&
?)
.
rewrite
/
na_inv
.
rewrite
/
na_inv
.
iMod
(
inv_alloc
N
with
"[-]"
);
last
(
iModIntro
;
iExists
i
;
eauto
)
.
iMod
(
inv_alloc
N
with
"[-]"
);
last
(
iModIntro
;
iExists
i
;
eauto
)
.
iNext
.
iLeft
.
by
iFrame
.
iNext
.
iLeft
.
by
iFrame
.
...
@@ -95,10 +92,9 @@ Section proofs.
...
@@ -95,10 +92,9 @@ Section proofs.
na_inv
p
N
P
-∗
na_own
p
F
=
{
E
}
=∗
▷
P
∗
na_own
p
(
F
∖↑
N
)
∗
na_inv
p
N
P
-∗
na_own
p
F
=
{
E
}
=∗
▷
P
∗
na_own
p
(
F
∖↑
N
)
∗
(
▷
P
∗
na_own
p
(
F
∖↑
N
)
=
{
E
}
=∗
na_own
p
F
)
.
(
▷
P
∗
na_own
p
(
F
∖↑
N
)
=
{
E
}
=∗
na_own
p
F
)
.
Proof
.
Proof
.
rewrite
/
na_inv
.
iIntros
(??)
"#(%i &
% &
Hinv) Htoks"
.
rewrite
/
na_inv
.
iIntros
(??)
"#(%i & Hinv) Htoks"
.
rewrite
[
F
as
X
in
na_own
p
X
](
union_difference_L
(
↑
N
)
F
)
//.
rewrite
[
F
as
X
in
na_own
p
X
](
union_difference_L
(
↑
N
)
F
)
//.
rewrite
[
X
in
(
X
∪
_)](
union_difference_L
{[
i
]}
(
↑
N
))
?na_own_union
;
[|
set_solver
..]
.
rewrite
?na_own_union
;
[|
set_solver
..]
.
iDestruct
"Htoks"
as
"[Htoki $]"
.
iDestruct
"Htoks"
as
"[[Htoki $] $]"
.
iInv
"Hinv"
as
"[[$ >Hdis]|>Htoki2]"
"Hclose"
.
iInv
"Hinv"
as
"[[$ >Hdis]|>Htoki2]"
"Hclose"
.
-
iMod
(
"Hclose"
with
"[Htoki]"
)
as
"_"
;
first
auto
.
-
iMod
(
"Hclose"
with
"[Htoki]"
)
as
"_"
;
first
auto
.
iIntros
"!> [HP $]"
.
iIntros
"!> [HP $]"
.
...
@@ -106,7 +102,8 @@ Section proofs.
...
@@ -106,7 +102,8 @@ Section proofs.
+
iCombine
"Hdis Hdis2"
gives
%
[_
Hval
%
gset_disj_valid_op
]
.
+
iCombine
"Hdis Hdis2"
gives
%
[_
Hval
%
gset_disj_valid_op
]
.
set_solver
.
set_solver
.
+
iSplitR
"Hitok"
;
last
by
iFrame
.
eauto
with
iFrame
.
+
iSplitR
"Hitok"
;
last
by
iFrame
.
eauto
with
iFrame
.
-
iDestruct
(
na_own_disjoint
with
"Htoki Htoki2"
)
as
%
?
.
set_solver
.
-
iDestruct
(
na_own_disjoint
with
"Htoki Htoki2"
)
as
%
?
.
destruct
(
fresh_inv_name
∅
N
)
as
(?
&
_
&
?)
.
set_solver
.
Qed
.
Qed
.
Global
Instance
into_inv_na
p
N
P
:
IntoInv
(
na_inv
p
N
P
)
N
:=
{}
.
Global
Instance
into_inv_na
p
N
P
:
IntoInv
(
na_inv
p
N
P
)
N
:=
{}
.
...
...
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