Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simon Spies
examples
Commits
1813cb14
Commit
1813cb14
authored
Sep 19, 2019
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump Iris.
parent
9795c36e
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
28 additions
and
28 deletions
+28
-28
opam
opam
+1
-1
theories/barrier/example_joining_existentials.v
theories/barrier/example_joining_existentials.v
+4
-4
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/concurrent_runners.v
theories/hocap/concurrent_runners.v
+2
-2
theories/lecture_notes/lists_guarded.v
theories/lecture_notes/lists_guarded.v
+1
-1
theories/logrel/F_mu/logrel.v
theories/logrel/F_mu/logrel.v
+1
-1
theories/logrel/F_mu_ref/fundamental_binary.v
theories/logrel/F_mu_ref/fundamental_binary.v
+1
-1
theories/logrel/F_mu_ref/logrel.v
theories/logrel/F_mu_ref/logrel.v
+2
-2
theories/logrel/F_mu_ref/logrel_binary.v
theories/logrel/F_mu_ref/logrel_binary.v
+2
-2
theories/logrel/F_mu_ref_conc/examples/counter.v
theories/logrel/F_mu_ref_conc/examples/counter.v
+1
-1
theories/logrel/F_mu_ref_conc/examples/stack/refinement.v
theories/logrel/F_mu_ref_conc/examples/stack/refinement.v
+1
-1
theories/logrel/F_mu_ref_conc/examples/stack/stack_rules.v
theories/logrel/F_mu_ref_conc/examples/stack/stack_rules.v
+1
-1
theories/logrel/F_mu_ref_conc/fundamental_binary.v
theories/logrel/F_mu_ref_conc/fundamental_binary.v
+1
-1
theories/logrel/F_mu_ref_conc/logrel_binary.v
theories/logrel/F_mu_ref_conc/logrel_binary.v
+2
-2
theories/logrel/F_mu_ref_conc/logrel_unary.v
theories/logrel/F_mu_ref_conc/logrel_unary.v
+2
-2
theories/logrel_heaplang/ltyping.v
theories/logrel_heaplang/ltyping.v
+1
-1
No files found.
opam
View file @
1813cb14
...
...
@@ -9,6 +9,6 @@ build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_examples"]
depends: [
"coq-iris" { (= "dev.2019-0
8-29.2.b75bb39
7") | (= "dev") }
"coq-iris" { (= "dev.2019-0
9-19.3.aa7871c
7") | (= "dev") }
"coq-autosubst" { = "dev.coq86" }
]
theories/barrier/example_joining_existentials.v
View file @
1813cb14
...
...
@@ -7,9 +7,9 @@ From iris_examples.barrier Require Import proof specification.
Set
Default
Proof
Using
"Type"
.
Definition
one_shotR
(
Σ
:
gFunctors
)
(
F
:
oFunctor
)
:
=
csumR
(
exclR
unitO
)
(
agreeR
$
laterO
$
F
(
iPreProp
Σ
)
_
).
csumR
(
exclR
unitO
)
(
agreeR
$
laterO
$
F
(
iPreProp
O
Σ
)
_
).
Definition
Pending
{
Σ
F
}
:
one_shotR
Σ
F
:
=
Cinl
(
Excl
()).
Definition
Shot
{
Σ
}
{
F
:
oFunctor
}
(
x
:
F
(
iProp
Σ
)
_
)
:
one_shotR
Σ
F
:
=
Definition
Shot
{
Σ
}
{
F
:
oFunctor
}
(
x
:
F
(
iProp
O
Σ
)
_
)
:
one_shotR
Σ
F
:
=
Cinr
$
to_agree
$
Next
$
oFunctor_map
F
(
iProp_fold
,
iProp_unfold
)
x
.
Class
oneShotG
(
Σ
:
gFunctors
)
(
F
:
oFunctor
)
:
=
...
...
@@ -28,7 +28,7 @@ Section proof.
Local
Set
Default
Proof
Using
"Type*"
.
Context
`
{!
heapG
Σ
,
!
barrierG
Σ
,
!
spawnG
Σ
,
!
oneShotG
Σ
F
}.
Context
(
N
:
namespace
).
Local
Notation
X
:
=
(
F
(
iProp
Σ
)
_
).
Local
Notation
X
:
=
(
F
(
iProp
O
Σ
)
_
).
Definition
barrier_res
γ
(
Φ
:
X
→
iProp
Σ
)
:
iProp
Σ
:
=
(
∃
x
,
own
γ
(
Shot
x
)
∗
Φ
x
)%
I
.
...
...
@@ -43,7 +43,7 @@ Proof.
iIntros
(
v
)
"?"
;
iExists
x
;
by
iSplit
.
Qed
.
Context
(
P
:
iProp
Σ
)
(
Φ
Φ
1
Φ
2
Ψ
Ψ
1
Ψ
2
:
X
-
n
>
iProp
Σ
).
Context
(
P
:
iProp
Σ
)
(
Φ
Φ
1
Φ
2
Ψ
Ψ
1
Ψ
2
:
X
-
n
>
iProp
O
Σ
).
Context
{
Φ
_split
:
∀
x
,
Φ
x
-
∗
(
Φ
1
x
∗
Φ
2
x
)}.
Context
{
Ψ
_join
:
∀
x
,
Ψ
1
x
-
∗
Ψ
2
x
-
∗
Ψ
x
}.
...
...
theories/barrier/specification.v
View file @
1813cb14
...
...
@@ -10,7 +10,7 @@ Local Set Default Proof Using "Type*".
Context
`
{!
heapG
Σ
,
!
barrierG
Σ
}.
Lemma
barrier_spec
(
N
:
namespace
)
:
∃
recv
send
:
loc
→
iProp
Σ
-
n
>
iProp
Σ
,
∃
recv
send
:
loc
→
iProp
O
Σ
-
n
>
iProp
O
Σ
,
(
∀
P
,
{{
True
}}
newbarrier
#()
{{
v
,
∃
l
:
loc
,
⌜
v
=
#
l
⌝
∗
recv
l
P
∗
send
l
P
}})
∧
(
∀
l
P
,
{{
send
l
P
∗
P
}}
signal
#
l
{{
_
,
True
}})
∧
...
...
theories/concurrent_stacks/concurrent_stack1.v
View file @
1813cb14
...
...
@@ -44,8 +44,8 @@ Section stacks.
Local
Instance
oloc_to_val_inj
:
Inj
(=)
(=)
oloc_to_val
.
Proof
.
intros
[|][|]
;
simpl
;
congruence
.
Qed
.
Definition
is_list_pre
(
P
:
val
→
iProp
Σ
)
(
F
:
option
loc
-
d
>
iProp
Σ
)
:
option
loc
-
d
>
iProp
Σ
:
=
λ
v
,
match
v
with
Definition
is_list_pre
(
P
:
val
→
iProp
Σ
)
(
F
:
option
loc
-
d
>
iProp
O
Σ
)
:
option
loc
-
d
>
iProp
O
Σ
:
=
λ
v
,
match
v
with
|
None
=>
True
|
Some
l
=>
∃
(
h
:
val
)
(
t
:
option
loc
),
l
↦
{-}
(
h
,
oloc_to_val
t
)%
V
∗
P
h
∗
▷
F
t
end
%
I
.
...
...
theories/concurrent_stacks/concurrent_stack2.v
View file @
1813cb14
...
...
@@ -254,8 +254,8 @@ Section stack_works.
Local
Instance
oloc_to_val_inj
:
Inj
(=)
(=)
oloc_to_val
.
Proof
.
intros
[|][|]
;
simpl
;
congruence
.
Qed
.
Definition
is_list_pre
(
P
:
val
→
iProp
Σ
)
(
F
:
option
loc
-
d
>
iProp
Σ
)
:
option
loc
-
d
>
iProp
Σ
:
=
λ
v
,
match
v
with
Definition
is_list_pre
(
P
:
val
→
iProp
Σ
)
(
F
:
option
loc
-
d
>
iProp
O
Σ
)
:
option
loc
-
d
>
iProp
O
Σ
:
=
λ
v
,
match
v
with
|
None
=>
True
|
Some
l
=>
∃
(
h
:
val
)
(
t
:
option
loc
),
l
↦
{-}
(
h
,
oloc_to_val
t
)%
V
∗
P
h
∗
▷
F
t
end
%
I
.
...
...
theories/hocap/concurrent_runners.v
View file @
1813cb14
...
...
@@ -189,7 +189,7 @@ Section contents.
Ltac
solve_proper
::
=
solve_proper_core
ltac
:
(
fun
_
=>
simpl
;
auto_equiv
).
Program
Definition
pre_runner
(
γ
:
name
Σ
b
)
(
P
:
val
→
iProp
Σ
)
(
Q
:
val
→
val
→
iProp
Σ
)
:
(
valO
-
n
>
iProp
Σ
)
-
n
>
(
valO
-
n
>
iProp
Σ
)
:
=
λ
ne
R
r
,
(
valO
-
n
>
iProp
O
Σ
)
-
n
>
(
valO
-
n
>
iProp
O
Σ
)
:
=
λ
ne
R
r
,
(
∃
(
body
bag
:
val
),
⌜
r
=
(
body
,
bag
)%
V
⌝
∗
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
.
...
...
@@ -200,7 +200,7 @@ Section contents.
Proof
.
unfold
pre_runner
.
solve_contractive
.
Qed
.
Definition
runner
(
γ
:
name
Σ
b
)
(
P
:
val
→
iProp
Σ
)
(
Q
:
val
→
val
→
iProp
Σ
)
:
valO
-
n
>
iProp
Σ
:
=
valO
-
n
>
iProp
O
Σ
:
=
(
fixpoint
(
pre_runner
γ
P
Q
))%
I
.
Lemma
runner_unfold
γ
r
P
Q
:
...
...
theories/lecture_notes/lists_guarded.v
View file @
1813cb14
...
...
@@ -42,7 +42,7 @@ Implicit Types l : loc.
of Iris propositions (written Prop in the lecture notes) depends on this Σ.
But since Σ is the same throughout the development we shall define
shorthand notation which hides it. *)
Notation
iProp
:
=
(
iProp
Σ
).
Notation
iProp
:
=
(
iProp
O
Σ
).
(* 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
...
...
theories/logrel/F_mu/logrel.v
View file @
1813cb14
...
...
@@ -7,7 +7,7 @@ Import uPred.
(** interp : is a unary logical relation. *)
Section
logrel
.
Context
`
{
irisG
F_mu_lang
Σ
}.
Notation
D
:
=
(
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
valO
-
n
>
iProp
O
Σ
).
Implicit
Types
τ
i
:
D
.
Implicit
Types
Δ
:
listO
D
.
Implicit
Types
interp
:
listO
D
→
D
.
...
...
theories/logrel/F_mu_ref/fundamental_binary.v
View file @
1813cb14
...
...
@@ -19,7 +19,7 @@ Notation "Γ ⊨ e '≤log≤' e' : τ" :=
Section
fundamental
.
Context
`
{
heapG
Σ
,
cfgSG
Σ
}.
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
O
Σ
).
Implicit
Types
e
:
expr
.
Implicit
Types
Δ
:
listO
D
.
Hint
Resolve
to_of_val
.
...
...
theories/logrel/F_mu_ref/logrel.v
View file @
1813cb14
...
...
@@ -9,7 +9,7 @@ Definition logN : namespace := nroot .@ "logN".
(** interp : is a unary logical relation. *)
Section
logrel
.
Context
`
{
heapG
Σ
}.
Notation
D
:
=
(
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
valO
-
n
>
iProp
O
Σ
).
Implicit
Types
τ
i
:
D
.
Implicit
Types
Δ
:
listO
D
.
Implicit
Types
interp
:
listO
D
→
D
.
...
...
@@ -60,7 +60,7 @@ Section logrel.
intros
interp
n
Δ
1
Δ
2
H
Δ
;
apply
fixpoint_ne
=>
τ
i
w
.
solve_proper
.
Qed
.
Program
Definition
interp_ref_inv
(
l
:
loc
)
:
D
-
n
>
iProp
Σ
:
=
λ
ne
τ
i
,
Program
Definition
interp_ref_inv
(
l
:
loc
)
:
D
-
n
>
iProp
O
Σ
:
=
λ
ne
τ
i
,
(
∃
v
,
l
↦
v
∗
τ
i
v
)%
I
.
Solve
Obligations
with
solve_proper
.
...
...
theories/logrel/F_mu_ref/logrel_binary.v
View file @
1813cb14
...
...
@@ -25,7 +25,7 @@ Definition logN : namespace := nroot .@ "logN".
(** interp : is a unary logical relation. *)
Section
logrel
.
Context
`
{
heapG
Σ
,
cfgSG
Σ
}.
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
O
Σ
).
Implicit
Types
τ
i
:
D
.
Implicit
Types
Δ
:
listO
D
.
Implicit
Types
interp
:
listO
D
→
D
.
...
...
@@ -94,7 +94,7 @@ Section logrel.
intros
interp
n
Δ
1
Δ
2
H
Δ
;
apply
fixpoint_ne
=>
τ
i
ww
.
solve_proper
.
Qed
.
Program
Definition
interp_ref_inv
(
ll
:
loc
*
loc
)
:
D
-
n
>
iProp
Σ
:
=
λ
ne
τ
i
,
Program
Definition
interp_ref_inv
(
ll
:
loc
*
loc
)
:
D
-
n
>
iProp
O
Σ
:
=
λ
ne
τ
i
,
(
∃
vv
,
ll
.
1
↦
vv
.
1
∗
ll
.
2
↦ₛ
vv
.
2
∗
τ
i
vv
)%
I
.
Solve
Obligations
with
repeat
intros
?
;
simpl
;
auto_equiv
.
...
...
theories/logrel/F_mu_ref_conc/examples/counter.v
View file @
1813cb14
...
...
@@ -35,7 +35,7 @@ Definition FG_counter : expr :=
Section
CG_Counter
.
Context
`
{
heapIG
Σ
,
cfgSG
Σ
}.
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
O
Σ
).
Implicit
Types
Δ
:
listO
D
.
(* Coarse-grained increment *)
...
...
theories/logrel/F_mu_ref_conc/examples/stack/refinement.v
View file @
1813cb14
...
...
@@ -10,7 +10,7 @@ Definition stackN : namespace := nroot .@ "stack".
Section
Stack_refinement
.
Context
`
{
heapIG
Σ
,
cfgSG
Σ
,
inG
Σ
(
authR
stackUR
)}.
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
O
Σ
).
Implicit
Types
Δ
:
listO
D
.
Lemma
FG_CG_counter_refinement
:
...
...
theories/logrel/F_mu_ref_conc/examples/stack/stack_rules.v
View file @
1813cb14
...
...
@@ -17,7 +17,7 @@ Notation "l ↦ˢᵗᵏ v" := (stack_mapsto l v) (at level 20) : bi_scope.
Section
Rules
.
Context
`
{
stackG
Σ
}.
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
O
Σ
).
Global
Instance
stack_mapsto_persistent
l
v
:
Persistent
(
l
↦ˢᵗᵏ
v
).
Proof
.
apply
_
.
Qed
.
...
...
theories/logrel/F_mu_ref_conc/fundamental_binary.v
View file @
1813cb14
...
...
@@ -19,7 +19,7 @@ Notation "Γ ⊨ e '≤log≤' e' : τ" :=
Section
fundamental
.
Context
`
{
heapIG
Σ
,
cfgSG
Σ
}.
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
O
Σ
).
Implicit
Types
e
:
expr
.
Implicit
Types
Δ
:
listO
D
.
Hint
Resolve
to_of_val
.
...
...
theories/logrel/F_mu_ref_conc/logrel_binary.v
View file @
1813cb14
...
...
@@ -28,7 +28,7 @@ Definition logN : namespace := nroot .@ "logN".
(** interp : is a unary logical relation. *)
Section
logrel
.
Context
`
{
heapIG
Σ
,
cfgSG
Σ
}.
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
prodO
valO
valO
-
n
>
iProp
O
Σ
).
Implicit
Types
τ
i
:
D
.
Implicit
Types
Δ
:
listO
D
.
Implicit
Types
interp
:
listO
D
→
D
.
...
...
@@ -104,7 +104,7 @@ Section logrel.
intros
interp
n
Δ
1
Δ
2
H
Δ
;
apply
fixpoint_ne
=>
τ
i
ww
.
solve_proper
.
Qed
.
Program
Definition
interp_ref_inv
(
ll
:
loc
*
loc
)
:
D
-
n
>
iProp
Σ
:
=
λ
ne
τ
i
,
Program
Definition
interp_ref_inv
(
ll
:
loc
*
loc
)
:
D
-
n
>
iProp
O
Σ
:
=
λ
ne
τ
i
,
(
∃
vv
,
ll
.
1
↦ᵢ
vv
.
1
∗
ll
.
2
↦ₛ
vv
.
2
∗
τ
i
vv
)%
I
.
Solve
Obligations
with
solve_proper
.
...
...
theories/logrel/F_mu_ref_conc/logrel_unary.v
View file @
1813cb14
...
...
@@ -10,7 +10,7 @@ Definition logN : namespace := nroot .@ "logN".
(** interp : is a unary logical relation. *)
Section
logrel
.
Context
`
{
heapIG
Σ
}.
Notation
D
:
=
(
valO
-
n
>
iProp
Σ
).
Notation
D
:
=
(
valO
-
n
>
iProp
O
Σ
).
Implicit
Types
τ
i
:
D
.
Implicit
Types
Δ
:
listO
D
.
Implicit
Types
interp
:
listO
D
→
D
.
...
...
@@ -62,7 +62,7 @@ Section logrel.
intros
interp
n
Δ
1
Δ
2
H
Δ
;
apply
fixpoint_ne
=>
τ
i
w
.
solve_proper
.
Qed
.
Program
Definition
interp_ref_inv
(
l
:
loc
)
:
D
-
n
>
iProp
Σ
:
=
λ
ne
τ
i
,
Program
Definition
interp_ref_inv
(
l
:
loc
)
:
D
-
n
>
iProp
O
Σ
:
=
λ
ne
τ
i
,
(
∃
v
,
l
↦ᵢ
v
∗
τ
i
v
)%
I
.
Solve
Obligations
with
solve_proper
.
...
...
theories/logrel_heaplang/ltyping.v
View file @
1813cb14
...
...
@@ -24,7 +24,7 @@ Section lty_ofe.
Canonical
Structure
ltyC
:
=
OfeT
(
lty
Σ
)
lty_ofe_mixin
.
Global
Instance
lty_cofe
:
Cofe
ltyC
.
Proof
.
apply
(
iso_cofe_subtype'
(
λ
A
:
val
-
d
>
iProp
Σ
,
∀
w
,
Persistent
(
A
w
))
apply
(
iso_cofe_subtype'
(
λ
A
:
val
-
d
>
iProp
O
Σ
,
∀
w
,
Persistent
(
A
w
))
(@
Lty
_
)
lty_car
)=>
//.
-
apply
_
.
-
apply
limit_preserving_forall
=>
w
.
...
...
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