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
Simcha van Collem
Iris
Commits
5ee92991
Commit
5ee92991
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Remove global mask from thread local invariants as suggested by Ralf.
parent
d7ee81fd
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
base_logic/lib/thread_local.v
+11
-13
11 additions, 13 deletions
base_logic/lib/thread_local.v
with
11 additions
and
13 deletions
base_logic/lib/thread_local.v
+
11
−
13
View file @
5ee92991
...
@@ -3,7 +3,6 @@ From iris.algebra Require Export gmap gset coPset.
...
@@ -3,7 +3,6 @@ From iris.algebra Require Export gmap gset coPset.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
proofmode
Require
Import
tactics
.
Import
uPred
.
Import
uPred
.
Definition
tlN
:
namespace
:=
nroot
.
@
"tl"
.
Definition
thread_id
:=
gname
.
Definition
thread_id
:=
gname
.
Class
thread_localG
Σ
:=
Class
thread_localG
Σ
:=
...
@@ -17,7 +16,7 @@ Section defs.
...
@@ -17,7 +16,7 @@ Section defs.
Definition
tl_inv
(
tid
:
thread_id
)
(
N
:
namespace
)
(
P
:
iProp
Σ
)
:
iProp
Σ
:=
Definition
tl_inv
(
tid
:
thread_id
)
(
N
:
namespace
)
(
P
:
iProp
Σ
)
:
iProp
Σ
:=
(
∃
i
,
⌜
i
∈
↑
N
⌝
∧
(
∃
i
,
⌜
i
∈
↑
N
⌝
∧
inv
tl
N
(
P
∗
own
tid
(
∅
,
GSet
{[
i
]})
∨
tl_own
tid
{[
i
]}))
%
I
.
inv
N
(
P
∗
own
tid
(
∅
,
GSet
{[
i
]})
∨
tl_own
tid
{[
i
]}))
%
I
.
End
defs
.
End
defs
.
Instance
:
Params
(
@
tl_inv
)
3
.
Instance
:
Params
(
@
tl_inv
)
3
.
...
@@ -65,26 +64,25 @@ Section proofs.
...
@@ -65,26 +64,25 @@ Section proofs.
apply
of_gset_finite
.
}
apply
of_gset_finite
.
}
simpl
.
iDestruct
"Hm"
as
%
(
<-
&
i
&
->
&
?)
.
simpl
.
iDestruct
"Hm"
as
%
(
<-
&
i
&
->
&
?)
.
rewrite
/
tl_inv
.
rewrite
/
tl_inv
.
iMod
(
inv_alloc
tl
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
.
Qed
.
Qed
.
Lemma
tl_inv_open
tid
tlE
E
N
P
:
Lemma
tl_inv_open
tid
E
N
P
:
↑
tlN
⊆
tlE
→
↑
N
⊆
E
→
↑
N
⊆
E
→
tl_inv
tid
N
P
-∗
tl_own
tid
E
=
{
tl
E
}
=∗
▷
P
∗
tl_own
tid
(
E
∖↑
N
)
∗
tl_inv
tid
N
P
-∗
tl_own
tid
E
=
{
E
}
=∗
▷
P
∗
tl_own
tid
(
E
∖↑
N
)
∗
(
▷
P
∗
tl_own
tid
(
E
∖↑
N
)
=
{
tl
E
}
=∗
tl_own
tid
E
)
.
(
▷
P
∗
tl_own
tid
(
E
∖↑
N
)
=
{
E
}
=∗
tl_own
tid
E
)
.
Proof
.
Proof
.
rewrite
/
tl_inv
.
iIntros
(?
?
)
"#Htlinv Htoks"
.
rewrite
/
tl_inv
.
iIntros
(?)
"#Htlinv Htoks"
.
iDestruct
"Htlinv"
as
(
i
)
"[% Hinv]"
.
iDestruct
"Htlinv"
as
(
i
)
"[% Hinv]"
.
rewrite
{
1
4
}(
union_difference_L
(
↑
N
)
E
)
//.
rewrite
{
1
8
}(
union_difference_L
(
↑
N
)
E
)
//.
rewrite
{
1
5
}(
union_difference_L
{[
i
]}
(
↑
N
))
?tl_own_union
;
[|
set_solver
..]
.
rewrite
{
1
5
}(
union_difference_L
{[
i
]}
(
↑
N
))
?tl_own_union
;
[|
set_solver
..]
.
iDestruct
"Htoks"
as
"[[Htoki $] $]"
.
iDestruct
"Htoks"
as
"[[Htoki $] $]"
.
iInv
tl
N
as
"[[$ >Hdis]|>Htoki2]"
"Hclose"
.
iInv
N
as
"[[$ >Hdis]|>Htoki2]"
"Hclose"
.
-
iMod
(
"Hclose"
with
"[Htoki]"
)
as
"_"
;
first
auto
.
-
iMod
(
"Hclose"
with
"[Htoki]"
)
as
"_"
;
first
auto
.
iIntros
"!> [HP $]"
.
iIntros
"!> [HP $]"
.
iInv
tlN
as
"[[_ >Hdis2]|>Hitok]"
"Hclose"
.
iInv
N
as
"[[_ >Hdis2]|>Hitok]"
"Hclose"
.
+
iCombine
"Hdis"
"Hdis2"
as
"Hdis"
.
+
iDestruct
(
own_valid_2
with
"Hdis Hdis2"
)
as
%
[_
Hval
%
gset_disj_valid_op
]
.
iDestruct
(
own_valid
with
"Hdis"
)
as
%
[_
Hval
%
gset_disj_valid_op
]
.
set_solver
.
set_solver
.
+
iFrame
.
iApply
"Hclose"
.
iNext
.
iLeft
.
by
iFrame
.
+
iFrame
.
iApply
"Hclose"
.
iNext
.
iLeft
.
by
iFrame
.
-
iDestruct
(
tl_own_disjoint
tid
{[
i
]}
{[
i
]}
with
"[-]"
)
as
%
?;
first
by
iFrame
.
-
iDestruct
(
tl_own_disjoint
tid
{[
i
]}
{[
i
]}
with
"[-]"
)
as
%
?;
first
by
iFrame
.
...
...
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