Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
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
Operate
Environments
Monitor
Incidents
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
Tej Chajed
iris
Commits
e241324a
Commit
e241324a
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
consistent naming for the CMRAs making up Iris resources: iGst, iPst, iWld
parent
d543c264
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
iris/model.v
+7
-1
7 additions, 1 deletion
iris/model.v
iris/ownership.v
+2
-2
2 additions, 2 deletions
iris/ownership.v
iris/pviewshifts.v
+2
-2
2 additions, 2 deletions
iris/pviewshifts.v
iris/viewshifts.v
+2
-2
2 additions, 2 deletions
iris/viewshifts.v
iris/wsat.v
+1
-1
1 addition, 1 deletion
iris/wsat.v
with
14 additions
and
8 deletions
iris/model.v
+
7
−
1
View file @
e241324a
...
@@ -24,7 +24,9 @@ End iProp.
...
@@ -24,7 +24,9 @@ End iProp.
Definition
iPreProp
(
Σ
:
iParam
)
:
cofeT
:=
iProp
.
result
Σ
.
Definition
iPreProp
(
Σ
:
iParam
)
:
cofeT
:=
iProp
.
result
Σ
.
Notation
iRes
Σ
:=
(
res
Σ
(
laterC
(
iPreProp
Σ
)))
.
Notation
iRes
Σ
:=
(
res
Σ
(
laterC
(
iPreProp
Σ
)))
.
Notation
iResRA
Σ
:=
(
resRA
Σ
(
laterC
(
iPreProp
Σ
)))
.
Notation
iResRA
Σ
:=
(
resRA
Σ
(
laterC
(
iPreProp
Σ
)))
.
Notation
iCMRA
Σ
:=
(
icmra
Σ
(
laterC
(
iPreProp
Σ
)))
.
Notation
iWld
Σ
:=
(
mapRA
positive
(
agreeRA
(
laterC
(
iPreProp
Σ
))))
.
Notation
iPst
Σ
:=
(
exclRA
(
istateC
Σ
))
.
Notation
iGst
Σ
:=
(
icmra
Σ
(
laterC
(
iPreProp
Σ
)))
.
Definition
iProp
(
Σ
:
iParam
)
:
cofeT
:=
uPredC
(
iResRA
Σ
)
.
Definition
iProp
(
Σ
:
iParam
)
:
cofeT
:=
uPredC
(
iResRA
Σ
)
.
Definition
iProp_unfold
{
Σ
}
:
iProp
Σ
-
n
>
iPreProp
Σ
:=
solution_fold
_
.
Definition
iProp_unfold
{
Σ
}
:
iProp
Σ
-
n
>
iPreProp
Σ
:=
solution_fold
_
.
Definition
iProp_fold
{
Σ
}
:
iPreProp
Σ
-
n
>
iProp
Σ
:=
solution_unfold
_
.
Definition
iProp_fold
{
Σ
}
:
iPreProp
Σ
-
n
>
iProp
Σ
:=
solution_unfold
_
.
...
@@ -38,3 +40,7 @@ Instance iProp_fold_inj n Σ : Injective (dist n) (dist n) (@iProp_fold Σ).
...
@@ -38,3 +40,7 @@ Instance iProp_fold_inj n Σ : Injective (dist n) (dist n) (@iProp_fold Σ).
Proof
.
by
intros
X
Y
H
;
rewrite
-
(
iProp_unfold_fold
X
)
H
iProp_unfold_fold
.
Qed
.
Proof
.
by
intros
X
Y
H
;
rewrite
-
(
iProp_unfold_fold
X
)
H
iProp_unfold_fold
.
Qed
.
Instance
iProp_unfold_inj
n
Σ
:
Injective
(
dist
n
)
(
dist
n
)
(
@
iProp_unfold
Σ
)
.
Instance
iProp_unfold_inj
n
Σ
:
Injective
(
dist
n
)
(
dist
n
)
(
@
iProp_unfold
Σ
)
.
Proof
.
by
intros
X
Y
H
;
rewrite
-
(
iProp_fold_unfold
X
)
H
iProp_fold_unfold
.
Qed
.
Proof
.
by
intros
X
Y
H
;
rewrite
-
(
iProp_fold_unfold
X
)
H
iProp_fold_unfold
.
Qed
.
Module
Test
.
(* Make sure we got the notations right. *)
Definition
iResTest
(
Σ
:
iParam
)
(
w
:
iWld
Σ
)
(
p
:
iPst
Σ
)
(
g
:
iGst
Σ
)
:
iRes
Σ
:=
Res
w
p
g
.
End
Test
.
This diff is collapsed.
Click to expand it.
iris/ownership.v
+
2
−
2
View file @
e241324a
...
@@ -4,7 +4,7 @@ Definition inv {Σ} (i : positive) (P : iProp Σ) : iProp Σ :=
...
@@ -4,7 +4,7 @@ Definition inv {Σ} (i : positive) (P : iProp Σ) : iProp Σ :=
uPred_own
(
Res
{[
i
↦
to_agree
(
Later
(
iProp_unfold
P
))
]}
∅
∅
)
.
uPred_own
(
Res
{[
i
↦
to_agree
(
Later
(
iProp_unfold
P
))
]}
∅
∅
)
.
Arguments
inv
{_}
_
_
%
I
.
Arguments
inv
{_}
_
_
%
I
.
Definition
ownP
{
Σ
}
(
σ
:
istate
Σ
)
:
iProp
Σ
:=
uPred_own
(
Res
∅
(
Excl
σ
)
∅
)
.
Definition
ownP
{
Σ
}
(
σ
:
istate
Σ
)
:
iProp
Σ
:=
uPred_own
(
Res
∅
(
Excl
σ
)
∅
)
.
Definition
ownG
{
Σ
}
(
m
:
i
CMRA
Σ
)
:
iProp
Σ
:=
uPred_own
(
Res
∅
∅
m
)
.
Definition
ownG
{
Σ
}
(
m
:
i
Gst
Σ
)
:
iProp
Σ
:=
uPred_own
(
Res
∅
∅
m
)
.
Instance
:
Params
(
@
inv
)
2
.
Instance
:
Params
(
@
inv
)
2
.
Instance
:
Params
(
@
ownP
)
1
.
Instance
:
Params
(
@
ownP
)
1
.
Instance
:
Params
(
@
ownG
)
1
.
Instance
:
Params
(
@
ownG
)
1
.
...
@@ -16,7 +16,7 @@ Context {Σ : iParam}.
...
@@ -16,7 +16,7 @@ Context {Σ : iParam}.
Implicit
Types
r
:
iRes
Σ
.
Implicit
Types
r
:
iRes
Σ
.
Implicit
Types
σ
:
istate
Σ
.
Implicit
Types
σ
:
istate
Σ
.
Implicit
Types
P
:
iProp
Σ
.
Implicit
Types
P
:
iProp
Σ
.
Implicit
Types
m
:
i
CMRA
Σ
.
Implicit
Types
m
:
i
Gst
Σ
.
(* Invariants *)
(* Invariants *)
Global
Instance
inv_contractive
i
:
Contractive
(
@
inv
Σ
i
)
.
Global
Instance
inv_contractive
i
:
Contractive
(
@
inv
Σ
i
)
.
...
...
This diff is collapsed.
Click to expand it.
iris/pviewshifts.v
+
2
−
2
View file @
e241324a
...
@@ -29,7 +29,7 @@ Instance: Params (@pvs) 3.
...
@@ -29,7 +29,7 @@ Instance: Params (@pvs) 3.
Section
pvs
.
Section
pvs
.
Context
{
Σ
:
iParam
}
.
Context
{
Σ
:
iParam
}
.
Implicit
Types
P
Q
:
iProp
Σ
.
Implicit
Types
P
Q
:
iProp
Σ
.
Implicit
Types
m
:
i
CMRA
Σ
.
Implicit
Types
m
:
i
Gst
Σ
.
Transparent
uPred_holds
.
Transparent
uPred_holds
.
Global
Instance
pvs_ne
E1
E2
n
:
Proper
(
dist
n
==>
dist
n
)
(
@
pvs
Σ
E1
E2
)
.
Global
Instance
pvs_ne
E1
E2
n
:
Proper
(
dist
n
==>
dist
n
)
(
@
pvs
Σ
E1
E2
)
.
...
@@ -96,7 +96,7 @@ Proof.
...
@@ -96,7 +96,7 @@ Proof.
*
by
rewrite
-
(
left_id_L
∅
(
∪
)
Ef
)
.
*
by
rewrite
-
(
left_id_L
∅
(
∪
)
Ef
)
.
*
apply
uPred_weaken
with
r
n
;
auto
.
*
apply
uPred_weaken
with
r
n
;
auto
.
Qed
.
Qed
.
Lemma
pvs_updateP
E
m
(
P
:
i
CMRA
Σ
→
Prop
)
:
Lemma
pvs_updateP
E
m
(
P
:
i
Gst
Σ
→
Prop
)
:
m
⇝:
P
→
ownG
m
⊑
pvs
E
E
(
∃
m'
,
■
P
m'
∧
ownG
m'
)
.
m
⇝:
P
→
ownG
m
⊑
pvs
E
E
(
∃
m'
,
■
P
m'
∧
ownG
m'
)
.
Proof
.
Proof
.
intros
Hup
r
[|
n
]
?
Hinv
%
ownG_spec
rf
[|
k
]
Ef
σ
???;
try
lia
.
intros
Hup
r
[|
n
]
?
Hinv
%
ownG_spec
rf
[|
k
]
Ef
σ
???;
try
lia
.
...
...
This diff is collapsed.
Click to expand it.
iris/viewshifts.v
+
2
−
2
View file @
e241324a
...
@@ -16,7 +16,7 @@ Notation "P >{ E }> Q" := (True ⊑ vs E E P%I Q%I)
...
@@ -16,7 +16,7 @@ Notation "P >{ E }> Q" := (True ⊑ vs E E P%I Q%I)
Section
vs
.
Section
vs
.
Context
{
Σ
:
iParam
}
.
Context
{
Σ
:
iParam
}
.
Implicit
Types
P
Q
:
iProp
Σ
.
Implicit
Types
P
Q
:
iProp
Σ
.
Implicit
Types
m
:
i
CMRA
Σ
.
Implicit
Types
m
:
i
Gst
Σ
.
Import
uPred
.
Import
uPred
.
Lemma
vs_alt
E1
E2
P
Q
:
P
⊑
pvs
E1
E2
Q
→
P
>
{
E1
,
E2
}
>
Q
.
Lemma
vs_alt
E1
E2
P
Q
:
P
⊑
pvs
E1
E2
Q
→
P
>
{
E1
,
E2
}
>
Q
.
...
@@ -85,7 +85,7 @@ Proof.
...
@@ -85,7 +85,7 @@ Proof.
intros
;
rewrite
-
{
1
}(
left_id_L
∅
(
∪
)
E
)
-
vs_mask_frame
;
last
solve_elem_of
.
intros
;
rewrite
-
{
1
}(
left_id_L
∅
(
∪
)
E
)
-
vs_mask_frame
;
last
solve_elem_of
.
apply
vs_close
.
apply
vs_close
.
Qed
.
Qed
.
Lemma
vs_updateP
E
m
(
P
:
i
CMRA
Σ
→
Prop
)
:
Lemma
vs_updateP
E
m
(
P
:
i
Gst
Σ
→
Prop
)
:
m
⇝:
P
→
ownG
m
>
{
E
}
>
(
∃
m'
,
■
P
m'
∧
ownG
m'
)
.
m
⇝:
P
→
ownG
m
>
{
E
}
>
(
∃
m'
,
■
P
m'
∧
ownG
m'
)
.
Proof
.
by
intros
;
apply
vs_alt
,
pvs_updateP
.
Qed
.
Proof
.
by
intros
;
apply
vs_alt
,
pvs_updateP
.
Qed
.
Lemma
vs_update
E
m
m'
:
m
⇝
m'
→
ownG
m
>
{
E
}
>
ownG
m'
.
Lemma
vs_update
E
m
m'
:
m
⇝
m'
→
ownG
m
>
{
E
}
>
ownG
m'
.
...
...
This diff is collapsed.
Click to expand it.
iris/wsat.v
+
1
−
1
View file @
e241324a
...
@@ -120,7 +120,7 @@ Proof.
...
@@ -120,7 +120,7 @@ Proof.
split
;
[
done
|
exists
rs
]
.
split
;
[
done
|
exists
rs
]
.
by
constructor
;
split_ands'
;
try
(
rewrite
/=
-
(
associative
_)
Hpst'
)
.
by
constructor
;
split_ands'
;
try
(
rewrite
/=
-
(
associative
_)
Hpst'
)
.
Qed
.
Qed
.
Lemma
wsat_update_gst
n
E
σ
r
rf
m1
(
P
:
i
CMRA
Σ
→
Prop
)
:
Lemma
wsat_update_gst
n
E
σ
r
rf
m1
(
P
:
i
Gst
Σ
→
Prop
)
:
m1
≼
{
S
n
}
gst
r
→
m1
⇝:
P
→
m1
≼
{
S
n
}
gst
r
→
m1
⇝:
P
→
wsat
(
S
n
)
E
σ
(
r
⋅
rf
)
→
∃
m2
,
wsat
(
S
n
)
E
σ
(
update_gst
m2
r
⋅
rf
)
∧
P
m2
.
wsat
(
S
n
)
E
σ
(
r
⋅
rf
)
→
∃
m2
,
wsat
(
S
n
)
E
σ
(
update_gst
m2
r
⋅
rf
)
∧
P
m2
.
Proof
.
Proof
.
...
...
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