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
06edc222
Commit
06edc222
authored
Jun 11, 2019
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump Iris (C→O rename).
parent
43371d2a
Pipeline
#17768
failed with stage
in 15 minutes and 45 seconds
Changes
42
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
190 additions
and
190 deletions
+190
-190
opam
opam
+1
-1
theories/barrier/example_joining_existentials.v
theories/barrier/example_joining_existentials.v
+10
-10
theories/barrier/specification.v
theories/barrier/specification.v
+1
-1
theories/concurrent_stacks/concurrent_stack1.v
theories/concurrent_stacks/concurrent_stack1.v
+2
-2
theories/concurrent_stacks/concurrent_stack2.v
theories/concurrent_stacks/concurrent_stack2.v
+2
-2
theories/hocap/cg_bag.v
theories/hocap/cg_bag.v
+2
-2
theories/hocap/concurrent_runners.v
theories/hocap/concurrent_runners.v
+3
-3
theories/hocap/fg_bag.v
theories/hocap/fg_bag.v
+2
-2
theories/hocap/lib/oneshot.v
theories/hocap/lib/oneshot.v
+1
-1
theories/lecture_notes/coq_intro_example_2.v
theories/lecture_notes/coq_intro_example_2.v
+2
-2
theories/lecture_notes/lists_guarded.v
theories/lecture_notes/lists_guarded.v
+2
-2
theories/lecture_notes/modular_incr.v
theories/lecture_notes/modular_incr.v
+1
-1
theories/logatom/conditional_increment/cinc.v
theories/logatom/conditional_increment/cinc.v
+4
-4
theories/logatom/elimination_stack/hocap_spec.v
theories/logatom/elimination_stack/hocap_spec.v
+2
-2
theories/logatom/elimination_stack/stack.v
theories/logatom/elimination_stack/stack.v
+3
-3
theories/logatom/flat_combiner/atomic_sync.v
theories/logatom/flat_combiner/atomic_sync.v
+4
-4
theories/logatom/flat_combiner/flat.v
theories/logatom/flat_combiner/flat.v
+1
-1
theories/logatom/flat_combiner/misc.v
theories/logatom/flat_combiner/misc.v
+1
-1
theories/logatom/snapshot/atomic_snapshot.v
theories/logatom/snapshot/atomic_snapshot.v
+3
-3
theories/logatom/treiber2.v
theories/logatom/treiber2.v
+2
-2
theories/logrel/F_mu/fundamental.v
theories/logrel/F_mu/fundamental.v
+1
-1
theories/logrel/F_mu/lang.v
theories/logrel/F_mu/lang.v
+3
-3
theories/logrel/F_mu/logrel.v
theories/logrel/F_mu/logrel.v
+19
-19
theories/logrel/F_mu_ref/fundamental.v
theories/logrel/F_mu_ref/fundamental.v
+1
-1
theories/logrel/F_mu_ref/fundamental_binary.v
theories/logrel/F_mu_ref/fundamental_binary.v
+3
-3
theories/logrel/F_mu_ref/lang.v
theories/logrel/F_mu_ref/lang.v
+3
-3
theories/logrel/F_mu_ref/logrel.v
theories/logrel/F_mu_ref/logrel.v
+20
-20
theories/logrel/F_mu_ref/logrel_binary.v
theories/logrel/F_mu_ref/logrel_binary.v
+20
-20
theories/logrel/F_mu_ref/rules_binary.v
theories/logrel/F_mu_ref/rules_binary.v
+1
-1
theories/logrel/F_mu_ref_conc/examples/counter.v
theories/logrel/F_mu_ref_conc/examples/counter.v
+2
-2
theories/logrel/F_mu_ref_conc/examples/stack/refinement.v
theories/logrel/F_mu_ref_conc/examples/stack/refinement.v
+2
-2
theories/logrel/F_mu_ref_conc/examples/stack/stack_rules.v
theories/logrel/F_mu_ref_conc/examples/stack/stack_rules.v
+2
-2
theories/logrel/F_mu_ref_conc/fundamental_binary.v
theories/logrel/F_mu_ref_conc/fundamental_binary.v
+3
-3
theories/logrel/F_mu_ref_conc/fundamental_unary.v
theories/logrel/F_mu_ref_conc/fundamental_unary.v
+1
-1
theories/logrel/F_mu_ref_conc/lang.v
theories/logrel/F_mu_ref_conc/lang.v
+3
-3
theories/logrel/F_mu_ref_conc/logrel_binary.v
theories/logrel/F_mu_ref_conc/logrel_binary.v
+22
-22
theories/logrel/F_mu_ref_conc/logrel_unary.v
theories/logrel/F_mu_ref_conc/logrel_unary.v
+22
-22
theories/logrel/F_mu_ref_conc/rules_binary.v
theories/logrel/F_mu_ref_conc/rules_binary.v
+2
-2
theories/logrel/prelude/base.v
theories/logrel/prelude/base.v
+1
-1
theories/logrel_heaplang/ltyping.v
theories/logrel_heaplang/ltyping.v
+2
-2
theories/spanning_tree/mon.v
theories/spanning_tree/mon.v
+5
-5
theories/spanning_tree/spanning.v
theories/spanning_tree/spanning.v
+3
-3
No files found.
opam
View file @
06edc222
...
@@ -9,6 +9,6 @@ build: [make "-j%{jobs}%"]
...
@@ -9,6 +9,6 @@ build: [make "-j%{jobs}%"]
install: [make "install"]
install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_examples"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_examples"]
depends: [
depends: [
"coq-iris" { (= "dev.2019-06-1
3.0.860bd8e4
") | (= "dev") }
"coq-iris" { (= "dev.2019-06-1
8.2.e039d7c7
") | (= "dev") }
"coq-autosubst" { = "dev.coq86" }
"coq-autosubst" { = "dev.coq86" }
]
]
theories/barrier/example_joining_existentials.v
View file @
06edc222
...
@@ -6,16 +6,16 @@ From iris.proofmode Require Import tactics.
...
@@ -6,16 +6,16 @@ From iris.proofmode Require Import tactics.
From
iris_examples
.
barrier
Require
Import
proof
specification
.
From
iris_examples
.
barrier
Require
Import
proof
specification
.
Set
Default
Proof
Using
"Type"
.
Set
Default
Proof
Using
"Type"
.
Definition
one_shotR
(
Σ
:
gFunctors
)
(
F
:
c
Functor
)
:
=
Definition
one_shotR
(
Σ
:
gFunctors
)
(
F
:
o
Functor
)
:
=
csumR
(
exclR
unit
C
)
(
agreeR
$
laterC
$
F
(
iPreProp
Σ
)
_
).
csumR
(
exclR
unit
O
)
(
agreeR
$
laterO
$
F
(
iPreProp
Σ
)
_
).
Definition
Pending
{
Σ
F
}
:
one_shotR
Σ
F
:
=
Cinl
(
Excl
()).
Definition
Pending
{
Σ
F
}
:
one_shotR
Σ
F
:
=
Cinl
(
Excl
()).
Definition
Shot
{
Σ
}
{
F
:
c
Functor
}
(
x
:
F
(
iProp
Σ
)
_
)
:
one_shotR
Σ
F
:
=
Definition
Shot
{
Σ
}
{
F
:
o
Functor
}
(
x
:
F
(
iProp
Σ
)
_
)
:
one_shotR
Σ
F
:
=
Cinr
$
to_agree
$
Next
$
c
Functor_map
F
(
iProp_fold
,
iProp_unfold
)
x
.
Cinr
$
to_agree
$
Next
$
o
Functor_map
F
(
iProp_fold
,
iProp_unfold
)
x
.
Class
oneShotG
(
Σ
:
gFunctors
)
(
F
:
c
Functor
)
:
=
Class
oneShotG
(
Σ
:
gFunctors
)
(
F
:
o
Functor
)
:
=
one_shot_inG
:
>
inG
Σ
(
one_shotR
Σ
F
).
one_shot_inG
:
>
inG
Σ
(
one_shotR
Σ
F
).
Definition
oneShot
Σ
(
F
:
c
Functor
)
:
gFunctors
:
=
Definition
oneShot
Σ
(
F
:
o
Functor
)
:
gFunctors
:
=
#[
GFunctor
(
csumRF
(
exclRF
unit
C
)
(
agreeRF
(
▶
F
)))
].
#[
GFunctor
(
csumRF
(
exclRF
unit
O
)
(
agreeRF
(
▶
F
)))
].
Instance
subG_oneShot
Σ
{
Σ
F
}
:
subG
(
oneShot
Σ
F
)
Σ
→
oneShotG
Σ
F
.
Instance
subG_oneShot
Σ
{
Σ
F
}
:
subG
(
oneShot
Σ
F
)
Σ
→
oneShotG
Σ
F
.
Proof
.
solve_inG
.
Qed
.
Proof
.
solve_inG
.
Qed
.
...
@@ -59,12 +59,12 @@ Proof.
...
@@ -59,12 +59,12 @@ Proof.
iAssert
(
▷
(
x
≡
x'
))%
I
as
"Hxx"
.
iAssert
(
▷
(
x
≡
x'
))%
I
as
"Hxx"
.
{
iCombine
"Hγ"
"Hγ'"
as
"Hγ2"
.
iClear
"Hγ Hγ'"
.
{
iCombine
"Hγ"
"Hγ'"
as
"Hγ2"
.
iClear
"Hγ Hγ'"
.
rewrite
own_valid
csum_validI
/=
agree_validI
agree_equivI
bi
.
later_equivI
/=.
rewrite
own_valid
csum_validI
/=
agree_validI
agree_equivI
bi
.
later_equivI
/=.
rewrite
-{
2
}[
x
]
cFunctor_id
-{
2
}[
x'
]
c
Functor_id
.
rewrite
-{
2
}[
x
]
oFunctor_id
-{
2
}[
x'
]
o
Functor_id
.
assert
(
HF
:
cFunctor_map
F
(
cid
,
cid
)
≡
c
Functor_map
F
(
iProp_fold
(
Σ
:
=
Σ
)
◎
iProp_unfold
,
iProp_fold
(
Σ
:
=
Σ
)
◎
iProp_unfold
)).
assert
(
HF
:
oFunctor_map
F
(
cid
,
cid
)
≡
o
Functor_map
F
(
iProp_fold
(
Σ
:
=
Σ
)
◎
iProp_unfold
,
iProp_fold
(
Σ
:
=
Σ
)
◎
iProp_unfold
)).
{
apply
ne_proper
;
first
by
apply
_
.
{
apply
ne_proper
;
first
by
apply
_
.
by
split
;
intro
;
simpl
;
symmetry
;
apply
iProp_fold_unfold
.
}
by
split
;
intro
;
simpl
;
symmetry
;
apply
iProp_fold_unfold
.
}
rewrite
(
HF
x
).
rewrite
(
HF
x'
).
rewrite
(
HF
x
).
rewrite
(
HF
x'
).
rewrite
!
c
Functor_compose
.
iNext
.
by
iRewrite
"Hγ2"
.
}
rewrite
!
o
Functor_compose
.
iNext
.
by
iRewrite
"Hγ2"
.
}
iNext
.
iRewrite
-
"Hxx"
in
"Hx'"
.
iNext
.
iRewrite
-
"Hxx"
in
"Hx'"
.
iExists
x
;
iFrame
"Hγ"
.
iApply
(
Ψ
_join
with
"Hx Hx'"
).
iExists
x
;
iFrame
"Hγ"
.
iApply
(
Ψ
_join
with
"Hx Hx'"
).
Qed
.
Qed
.
...
...
theories/barrier/specification.v
View file @
06edc222
...
@@ -18,7 +18,7 @@ Lemma barrier_spec (N : namespace) :
...
@@ -18,7 +18,7 @@ Lemma barrier_spec (N : namespace) :
(
∀
l
P
Q
,
recv
l
(
P
∗
Q
)
={
↑
N
}=>
recv
l
P
∗
recv
l
Q
)
∧
(
∀
l
P
Q
,
recv
l
(
P
∗
Q
)
={
↑
N
}=>
recv
l
P
∗
recv
l
Q
)
∧
(
∀
l
P
Q
,
(
P
-
∗
Q
)
-
∗
recv
l
P
-
∗
recv
l
Q
).
(
∀
l
P
Q
,
(
P
-
∗
Q
)
-
∗
recv
l
P
-
∗
recv
l
Q
).
Proof
.
Proof
.
exists
(
λ
l
,
CofeMor
(
recv
N
l
)),
(
λ
l
,
Co
feMor
(
send
N
l
)).
exists
(
λ
l
,
OfeMor
(
recv
N
l
)),
(
λ
l
,
O
feMor
(
send
N
l
)).
split_and
?
;
simpl
.
split_and
?
;
simpl
.
-
iIntros
(
P
)
"!# _"
.
iApply
(
newbarrier_spec
_
P
with
"[]"
)
;
[
done
..|].
-
iIntros
(
P
)
"!# _"
.
iApply
(
newbarrier_spec
_
P
with
"[]"
)
;
[
done
..|].
iNext
.
eauto
.
iNext
.
eauto
.
...
...
theories/concurrent_stacks/concurrent_stack1.v
View file @
06edc222
...
@@ -36,8 +36,8 @@ Section stacks.
...
@@ -36,8 +36,8 @@ Section stacks.
iIntros
"H"
;
iDestruct
"H"
as
(?)
"[Hl Hl']"
;
iSplitL
"Hl"
;
eauto
.
iIntros
"H"
;
iDestruct
"H"
as
(?)
"[Hl Hl']"
;
iSplitL
"Hl"
;
eauto
.
Qed
.
Qed
.
Definition
is_list_pre
(
P
:
val
→
iProp
Σ
)
(
F
:
val
-
c
>
iProp
Σ
)
:
Definition
is_list_pre
(
P
:
val
→
iProp
Σ
)
(
F
:
val
-
d
>
iProp
Σ
)
:
val
-
c
>
iProp
Σ
:
=
λ
v
,
val
-
d
>
iProp
Σ
:
=
λ
v
,
(
v
≡
NONEV
∨
∃
(
l
:
loc
)
(
h
t
:
val
),
⌜
v
≡
SOMEV
#
l
⌝
∗
l
↦
{-}
(
h
,
t
)%
V
∗
P
h
∗
▷
F
t
)%
I
.
(
v
≡
NONEV
∨
∃
(
l
:
loc
)
(
h
t
:
val
),
⌜
v
≡
SOMEV
#
l
⌝
∗
l
↦
{-}
(
h
,
t
)%
V
∗
P
h
∗
▷
F
t
)%
I
.
Local
Instance
is_list_contr
(
P
:
val
→
iProp
Σ
)
:
Contractive
(
is_list_pre
P
).
Local
Instance
is_list_contr
(
P
:
val
→
iProp
Σ
)
:
Contractive
(
is_list_pre
P
).
...
...
theories/concurrent_stacks/concurrent_stack2.v
View file @
06edc222
...
@@ -246,8 +246,8 @@ Section stack_works.
...
@@ -246,8 +246,8 @@ Section stack_works.
iIntros
"H"
;
iDestruct
"H"
as
(?)
"[Hl Hl']"
;
iSplitL
"Hl"
;
eauto
.
iIntros
"H"
;
iDestruct
"H"
as
(?)
"[Hl Hl']"
;
iSplitL
"Hl"
;
eauto
.
Qed
.
Qed
.
Definition
is_list_pre
(
P
:
val
→
iProp
Σ
)
(
F
:
val
-
c
>
iProp
Σ
)
:
Definition
is_list_pre
(
P
:
val
→
iProp
Σ
)
(
F
:
val
-
d
>
iProp
Σ
)
:
val
-
c
>
iProp
Σ
:
=
λ
v
,
val
-
d
>
iProp
Σ
:
=
λ
v
,
(
v
≡
NONEV
∨
∃
(
l
:
loc
)
(
h
t
:
val
),
⌜
v
≡
SOMEV
#
l
⌝
∗
l
↦
{-}
(
h
,
t
)%
V
∗
P
h
∗
▷
F
t
)%
I
.
(
v
≡
NONEV
∨
∃
(
l
:
loc
)
(
h
t
:
val
),
⌜
v
≡
SOMEV
#
l
⌝
∗
l
↦
{-}
(
h
,
t
)%
V
∗
P
h
∗
▷
F
t
)%
I
.
Local
Instance
is_list_contr
(
P
:
val
→
iProp
Σ
)
:
Contractive
(
is_list_pre
P
).
Local
Instance
is_list_contr
(
P
:
val
→
iProp
Σ
)
:
Contractive
(
is_list_pre
P
).
...
...
theories/hocap/cg_bag.v
View file @
06edc222
...
@@ -38,9 +38,9 @@ Definition popBag : val := λ: "b",
...
@@ -38,9 +38,9 @@ Definition popBag : val := λ: "b",
release
"l"
;;
release
"l"
;;
"v"
.
"v"
.
Canonical
Structure
valmultiset
C
:
=
leibnizC
(
gmultiset
valC
).
Canonical
Structure
valmultiset
O
:
=
leibnizO
(
gmultiset
valO
).
Class
bagG
Σ
:
=
BagG
Class
bagG
Σ
:
=
BagG
{
bag_bagG
:
>
inG
Σ
(
prodR
fracR
(
agreeR
valmultiset
C
))
;
{
bag_bagG
:
>
inG
Σ
(
prodR
fracR
(
agreeR
valmultiset
O
))
;
lock_bagG
:
>
lockG
Σ
lock_bagG
:
>
lockG
Σ
}.
}.
...
...
theories/hocap/concurrent_runners.v
View file @
06edc222
...
@@ -14,7 +14,7 @@ Set Default Proof Using "Type".
...
@@ -14,7 +14,7 @@ Set Default Proof Using "Type".
SET_RES v = the result of the task has been computed and it is v
SET_RES v = the result of the task has been computed and it is v
FIN v = the task has been completed with the result v *)
FIN v = the task has been completed with the result v *)
(* We use this RA to verify the Task.run() method *)
(* We use this RA to verify the Task.run() method *)
Definition
saR
:
=
csumR
fracR
(
csumR
(
prodR
fracR
(
agreeR
val
C
))
(
agreeR
valC
)).
Definition
saR
:
=
csumR
fracR
(
csumR
(
prodR
fracR
(
agreeR
val
O
))
(
agreeR
valO
)).
Class
saG
Σ
:
=
{
sa_inG
:
>
inG
Σ
saR
}.
Class
saG
Σ
:
=
{
sa_inG
:
>
inG
Σ
saR
}.
Definition
INIT
`
{
saG
Σ
}
γ
(
q
:
Qp
)
:
=
own
γ
(
Cinl
q
%
Qp
).
Definition
INIT
`
{
saG
Σ
}
γ
(
q
:
Qp
)
:
=
own
γ
(
Cinl
q
%
Qp
).
Definition
SET_RES
`
{
saG
Σ
}
γ
(
q
:
Qp
)
(
v
:
val
)
:
=
own
γ
(
Cinr
(
Cinl
(
q
%
Qp
,
to_agree
v
))).
Definition
SET_RES
`
{
saG
Σ
}
γ
(
q
:
Qp
)
(
v
:
val
)
:
=
own
γ
(
Cinr
(
Cinl
(
q
%
Qp
,
to_agree
v
))).
...
@@ -189,7 +189,7 @@ Section contents.
...
@@ -189,7 +189,7 @@ Section contents.
Ltac
solve_proper
::
=
solve_proper_core
ltac
:
(
fun
_
=>
simpl
;
auto_equiv
).
Ltac
solve_proper
::
=
solve_proper_core
ltac
:
(
fun
_
=>
simpl
;
auto_equiv
).
Program
Definition
pre_runner
(
γ
:
name
Σ
b
)
(
P
:
val
→
iProp
Σ
)
(
Q
:
val
→
val
→
iProp
Σ
)
:
Program
Definition
pre_runner
(
γ
:
name
Σ
b
)
(
P
:
val
→
iProp
Σ
)
(
Q
:
val
→
val
→
iProp
Σ
)
:
(
val
C
-
n
>
iProp
Σ
)
-
n
>
(
valC
-
n
>
iProp
Σ
)
:
=
λ
ne
R
r
,
(
val
O
-
n
>
iProp
Σ
)
-
n
>
(
valO
-
n
>
iProp
Σ
)
:
=
λ
ne
R
r
,
(
∃
(
body
bag
:
val
),
⌜
r
=
(
body
,
bag
)%
V
⌝
(
∃
(
body
bag
:
val
),
⌜
r
=
(
body
,
bag
)%
V
⌝
∗
bagS
b
(
N
.@
"bag"
)
(
λ
x
y
,
∃
γ
γ
'
,
isTask
(
body
,
x
)
γ
γ
'
y
P
Q
)
γ
bag
∗
bagS
b
(
N
.@
"bag"
)
(
λ
x
y
,
∃
γ
γ
'
,
isTask
(
body
,
x
)
γ
γ
'
y
P
Q
)
γ
bag
∗
▷
∀
r
a
:
val
,
□
(
R
r
∗
P
a
-
∗
WP
body
r
a
{{
v
,
Q
a
v
}}))%
I
.
∗
▷
∀
r
a
:
val
,
□
(
R
r
∗
P
a
-
∗
WP
body
r
a
{{
v
,
Q
a
v
}}))%
I
.
...
@@ -200,7 +200,7 @@ Section contents.
...
@@ -200,7 +200,7 @@ Section contents.
Proof
.
unfold
pre_runner
.
solve_contractive
.
Qed
.
Proof
.
unfold
pre_runner
.
solve_contractive
.
Qed
.
Definition
runner
(
γ
:
name
Σ
b
)
(
P
:
val
→
iProp
Σ
)
(
Q
:
val
→
val
→
iProp
Σ
)
:
Definition
runner
(
γ
:
name
Σ
b
)
(
P
:
val
→
iProp
Σ
)
(
Q
:
val
→
val
→
iProp
Σ
)
:
val
C
-
n
>
iProp
Σ
:
=
val
O
-
n
>
iProp
Σ
:
=
(
fixpoint
(
pre_runner
γ
P
Q
))%
I
.
(
fixpoint
(
pre_runner
γ
P
Q
))%
I
.
Lemma
runner_unfold
γ
r
P
Q
:
Lemma
runner_unfold
γ
r
P
Q
:
...
...
theories/hocap/fg_bag.v
View file @
06edc222
...
@@ -34,9 +34,9 @@ Definition popBag : val := rec: "pop" "b" :=
...
@@ -34,9 +34,9 @@ Definition popBag : val := rec: "pop" "b" :=
else
"pop"
"b"
else
"pop"
"b"
end
.
end
.
Canonical
Structure
valmultiset
C
:
=
leibnizC
(
gmultiset
valC
).
Canonical
Structure
valmultiset
O
:
=
leibnizO
(
gmultiset
valO
).
Class
bagG
Σ
:
=
BagG
Class
bagG
Σ
:
=
BagG
{
bag_bagG
:
>
inG
Σ
(
prodR
fracR
(
agreeR
valmultiset
C
))
;
{
bag_bagG
:
>
inG
Σ
(
prodR
fracR
(
agreeR
valmultiset
O
))
;
}.
}.
(** Generic specification for the bag, using view shifts. *)
(** Generic specification for the bag, using view shifts. *)
...
...
theories/hocap/lib/oneshot.v
View file @
06edc222
...
@@ -6,7 +6,7 @@ Set Default Proof Using "Type".
...
@@ -6,7 +6,7 @@ Set Default Proof Using "Type".
(** We are going to need the oneshot RA to verify the
(** We are going to need the oneshot RA to verify the
Task.Join() method *)
Task.Join() method *)
Definition
oneshotR
:
=
csumR
fracR
(
agreeR
val
C
).
Definition
oneshotR
:
=
csumR
fracR
(
agreeR
val
O
).
Class
oneshotG
Σ
:
=
{
oneshot_inG
:
>
inG
Σ
oneshotR
}.
Class
oneshotG
Σ
:
=
{
oneshot_inG
:
>
inG
Σ
oneshotR
}.
Definition
oneshot
Σ
:
gFunctors
:
=
#[
GFunctor
oneshotR
].
Definition
oneshot
Σ
:
gFunctors
:
=
#[
GFunctor
oneshotR
].
Instance
subG_oneshot
Σ
{
Σ
}
:
subG
oneshot
Σ
Σ
→
oneshotG
Σ
.
Instance
subG_oneshot
Σ
{
Σ
}
:
subG
oneshot
Σ
Σ
→
oneshotG
Σ
.
...
...
theories/lecture_notes/coq_intro_example_2.v
View file @
06edc222
...
@@ -59,12 +59,12 @@ Section monotone_counter.
...
@@ -59,12 +59,12 @@ Section monotone_counter.
*)
*)
(*
(*
To tell Coq we wish to use such a discrete CMRA we use the constructor leibniz
C
.
To tell Coq we wish to use such a discrete CMRA we use the constructor leibniz
O
.
This takes a Coq type and makes it an instance of an OFE (a step-indexed generalization of sets).
This takes a Coq type and makes it an instance of an OFE (a step-indexed generalization of sets).
This is not the place do describe Canonical Structures.
This is not the place do describe Canonical Structures.
A very good introduction is available at https://hal.inria.fr/hal-00816703v1/document
A very good introduction is available at https://hal.inria.fr/hal-00816703v1/document
*)
*)
Canonical
Structure
mcounterRAC
:
=
leibniz
C
mcounterRAT
.
Canonical
Structure
mcounterRAC
:
=
leibniz
O
mcounterRAT
.
(* To make the type mcounterRAT into an RA we need an operation. This is
(* To make the type mcounterRAT into an RA we need an operation. This is
defined in the standard way, except we use the typeclass Op so we can reuse
defined in the standard way, except we use the typeclass Op so we can reuse
...
...
theories/lecture_notes/lists_guarded.v
View file @
06edc222
...
@@ -46,7 +46,7 @@ Notation iProp := (iProp Σ).
...
@@ -46,7 +46,7 @@ Notation iProp := (iProp Σ).
(* First we define the is_list representation predicate via a guarded fixed
(* First we define the is_list representation predicate via a guarded fixed
point of the functional is_list_pre. Note the use of the later modality. The
point of the functional is_list_pre. Note the use of the later modality. The
arrows -
c
> express that the arrow is an arrow in the category of COFE's,
arrows -
d
> express that the arrow is an arrow in the category of COFE's,
i.e., it is a non-expansive function. To fully understand the meaning of this
i.e., it is a non-expansive function. To fully understand the meaning of this
it is necessary to understand the model of Iris.
it is necessary to understand the model of Iris.
...
@@ -55,7 +55,7 @@ Notation iProp := (iProp Σ).
...
@@ -55,7 +55,7 @@ Notation iProp := (iProp Σ).
but in more complex examples the domain of the predicate we are defining will
but in more complex examples the domain of the predicate we are defining will
not be a discrete type, and the condition will be meaningful and necessary.
not be a discrete type, and the condition will be meaningful and necessary.
*)
*)
Definition
is_list_pre
(
Φ
:
val
-
c
>
list
val
-
c
>
iProp
)
:
val
-
c
>
list
val
-
c
>
iProp
:
=
λ
hd
xs
,
Definition
is_list_pre
(
Φ
:
val
-
d
>
list
val
-
d
>
iProp
)
:
val
-
d
>
list
val
-
d
>
iProp
:
=
λ
hd
xs
,
match
xs
with
match
xs
with
[]
=>
⌜
hd
=
NONEV
⌝
[]
=>
⌜
hd
=
NONEV
⌝
|
(
x
::
xs
)
=>
(
∃
(
ℓ
:
loc
)
(
hd'
:
val
),
⌜
hd
=
SOMEV
#
ℓ⌝
∗
ℓ
↦
(
x
,
hd'
)
∗
▷
Φ
hd'
xs
)
|
(
x
::
xs
)
=>
(
∃
(
ℓ
:
loc
)
(
hd'
:
val
),
⌜
hd
=
SOMEV
#
ℓ⌝
∗
ℓ
↦
(
x
,
hd'
)
∗
▷
Φ
hd'
xs
)
...
...
theories/lecture_notes/modular_incr.v
View file @
06edc222
...
@@ -9,7 +9,7 @@ From iris.bi.lib Require Import fractional.
...
@@ -9,7 +9,7 @@ From iris.bi.lib Require Import fractional.
From
iris
.
heap_lang
.
lib
Require
Import
par
.
From
iris
.
heap_lang
.
lib
Require
Import
par
.
Definition
cntCmra
:
cmraT
:
=
(
prodR
fracR
(
agreeR
(
leibniz
C
Z
))).
Definition
cntCmra
:
cmraT
:
=
(
prodR
fracR
(
agreeR
(
leibniz
O
Z
))).
Class
cntG
Σ
:
=
CntG
{
CntG_inG
:
>
inG
Σ
cntCmra
}.
Class
cntG
Σ
:
=
CntG
{
CntG_inG
:
>
inG
Σ
cntCmra
}.
Definition
cnt
Σ
:
gFunctors
:
=
#[
GFunctor
cntCmra
].
Definition
cnt
Σ
:
gFunctors
:
=
#[
GFunctor
cntCmra
].
...
...
theories/logatom/conditional_increment/cinc.v
View file @
06edc222
...
@@ -90,10 +90,10 @@ Definition cinc : val :=
...
@@ -90,10 +90,10 @@ Definition cinc : val :=
(** ** Proof setup *)
(** ** Proof setup *)
Definition
flagUR
:
=
authR
$
optionUR
$
exclR
bool
C
.
Definition
flagUR
:
=
authR
$
optionUR
$
exclR
bool
O
.
Definition
numUR
:
=
authR
$
optionUR
$
exclR
Z
C
.
Definition
numUR
:
=
authR
$
optionUR
$
exclR
Z
O
.
Definition
tokenUR
:
=
exclR
unit
C
.
Definition
tokenUR
:
=
exclR
unit
O
.
Definition
one_shotUR
:
=
csumR
(
exclR
unit
C
)
(
agreeR
unitC
).
Definition
one_shotUR
:
=
csumR
(
exclR
unit
O
)
(
agreeR
unitO
).
Class
cincG
Σ
:
=
ConditionalIncrementG
{
Class
cincG
Σ
:
=
ConditionalIncrementG
{
cinc_flagG
:
>
inG
Σ
flagUR
;
cinc_flagG
:
>
inG
Σ
flagUR
;
...
...
theories/logatom/elimination_stack/hocap_spec.v
View file @
06edc222
...
@@ -138,10 +138,10 @@ auth invariant. *)
...
@@ -138,10 +138,10 @@ auth invariant. *)
(** The CMRA & functor we need. *)
(** The CMRA & functor we need. *)
Class
hocapG
Σ
:
=
HocapG
{
Class
hocapG
Σ
:
=
HocapG
{
hocap_stateG
:
>
inG
Σ
(
authR
(
optionUR
$
exclR
(
list
C
valC
)))
;
hocap_stateG
:
>
inG
Σ
(
authR
(
optionUR
$
exclR
(
list
O
valO
)))
;
}.
}.
Definition
hocap
Σ
:
gFunctors
:
=
Definition
hocap
Σ
:
gFunctors
:
=
#[
GFunctor
(
exclR
unit
C
)
;
GFunctor
(
authR
(
optionUR
$
exclR
(
listC
valC
)))].
#[
GFunctor
(
exclR
unit
O
)
;
GFunctor
(
authR
(
optionUR
$
exclR
(
listO
valO
)))].
Instance
subG_hocap
Σ
{
Σ
}
:
subG
hocap
Σ
Σ
→
hocapG
Σ
.
Instance
subG_hocap
Σ
{
Σ
}
:
subG
hocap
Σ
Σ
→
hocapG
Σ
.
Proof
.
solve_inG
.
Qed
.
Proof
.
solve_inG
.
Qed
.
...
...
theories/logatom/elimination_stack/stack.v
View file @
06edc222
...
@@ -13,11 +13,11 @@ heap. *)
...
@@ -13,11 +13,11 @@ heap. *)
(** The CMRA & functor we need. *)
(** The CMRA & functor we need. *)
(* Not bundling heapG, as it may be shared with other users. *)
(* Not bundling heapG, as it may be shared with other users. *)
Class
stackG
Σ
:
=
StackG
{
Class
stackG
Σ
:
=
StackG
{
stack_tokG
:
>
inG
Σ
(
exclR
unit
C
)
;
stack_tokG
:
>
inG
Σ
(
exclR
unit
O
)
;
stack_stateG
:
>
inG
Σ
(
authR
(
optionUR
$
exclR
(
list
C
valC
)))
;
stack_stateG
:
>
inG
Σ
(
authR
(
optionUR
$
exclR
(
list
O
valO
)))
;
}.
}.
Definition
stack
Σ
:
gFunctors
:
=
Definition
stack
Σ
:
gFunctors
:
=
#[
GFunctor
(
exclR
unit
C
)
;
GFunctor
(
authR
(
optionUR
$
exclR
(
listC
valC
)))].
#[
GFunctor
(
exclR
unit
O
)
;
GFunctor
(
authR
(
optionUR
$
exclR
(
listO
valO
)))].
Instance
subG_stack
Σ
{
Σ
}
:
subG
stack
Σ
Σ
→
stackG
Σ
.
Instance
subG_stack
Σ
{
Σ
}
:
subG
stack
Σ
Σ
→
stackG
Σ
.
Proof
.
solve_inG
.
Qed
.
Proof
.
solve_inG
.
Qed
.
...
...
theories/logatom/flat_combiner/atomic_sync.v
View file @
06edc222
...
@@ -6,7 +6,7 @@ From iris_examples.logatom.flat_combiner Require Import sync misc.
...
@@ -6,7 +6,7 @@ From iris_examples.logatom.flat_combiner Require Import sync misc.
(** The simple syncer spec in [sync.v] implies a logically atomic spec. *)
(** The simple syncer spec in [sync.v] implies a logically atomic spec. *)
Definition
syncR
:
=
prodR
fracR
(
agreeR
val
C
).
(* track the local knowledge of ghost state *)
Definition
syncR
:
=
prodR
fracR
(
agreeR
val
O
).
(* track the local knowledge of ghost state *)
Class
syncG
Σ
:
=
sync_tokG
:
>
inG
Σ
syncR
.
Class
syncG
Σ
:
=
sync_tokG
:
>
inG
Σ
syncR
.
Definition
sync
Σ
:
gFunctors
:
=
#[
GFunctor
(
constRF
syncR
)].
Definition
sync
Σ
:
gFunctors
:
=
#[
GFunctor
(
constRF
syncR
)].
...
@@ -15,8 +15,8 @@ Proof. solve_inG. Qed.
...
@@ -15,8 +15,8 @@ Proof. solve_inG. Qed.
Section
atomic_sync
.
Section
atomic_sync
.
Context
`
{
EqDecision
A
,
!
heapG
Σ
,
!
lockG
Σ
}.
Context
`
{
EqDecision
A
,
!
heapG
Σ
,
!
lockG
Σ
}.
Canonical
A
C
:
=
leibnizC
A
.
Canonical
A
O
:
=
leibnizO
A
.
Context
`
{!
inG
Σ
(
prodR
fracR
(
agreeR
A
C
))}.
Context
`
{!
inG
Σ
(
prodR
fracR
(
agreeR
A
O
))}.
(* TODO: Rename and make opaque; the fact that this is a half should not be visible
(* TODO: Rename and make opaque; the fact that this is a half should not be visible
to the user. *)
to the user. *)
...
@@ -56,7 +56,7 @@ Section atomic_sync.
...
@@ -56,7 +56,7 @@ Section atomic_sync.
iSplitL
"Hg2"
;
first
done
.
iIntros
"!#"
.
iSplitL
"Hg2"
;
first
done
.
iIntros
"!#"
.
iIntros
(
f
).
iApply
wp_wand_r
.
iSplitR
;
first
by
iApply
"Hsyncer"
.
iIntros
(
f
).
iApply
wp_wand_r
.
iSplitR
;
first
by
iApply
"Hsyncer"
.
iIntros
(
f'
)
"#Hsynced {Hsyncer}"
.
iIntros
(
f'
)
"#Hsynced {Hsyncer}"
.
iAlways
.
iIntros
(
α
β
x
)
"#Hseq"
.
change
(
ofe_car
A
C
)
with
A
.
iAlways
.
iIntros
(
α
β
x
)
"#Hseq"
.
change
(
ofe_car
A
O
)
with
A
.
iIntros
(
Φ
'
)
"?"
.
iIntros
(
Φ
'
)
"?"
.
(* TODO: Why can't I iApply "Hsynced"? *)
(* TODO: Why can't I iApply "Hsynced"? *)
iSpecialize
(
"Hsynced"
$!
_
Φ
'
x
).
iSpecialize
(
"Hsynced"
$!
_
Φ
'
x
).
...
...
theories/logatom/flat_combiner/flat.v
View file @
06edc222
...
@@ -46,7 +46,7 @@ Definition mk_flat : val :=
...
@@ -46,7 +46,7 @@ Definition mk_flat : val :=
let
:
"r"
:
=
loop
"p"
"s"
"lk"
in
let
:
"r"
:
=
loop
"p"
"s"
"lk"
in
"r"
.
"r"
.
Definition
reqR
:
=
prodR
fracR
(
agreeR
val
C
).
(* request x should be kept same *)
Definition
reqR
:
=
prodR
fracR
(
agreeR
val
O
).
(* request x should be kept same *)
Definition
toks
:
Type
:
=
gname
*
gname
*
gname
*
gname
*
gname
.
(* a bunch of tokens to do state transition *)
Definition
toks
:
Type
:
=
gname
*
gname
*
gname
*
gname
*
gname
.
(* a bunch of tokens to do state transition *)
Class
flatG
Σ
:
=
FlatG
{
Class
flatG
Σ
:
=
FlatG
{
req_G
:
>
inG
Σ
reqR
;
req_G
:
>
inG
Σ
reqR
;
...
...
theories/logatom/flat_combiner/misc.v
View file @
06edc222
...
@@ -20,7 +20,7 @@ Section lemmas.
...
@@ -20,7 +20,7 @@ Section lemmas.
End
lemmas
.
End
lemmas
.
Section
excl
.
Section
excl
.
Context
`
{!
inG
Σ
(
exclR
unit
C
)}.
Context
`
{!
inG
Σ
(
exclR
unit
O
)}.
Lemma
excl_falso
γ
Q'
:
Lemma
excl_falso
γ
Q'
:
own
γ
(
Excl
())
∗
own
γ
(
Excl
())
⊢
Q'
.
own
γ
(
Excl
())
∗
own
γ
(
Excl
())
⊢
Q'
.
Proof
.
Proof
.
...
...
theories/logatom/snapshot/atomic_snapshot.v
View file @
06edc222
...
@@ -70,14 +70,14 @@ Definition read_with_proph : val :=
...
@@ -70,14 +70,14 @@ Definition read_with_proph : val :=
(** The CMRA & functor we need. *)
(** The CMRA & functor we need. *)
Definition
timestampUR
:
=
gmapUR
Z
$
agreeR
val
C
.
Definition
timestampUR
:
=
gmapUR
Z
$
agreeR
val
O
.
Class
atomic_snapshotG
Σ
:
=
AtomicSnapshotG
{
Class
atomic_snapshotG
Σ
:
=
AtomicSnapshotG
{
atomic_snapshot_stateG
:
>
inG
Σ
$
authR
$
optionUR
$
exclR
$
val
C
;
atomic_snapshot_stateG
:
>
inG
Σ
$
authR
$
optionUR
$
exclR
$
val
O
;
atomic_snapshot_timestampG
:
>
inG
Σ
$
authR
$
timestampUR
atomic_snapshot_timestampG
:
>
inG
Σ
$
authR
$
timestampUR
}.
}.
Definition
atomic_snapshot
Σ
:
gFunctors
:
=
Definition
atomic_snapshot
Σ
:
gFunctors
:
=
#[
GFunctor
(
authR
$
optionUR
$
exclR
$
val
C
)
;
GFunctor
(
authR
timestampUR
)].
#[
GFunctor
(
authR
$
optionUR
$
exclR
$
val
O
)
;
GFunctor
(
authR
timestampUR
)].
Instance
subG_atomic_snapshot
Σ
{
Σ
}
:
subG
atomic_snapshot
Σ
Σ
→
atomic_snapshotG
Σ
.
Instance
subG_atomic_snapshot
Σ
{
Σ
}
:
subG
atomic_snapshot
Σ
Σ
→
atomic_snapshotG
Σ
.
Proof
.
solve_inG
.
Qed
.
Proof
.
solve_inG
.
Qed
.
...
...
theories/logatom/treiber2.v
View file @
06edc222
...
@@ -58,10 +58,10 @@ Definition pop_stack : val :=
...
@@ -58,10 +58,10 @@ Definition pop_stack : val :=
(** * Definition of the required camera *************************************)
(** * Definition of the required camera *************************************)
Class
stackG
Σ
:
=
StackG
{
Class
stackG
Σ
:
=
StackG
{
stack_tokG
:
>
inG
Σ
(
authR
(
optionUR
(
exclR
(
list
C
valC
))))
}.
stack_tokG
:
>
inG
Σ
(
authR
(
optionUR
(
exclR
(
list
O
valO
))))
}.
Definition
stack
Σ
:
gFunctors
:
=
Definition
stack
Σ
:
gFunctors
:
=
#[
GFunctor
(
authR
(
optionUR
(
exclR
(
list
C
valC
))))].
#[
GFunctor
(
authR
(
optionUR
(
exclR
(
list
O
valO
))))].
Instance
subG_stack
Σ
{
Σ
}
:
subG
stack
Σ
Σ
→
stackG
Σ
.
Instance
subG_stack
Σ
{
Σ
}
:
subG
stack
Σ
Σ
→
stackG
Σ
.
Proof
.
solve_inG
.
Qed
.
Proof
.
solve_inG
.
Qed
.
...
...
theories/logrel/F_mu/fundamental.v
View file @
06edc222
...
@@ -11,7 +11,7 @@ Notation "Γ ⊨ e : τ" := (log_typed Γ e τ) (at level 74, e, τ at next leve
...
@@ -11,7 +11,7 @@ Notation "Γ ⊨ e : τ" := (log_typed Γ e τ) (at level 74, e, τ at next leve
Section
fundamental
.
Section
fundamental
.
Context
`
{
irisG
F_mu_lang
Σ
}.
Context
`
{
irisG
F_mu_lang
Σ
}.
Notation
D
:
=
(
val
C
-
n
>
iProp
Σ
).
Notation
D
:
=
(
val
O
-
n
>
iProp
Σ
).
Local
Tactic
Notation
"smart_wp_bind"
uconstr
(
ctx
)
ident
(
v
)
constr
(
Hv
)
uconstr
(
Hp
)
:
=
Local
Tactic
Notation
"smart_wp_bind"
uconstr
(
ctx
)
ident
(
v
)
constr
(
Hv
)
uconstr
(
Hp
)
:
=
iApply
(
wp_bind
(
fill
[
ctx
]))
;
iApply
(
wp_bind
(
fill
[
ctx
]))
;
...
...
theories/logrel/F_mu/lang.v
View file @
06edc222
...
@@ -167,9 +167,9 @@ Module F_mu.
...
@@ -167,9 +167,9 @@ Module F_mu.
fill_item_val
,
fill_item_no_val_inj
,
head_ctx_step_val
.
fill_item_val
,
fill_item_no_val_inj
,
head_ctx_step_val
.
Qed
.
Qed
.
Canonical
Structure
state
C
:
=
leibnizC
state
.
Canonical
Structure
state
O
:
=
leibnizO
state
.
Canonical
Structure
val
C
:
=
leibnizC
val
.
Canonical
Structure
val
O
:
=
leibnizO
val
.
Canonical
Structure
expr
C
:
=
leibnizC
expr
.
Canonical
Structure
expr
O
:
=
leibnizO
expr
.
End
F_mu
.
End
F_mu
.
(** Language *)
(** Language *)
...
...
theories/logrel/F_mu/logrel.v
View file @
06edc222
...
@@ -7,57 +7,57 @@ Import uPred.
...
@@ -7,57 +7,57 @@ Import uPred.
(** interp : is a unary logical relation. *)
(** interp : is a unary logical relation. *)
Section
logrel
.
Section
logrel
.
Context
`
{
irisG
F_mu_lang
Σ
}.
Context
`
{
irisG
F_mu_lang
Σ
}.
Notation
D
:
=
(
val
C
-
n
>
iProp
Σ
).
Notation
D
:
=
(
val
O
-
n
>
iProp
Σ
).
Implicit
Types
τ
i
:
D
.
Implicit
Types
τ
i
:
D
.
Implicit
Types
Δ
:
list
C
D
.
Implicit
Types
Δ
:
list
O
D
.
Implicit
Types
interp
:
list
C
D
→
D
.
Implicit
Types
interp
:
list
O
D
→
D
.
Program
Definition
ctx_lookup
(
x
:
var
)
:
list
C
D
-
n
>
D
:
=
λ
ne
Δ
,
Program
Definition
ctx_lookup
(
x
:
var
)
:
list
O
D
-
n
>
D
:
=
λ
ne
Δ
,
from_option
id
(
cconst
True
)%
I
(
Δ
!!
x
).
from_option
id
(
cconst
True
)%
I
(
Δ
!!
x
).
Solve
Obligations
with
solve_proper
.
Solve
Obligations
with
solve_proper
.
Definition
interp_unit
:
list
C
D
-
n
>
D
:
=
λ
ne
Δ
w
,
(
⌜
w
=
UnitV
⌝
)%
I
.
Definition
interp_unit
:
list
O
D
-
n
>
D
:
=
λ
ne
Δ
w
,
(
⌜
w
=
UnitV
⌝
)%
I
.
Program
Definition
interp_prod
Program
Definition
interp_prod
(
interp1
interp2
:
list
C
D
-
n
>
D
)
:
listC
D
-
n
>
D
:
=
λ
ne
Δ
w
,
(
interp1
interp2
:
list
O
D
-
n
>
D
)
:
listO
D
-
n
>
D
:
=
λ
ne
Δ
w
,
(
∃
w1
w2
,
⌜
w
=
PairV
w1
w2
⌝
∧
interp1
Δ
w1
∧
interp2
Δ
w2
)%
I
.
(
∃
w1
w2
,
⌜
w
=
PairV
w1
w2
⌝
∧
interp1
Δ
w1
∧
interp2
Δ
w2
)%
I
.
Solve
Obligations
with
repeat
intros
?
;
simpl
;
solve_proper
.
Solve
Obligations
with
repeat
intros
?
;
simpl
;
solve_proper
.
Program
Definition
interp_sum
Program
Definition
interp_sum
(
interp1
interp2
:
list
C
D
-
n
>
D
)
:
listC
D
-
n
>
D
:
=
λ
ne
Δ
w
,
(
interp1
interp2
:
list
O
D
-
n
>
D
)
:
listO
D
-
n
>
D
:
=
λ
ne
Δ
w
,
((
∃
w1
,
⌜
w
=
InjLV
w1
⌝
∧
interp1
Δ
w1
)
∨
(
∃
w2
,
⌜
w
=
InjRV
w2
⌝
∧
interp2
Δ
w2
))%
I
.
((
∃
w1
,
⌜
w
=
InjLV
w1
⌝
∧
interp1
Δ
w1
)
∨
(
∃
w2
,
⌜
w
=
InjRV
w2
⌝
∧
interp2
Δ
w2
))%
I
.
Solve
Obligations
with
repeat
intros
?
;
simpl
;
solve_proper
.
Solve
Obligations
with
repeat
intros
?
;
simpl
;
solve_proper
.