Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
examples
Commits
099eb48a
Commit
099eb48a
authored
Sep 09, 2016
by
Zhen Zhang
Browse files
cleanups
parent
3f8c5a06
Changes
2
Hide whitespace changes
Inline
Side-by-side
srv.v
View file @
099eb48a
...
...
@@ -34,22 +34,7 @@ Definition mk_srv : val :=
release
"l"
;;
"ret"
.
(* play with some algebraic structure to see what fit ... *)
Definition
srvR
:
=
prodR
fracR
(
dec_agreeR
val
).
Lemma
srv_coincide
:
∀
(
x1
x2
:
val
)
(
q1
q2
:
Qp
),
✓
((
q1
,
DecAgree
x1
)
⋅
(
q2
,
DecAgree
x2
))
→
x1
=
x2
.
Proof
.
intros
x1
x2
q1
q2
H
.
destruct
(
decide
(
x1
=
x2
))=>//.
exfalso
.
destruct
H
as
[
H1
H2
].
simpl
in
H2
.
apply
dec_agree_op_inv
in
H2
.
by
inversion
H2
.
Qed
.
Lemma
srv_update
:
∀
(
x1
x2
:
val
),
(
1
%
Qp
,
DecAgree
x1
)
~~>
(
1
%
Qp
,
DecAgree
x2
).
Proof
.
intros
.
by
apply
cmra_update_exclusive
.
Qed
.
(* define the gFunctors *)
Class
srvG
Σ
:
=
FlatG
{
srv_tokG
:
>
inG
Σ
srvR
}.
Definition
srv
Σ
:
gFunctors
:
=
#[
GFunctor
(
constRF
srvR
)].
...
...
sync.v
View file @
099eb48a
...
...
@@ -106,7 +106,7 @@ Section generic.
Definition
gFrag
(
γ
:
gname
)
g
:
iProp
Σ
:
=
own
γ
(
gFragR
g
).
Definition
gFull
(
γ
:
gname
)
g
:
iProp
Σ
:
=
own
γ
(
gFullR
g
).
Global
Instance
frag_timeless
γ
g
:
TimelessP
(@
own
Σ
syncR
sync_tokG
γ
(
gFrag
R
g
)
)
.
Global
Instance
frag_timeless
γ
g
:
TimelessP
(
gFrag
γ
g
).
Proof
.
apply
_
.
Qed
.
Global
Instance
full_timeless
γ
g
:
TimelessP
(
gFull
γ
g
).
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment