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
560bd3a9
Commit
560bd3a9
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
change naming conventions for LocalUpdates: L is the function, Lv the validity
parent
88c1dd29
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
algebra/auth.v
+9
-9
9 additions, 9 deletions
algebra/auth.v
algebra/cmra.v
+8
-8
8 additions, 8 deletions
algebra/cmra.v
algebra/fin_maps.v
+3
-3
3 additions, 3 deletions
algebra/fin_maps.v
with
20 additions
and
20 deletions
algebra/auth.v
+
9
−
9
View file @
560bd3a9
...
...
@@ -157,12 +157,12 @@ Proof.
split
;
[
by
rewrite
Ha'
left_id
associative
;
apply
cmra_includedN_l
|
done
]
.
Qed
.
Lemma
auth_local_update
f
`{
!
LocalUpdate
P
f
}
a
a'
:
P
a
→
✓
(
f
a'
)
→
●
a'
⋅
◯
a
~~>
●
f
a'
⋅
◯
f
a
.
Lemma
auth_local_update
L
`{
!
LocalUpdate
Lv
L
}
a
a'
:
Lv
a
→
✓
(
L
a'
)
→
●
a'
⋅
◯
a
~~>
●
L
a'
⋅
◯
L
a
.
Proof
.
intros
.
apply
auth_update
=>
n
af
?
EQ
;
split
;
last
done
.
by
rewrite
EQ
(
local_updateN
f
)
//
-
EQ
.
by
rewrite
EQ
(
local_updateN
L
)
//
-
EQ
.
Qed
.
Lemma
auth_update_op_l
a
a'
b
:
...
...
@@ -173,15 +173,15 @@ Lemma auth_update_op_r a a' b :
Proof
.
rewrite
-!
(
commutative
_
b
);
apply
auth_update_op_l
.
Qed
.
(* This does not seem to follow from auth_local_update.
The trouble is that given ✓ (
f
a ⋅ a'),
P
a
The trouble is that given ✓ (
L
a ⋅ a'),
Lv
a
we need ✓ (a ⋅ a'). I think this should hold for every local update,
but adding an extra axiom to local updates just for this is silly. *)
Lemma
auth_local_update_l
f
`{
!
LocalUpdate
P
f
}
a
a'
:
P
a
→
✓
(
f
a
⋅
a'
)
→
●
(
a
⋅
a'
)
⋅
◯
a
~~>
●
(
f
a
⋅
a'
)
⋅
◯
f
a
.
Lemma
auth_local_update_l
L
`{
!
LocalUpdate
Lv
L
}
a
a'
:
Lv
a
→
✓
(
L
a
⋅
a'
)
→
●
(
a
⋅
a'
)
⋅
◯
a
~~>
●
(
L
a
⋅
a'
)
⋅
◯
L
a
.
Proof
.
intros
.
apply
auth_update
=>
n
af
?
EQ
;
split
;
last
done
.
by
rewrite
-
(
local_updateN
f
)
//
EQ
-
(
local_updateN
f
)
//
-
EQ
.
by
rewrite
-
(
local_updateN
L
)
//
EQ
-
(
local_updateN
L
)
//
-
EQ
.
Qed
.
End
cmra
.
...
...
This diff is collapsed.
Click to expand it.
algebra/cmra.v
+
8
−
8
View file @
560bd3a9
...
...
@@ -137,9 +137,9 @@ Class CMRAMonotone {A B : cmraT} (f : A → B) := {
}
.
(** * Local updates *)
Class
LocalUpdate
{
A
:
cmraT
}
(
P
:
A
→
Prop
)
(
f
:
A
→
A
)
:=
{
local_update_ne
n
:>
Proper
(
dist
n
==>
dist
n
)
f
;
local_updateN
n
x
y
:
P
x
→
✓
{
n
}
(
x
⋅
y
)
→
f
(
x
⋅
y
)
≡
{
n
}
≡
f
x
⋅
y
Class
LocalUpdate
{
A
:
cmraT
}
(
Lv
:
A
→
Prop
)
(
L
:
A
→
A
)
:=
{
local_update_ne
n
:>
Proper
(
dist
n
==>
dist
n
)
L
;
local_updateN
n
x
y
:
Lv
x
→
✓
{
n
}
(
x
⋅
y
)
→
L
(
x
⋅
y
)
≡
{
n
}
≡
L
x
⋅
y
}
.
Arguments
local_updateN
{_
_}
_
{_}
_
_
_
_
_
.
...
...
@@ -322,13 +322,13 @@ Section identity.
End
identity
.
(** ** Local updates *)
Global
Instance
local_update_proper
P
(
f
:
A
→
A
)
:
LocalUpdate
P
f
→
Proper
((
≡
)
==>
(
≡
))
f
.
Global
Instance
local_update_proper
Lv
(
L
:
A
→
A
)
:
LocalUpdate
Lv
L
→
Proper
((
≡
)
==>
(
≡
))
L
.
Proof
.
intros
;
apply
(
ne_proper
_)
.
Qed
.
Lemma
local_update
f
`{
!
LocalUpdate
P
f
}
x
y
:
P
x
→
✓
(
x
⋅
y
)
→
f
(
x
⋅
y
)
≡
f
x
⋅
y
.
Proof
.
by
rewrite
equiv_dist
=>??
n
;
apply
(
local_updateN
f
)
.
Qed
.
Lemma
local_update
L
`{
!
LocalUpdate
Lv
L
}
x
y
:
Lv
x
→
✓
(
x
⋅
y
)
→
L
(
x
⋅
y
)
≡
L
x
⋅
y
.
Proof
.
by
rewrite
equiv_dist
=>??
n
;
apply
(
local_updateN
L
)
.
Qed
.
Global
Instance
local_update_op
x
:
LocalUpdate
(
λ
_,
True
)
(
op
x
)
.
Proof
.
split
.
apply
_
.
by
intros
n
y1
y2
_
_;
rewrite
associative
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
algebra/fin_maps.v
+
3
−
3
View file @
560bd3a9
...
...
@@ -288,14 +288,14 @@ End freshness.
(* Deallocation is not a local update. The trouble is that if we own {[ i ↦ x ]},
then the frame could always own "unit x", and prevent deallocation. *)
Global
Instance
map_alter_update
`{
!
LocalUpdate
P
f
}
i
:
LocalUpdate
(
λ
m
,
∃
x
,
m
!!
i
=
Some
x
∧
P
x
)
(
alter
f
i
)
.
Global
Instance
map_alter_update
`{
!
LocalUpdate
Lv
L
}
i
:
LocalUpdate
(
λ
m
,
∃
x
,
m
!!
i
=
Some
x
∧
Lv
x
)
(
alter
L
i
)
.
Proof
.
split
;
first
apply
_
.
intros
n
m1
m2
(
x
&
Hix
&
?)
Hm
j
;
destruct
(
decide
(
i
=
j
))
as
[
->
|]
.
-
rewrite
lookup_alter
!
lookup_op
lookup_alter
Hix
/=.
move
:
(
Hm
j
);
rewrite
lookup_op
Hix
.
case
:
(
m2
!!
j
)=>[
y
|]
//=
;
constructor
.
by
apply
(
local_updateN
f
)
.
case
:
(
m2
!!
j
)=>[
y
|]
//=
;
constructor
.
by
apply
(
local_updateN
L
)
.
-
by
rewrite
lookup_op
!
lookup_alter_ne
//
lookup_op
.
Qed
.
End
properties
.
...
...
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