Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rodolphe Lepigre
Iris
Commits
4c1a0469
Commit
4c1a0469
authored
Jun 16, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make exclusive stuff more consistent.
parent
4397cde3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
17 deletions
+22
-17
algebra/cmra.v
algebra/cmra.v
+19
-14
algebra/updates.v
algebra/updates.v
+2
-2
heap_lang/heap.v
heap_lang/heap.v
+1
-1
No files found.
algebra/cmra.v
View file @
4c1a0469
...
@@ -128,8 +128,8 @@ Class Persistent {A : cmraT} (x : A) := persistent : pcore x ≡ Some x.
...
@@ -128,8 +128,8 @@ Class Persistent {A : cmraT} (x : A) := persistent : pcore x ≡ Some x.
Arguments
persistent
{
_
}
_
{
_
}.
Arguments
persistent
{
_
}
_
{
_
}.
(** * Exclusive elements (i.e., elements that cannot have a frame). *)
(** * Exclusive elements (i.e., elements that cannot have a frame). *)
Class
Exclusive
{
A
:
cmraT
}
(
x
:
A
)
:
=
exclusive0_
r
:
∀
y
,
✓
{
0
}
(
x
⋅
y
)
→
False
.
Class
Exclusive
{
A
:
cmraT
}
(
x
:
A
)
:
=
exclusive0_
l
y
:
✓
{
0
}
(
x
⋅
y
)
→
False
.
Arguments
exclusive0_
r
{
_
}
_
{
_
}
_
_
.
Arguments
exclusive0_
l
{
_
}
_
{
_
}
_
_
.
(** * CMRAs whose core is total *)
(** * CMRAs whose core is total *)
(** The function [core] may return a dummy when used on CMRAs without total
(** The function [core] may return a dummy when used on CMRAs without total
...
@@ -318,16 +318,14 @@ Lemma persistent_dup x `{!Persistent x} : x ≡ x ⋅ x.
...
@@ -318,16 +318,14 @@ Lemma persistent_dup x `{!Persistent x} : x ≡ x ⋅ x.
Proof
.
by
apply
cmra_pcore_dup'
with
x
.
Qed
.
Proof
.
by
apply
cmra_pcore_dup'
with
x
.
Qed
.
(** ** Exclusive elements *)
(** ** Exclusive elements *)
Lemma
exclusiveN_r
x
`
{!
Exclusive
x
}
:
Lemma
exclusiveN_l
n
x
`
{!
Exclusive
x
}
y
:
✓
{
n
}
(
x
⋅
y
)
→
False
.
∀
(
n
:
nat
)
(
y
:
A
),
✓
{
n
}
(
x
⋅
y
)
→
False
.
Proof
.
intros
?%
cmra_validN_le
%
exclusive0_l
;
auto
with
arith
.
Qed
.
Proof
.
intros
???%
cmra_validN_le
%
exclusive0_r
;
auto
with
arith
.
Qed
.
Lemma
exclusiveN_r
n
x
`
{!
Exclusive
x
}
y
:
✓
{
n
}
(
y
⋅
x
)
→
False
.
Lemma
exclusiveN_l
x
`
{!
Exclusive
x
}
:
Proof
.
rewrite
comm
.
by
apply
exclusiveN_l
.
Qed
.
∀
(
n
:
nat
)
(
y
:
A
),
✓
{
n
}
(
y
⋅
x
)
→
False
.
Lemma
exclusive_l
x
`
{!
Exclusive
x
}
y
:
✓
(
x
⋅
y
)
→
False
.
Proof
.
intros
??.
rewrite
comm
.
by
apply
exclusiveN_r
.
Qed
.
Proof
.
by
move
/
cmra_valid_validN
/(
_
0
)
/
exclusive0_l
.
Qed
.
Lemma
exclusive_r
x
`
{!
Exclusive
x
}
:
∀
(
y
:
A
),
✓
(
x
⋅
y
)
→
False
.
Lemma
exclusive_r
x
`
{!
Exclusive
x
}
y
:
✓
(
y
⋅
x
)
→
False
.
Proof
.
by
intros
?
?%
cmra_valid_validN
%(
exclusiveN_r
_
0
).
Qed
.
Proof
.
rewrite
comm
.
by
apply
exclusive_l
.
Qed
.
Lemma
exclusive_l
x
`
{!
Exclusive
x
}
:
∀
(
y
:
A
),
✓
(
y
⋅
x
)
→
False
.
Proof
.
by
intros
?
?%
cmra_valid_validN
%(
exclusiveN_l
_
0
).
Qed
.
(** ** Order *)
(** ** Order *)
Lemma
cmra_included_includedN
n
x
y
:
x
≼
y
→
x
≼
{
n
}
y
.
Lemma
cmra_included_includedN
n
x
y
:
x
≼
y
→
x
≼
{
n
}
y
.
...
@@ -868,9 +866,9 @@ Section prod.
...
@@ -868,9 +866,9 @@ Section prod.
Proof
.
by
rewrite
/
Persistent
prod_pcore_Some'
.
Qed
.
Proof
.
by
rewrite
/
Persistent
prod_pcore_Some'
.
Qed
.
Global
Instance
pair_exclusive_l
x
y
:
Exclusive
x
→
Exclusive
(
x
,
y
).
Global
Instance
pair_exclusive_l
x
y
:
Exclusive
x
→
Exclusive
(
x
,
y
).
Proof
.
by
intros
?[][?%
exclusive0_
r
].
Qed
.
Proof
.
by
intros
?[][?%
exclusive0_
l
].
Qed
.
Global
Instance
pair_exclusive_r
x
y
:
Exclusive
y
→
Exclusive
(
x
,
y
).
Global
Instance
pair_exclusive_r
x
y
:
Exclusive
y
→
Exclusive
(
x
,
y
).
Proof
.
by
intros
?[][??%
exclusive0_
r
].
Qed
.
Proof
.
by
intros
?[][??%
exclusive0_
l
].
Qed
.
End
prod
.
End
prod
.
Arguments
prodR
:
clear
implicits
.
Arguments
prodR
:
clear
implicits
.
...
@@ -1045,6 +1043,13 @@ Section option.
...
@@ -1045,6 +1043,13 @@ Section option.
Global
Instance
option_persistent
(
mx
:
option
A
)
:
Global
Instance
option_persistent
(
mx
:
option
A
)
:
(
∀
x
:
A
,
Persistent
x
)
→
Persistent
mx
.
(
∀
x
:
A
,
Persistent
x
)
→
Persistent
mx
.
Proof
.
intros
.
destruct
mx
;
apply
_
.
Qed
.
Proof
.
intros
.
destruct
mx
;
apply
_
.
Qed
.
Lemma
exclusiveN_Some_l
n
x
`
{!
Exclusive
x
}
my
:
✓
{
n
}
(
Some
x
⋅
my
)
→
my
=
None
.
Proof
.
destruct
my
.
move
=>
/(
exclusiveN_l
_
x
)
[].
done
.
Qed
.
Lemma
exclusiveN_Some_r
n
x
`
{!
Exclusive
x
}
my
:
✓
{
n
}
(
my
⋅
Some
x
)
→
my
=
None
.
Proof
.
rewrite
comm
.
by
apply
exclusiveN_Some_l
.
Qed
.
End
option
.
End
option
.
Arguments
optionR
:
clear
implicits
.
Arguments
optionR
:
clear
implicits
.
...
...
algebra/updates.v
View file @
4c1a0469
...
@@ -56,7 +56,7 @@ Proof. split; auto with typeclass_instances. Qed.
...
@@ -56,7 +56,7 @@ Proof. split; auto with typeclass_instances. Qed.
Global
Instance
exclusive_local_update
y
:
Global
Instance
exclusive_local_update
y
:
LocalUpdate
Exclusive
(
λ
_
,
y
)
|
1000
.
LocalUpdate
Exclusive
(
λ
_
,
y
)
|
1000
.
Proof
.
split
.
apply
_
.
by
intros
?????%
exclusiveN_
r
.
Qed
.
Proof
.
split
.
apply
_
.
by
intros
?????%
exclusiveN_
l
.
Qed
.
(** ** Frame preserving updates *)
(** ** Frame preserving updates *)
Lemma
cmra_update_updateP
x
y
:
x
~~>
y
↔
x
~~>
:
(
y
=).
Lemma
cmra_update_updateP
x
y
:
x
~~>
y
↔
x
~~>
:
(
y
=).
...
@@ -83,7 +83,7 @@ Proof.
...
@@ -83,7 +83,7 @@ Proof.
Qed
.
Qed
.
Lemma
cmra_update_exclusive
`
{!
Exclusive
x
}
y
:
Lemma
cmra_update_exclusive
`
{!
Exclusive
x
}
y
:
✓
y
→
x
~~>
y
.
✓
y
→
x
~~>
y
.
Proof
.
move
=>??[
z
|]=>[/
exclusiveN_
r
[]|
_
].
by
apply
cmra_valid_validN
.
Qed
.
Proof
.
move
=>??[
z
|]=>[/
exclusiveN_
l
[]|
_
].
by
apply
cmra_valid_validN
.
Qed
.
Lemma
cmra_updateP_op
(
P1
P2
Q
:
A
→
Prop
)
x1
x2
:
Lemma
cmra_updateP_op
(
P1
P2
Q
:
A
→
Prop
)
x1
x2
:
x1
~~>
:
P1
→
x2
~~>
:
P2
→
(
∀
y1
y2
,
P1
y1
→
P2
y2
→
Q
(
y1
⋅
y2
))
→
x1
~~>
:
P1
→
x2
~~>
:
P2
→
(
∀
y1
y2
,
P1
y1
→
P2
y2
→
Q
(
y1
⋅
y2
))
→
...
...
heap_lang/heap.v
View file @
4c1a0469
...
@@ -89,7 +89,7 @@ Section heap.
...
@@ -89,7 +89,7 @@ Section heap.
Proof
.
Proof
.
intros
Hv
l'
;
move
:
(
Hv
l'
).
destruct
(
decide
(
l'
=
l
))
as
[->|].
intros
Hv
l'
;
move
:
(
Hv
l'
).
destruct
(
decide
(
l'
=
l
))
as
[->|].
-
rewrite
!
lookup_op
!
lookup_singleton
.
-
rewrite
!
lookup_op
!
lookup_singleton
.
by
case
:
(
h
!!
l
)=>
[
x
|]
//
/
Some_valid
/
exclusive_
r
.
by
case
:
(
h
!!
l
)=>
[
x
|]
//
/
Some_valid
/
exclusive_
l
.
-
by
rewrite
!
lookup_op
!
lookup_singleton_ne
.
-
by
rewrite
!
lookup_op
!
lookup_singleton_ne
.
Qed
.
Qed
.
Hint
Resolve
heap_store_valid
.
Hint
Resolve
heap_store_valid
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment