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
E
examples
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
2
Merge Requests
2
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
Iris
examples
Commits
15c2936d
Commit
15c2936d
authored
Nov 19, 2017
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build with latest Iris
parent
f0b58e36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
opam
opam
+1
-1
theories/flat.v
theories/flat.v
+12
-8
No files found.
opam
View file @
15c2936d
...
...
@@ -9,5 +9,5 @@ build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_atomic"]
depends: [
"coq-iris" { (= "dev.2017-1
0-28.12
") | (= "dev") }
"coq-iris" { (= "dev.2017-1
1-18.1
") | (= "dev") }
]
theories/flat.v
View file @
15c2936d
...
...
@@ -50,12 +50,12 @@ Definition reqR := prodR fracR (agreeR valC). (* request x should be kept same *
Definition
toks
:
Type
:
=
gname
*
gname
*
gname
*
gname
*
gname
.
(* a bunch of tokens to do state transition *)
Class
flatG
Σ
:
=
FlatG
{
req_G
:
>
inG
Σ
reqR
;
sp_G
:
>
saved
PropG
Σ
(
ofe_funCF
val
idCF
)
sp_G
:
>
saved
AnythingG
Σ
(
▶
(
ofe_funCF
val
idCF
)
)
}.
Definition
flat
Σ
:
gFunctors
:
=
#[
GFunctor
(
constRF
reqR
)
;
saved
Prop
Σ
(
ofe_funCF
val
idCF
)
].
saved
Anything
Σ
(
▶
(
ofe_funCF
val
idCF
)
)
].
Instance
subG_flat
Σ
{
Σ
}
:
subG
flat
Σ
Σ
→
flatG
Σ
.
Proof
.
intros
[?%
subG_inG
[?
_
]%
subG_inv
]%
subG_inv
.
split
;
apply
_
.
Qed
.
...
...
@@ -70,7 +70,7 @@ Section proof.
let
'
(
γ
x
,
γ
1
,
_
,
γ
4
,
γ
q
)
:
=
ts
in
(
∃
(
P
:
val
→
iProp
Σ
)
Q
,
own
γ
x
((
1
/
2
)%
Qp
,
to_agree
x
)
∗
P
x
∗
({{
R
∗
P
x
}}
f
x
{{
v
,
R
∗
Q
x
v
}})
∗
saved_
prop_own
γ
q
(
Q
x
)
∗
own
γ
1
(
Excl
())
∗
own
γ
4
(
Excl
()))%
I
.
saved_
anything_own
γ
q
(
Next
$
Q
x
)
∗
own
γ
1
(
Excl
())
∗
own
γ
4
(
Excl
()))%
I
.
Definition
received_s
(
ts
:
toks
)
(
x
:
val
)
γ
r
:
=
let
'
(
γ
x
,
_
,
_
,
γ
4
,
_
)
:
=
ts
in
...
...
@@ -79,7 +79,7 @@ Section proof.
Definition
finished_s
(
ts
:
toks
)
(
x
y
:
val
)
:
=
let
'
(
γ
x
,
γ
1
,
_
,
γ
4
,
γ
q
)
:
=
ts
in
(
∃
Q
:
val
→
val
→
iProp
Σ
,
own
γ
x
((
1
/
2
)%
Qp
,
to_agree
x
)
∗
saved_
prop_own
γ
q
(
Q
x
)
∗
own
γ
x
((
1
/
2
)%
Qp
,
to_agree
x
)
∗
saved_
anything_own
γ
q
(
Next
$
Q
x
)
∗
Q
x
y
∗
own
γ
1
(
Excl
())
∗
own
γ
4
(
Excl
()))%
I
.
Definition
p_inv
R
(
γ
m
γ
r
:
gname
)
(
ts
:
toks
)
(
p
:
loc
)
:
=
...
...
@@ -99,7 +99,7 @@ Section proof.
Definition
installed_recp
(
ts
:
toks
)
(
x
:
val
)
(
Q
:
val
→
iProp
Σ
)
:
=
let
'
(
γ
x
,
_
,
γ
3
,
_
,
γ
q
)
:
=
ts
in
(
own
γ
3
(
Excl
())
∗
own
γ
x
((
1
/
2
)%
Qp
,
to_agree
x
)
∗
saved_
prop_own
γ
q
Q
)%
I
.
(
own
γ
3
(
Excl
())
∗
own
γ
x
((
1
/
2
)%
Qp
,
to_agree
x
)
∗
saved_
anything_own
γ
q
(
Next
Q
)
)%
I
.
Lemma
install_spec
R
P
Q
(
f
x
:
val
)
(
γ
m
γ
r
:
gname
)
(
s
:
loc
)
:
{{{
inv
N
(
srv_bag
R
γ
m
γ
r
s
)
∗
P
∗
({{
R
∗
P
}}
f
x
{{
v
,
R
∗
Q
v
}})
}}}
...
...
@@ -113,7 +113,7 @@ Section proof.
iMod
(
own_alloc
(
Excl
()))
as
(
γ
3
)
"Ho3"
;
first
done
.
iMod
(
own_alloc
(
Excl
()))
as
(
γ
4
)
"Ho4"
;
first
done
.
iMod
(
own_alloc
(
1
%
Qp
,
to_agree
x
))
as
(
γ
x
)
"Hx"
;
first
done
.
iMod
(
saved_
prop_alloc
(
F
:
=(
ofe_funCF
val
idCF
))
Q
)
as
(
γ
q
)
"#?"
.
iMod
(
saved_
anything_alloc
(
F
:
=(
▶
(
ofe_funCF
val
idCF
)))
(
Next
Q
)
)
as
(
γ
q
)
"#?"
.
iDestruct
(
own_update
with
"Hx"
)
as
">[Hx1 Hx2]"
;
first
by
apply
pair_l_frac_op_1'
.
iModIntro
.
wp_let
.
wp_bind
(
push
_
_
).
iMod
(
inv_alloc
N
_
(
p_inv
R
γ
m
γ
r
(
γ
x
,
γ
1
,
γ
3
,
γ
4
,
γ
q
)
p
)
...
...
@@ -181,7 +181,7 @@ Section proof.
Definition
own_
γ
3
(
ts
:
toks
)
:
=
let
'
(
_
,
_
,
γ
3
,
_
,
_
)
:
=
ts
in
own
γ
3
(
Excl
()).
Definition
finished_recp
(
ts
:
toks
)
(
x
y
:
val
)
:
=
let
'
(
γ
x
,
_
,
_
,
_
,
γ
q
)
:
=
ts
in
(
∃
Q
,
own
γ
x
((
1
/
2
)%
Qp
,
to_agree
x
)
∗
saved_
prop_own
γ
q
(
Q
x
)
∗
Q
x
y
)%
I
.
(
∃
Q
,
own
γ
x
((
1
/
2
)%
Qp
,
to_agree
x
)
∗
saved_
anything_own
γ
q
(
Next
$
Q
x
)
∗
Q
x
y
)%
I
.
Lemma
loop_iter_doOp_spec
R
(
γ
m
γ
r
:
gname
)
xs
:
∀
(
hd
:
loc
),
...
...
@@ -290,7 +290,11 @@ Section proof.
iNext
.
iIntros
(?
?)
"Hs"
.
iDestruct
"Hs"
as
(
Q'
)
"(Hx' & HoQ' & HQ')"
.
destruct
(
decide
(
x
=
a
))
as
[->|
Hneq
].
-
iDestruct
(
saved_prop_agree
with
"[$HoQ] [HoQ']"
)
as
"Heq"
;
first
by
iFrame
.
-
iDestruct
(
saved_anything_agree
with
"[$HoQ] [HoQ']"
)
as
"Heq"
;
first
by
iFrame
.
(* FIXME:
iDestruct (uPred.later_equivI with "Heq") as "Heq".
does the wrong thing. *)
rewrite
uPred
.
later_equivI
.
wp_let
.
iDestruct
(
uPred
.
ofe_funC_equivI
with
"Heq"
)
as
"Heq"
.
iSpecialize
(
"Heq"
$!
a0
).
by
iRewrite
-
"Heq"
in
"HQ'"
.
-
iExFalso
.
iCombine
"Hx"
"Hx'"
as
"Hx"
.
...
...
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