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
26b60a28
Commit
26b60a28
authored
Nov 01, 2018
by
Ralf Jung
Browse files
bump Iris
parent
4b943421
Changes
5
Hide whitespace changes
Inline
Side-by-side
opam
View file @
26b60a28
...
...
@@ -9,5 +9,5 @@ build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_atomic"]
depends: [
"coq-iris" { (= "dev.2018-
07-13.2.af5611c8
") | (= "dev") }
"coq-iris" { (= "dev.2018-
10-31.4.4a1eb8a3
") | (= "dev") }
]
theories/flat.v
View file @
26b60a28
...
...
@@ -107,7 +107,7 @@ Section proof.
{{{
p
ts
,
RET
#
p
;
installed_recp
ts
x
Q
∗
inv
N
(
p_inv
R
γ
m
γ
r
ts
p
)
}}}.
Proof
.
iIntros
(
Φ
)
"(#? & HP & Hf) HΦ"
.
wp_
seq
.
wp_let
.
wp_let
.
wp_alloc
p
as
"Hl"
.
wp_
lam
.
wp_pures
.
wp_alloc
p
as
"Hl"
.
iApply
fupd_wp
.
iMod
(
own_alloc
(
Excl
()))
as
(
γ
1
)
"Ho1"
;
first
done
.
iMod
(
own_alloc
(
Excl
()))
as
(
γ
3
)
"Ho3"
;
first
done
.
...
...
@@ -151,10 +151,10 @@ Section proof.
by
apply
pair_l_frac_op'
.
}
wp_load
.
iMod
(
"Hclose"
with
"[-Hf' Ho1 Hx2 HoQ HR HΦ Hpx]"
).
{
iNext
.
iFrame
.
iFrame
"#"
.
iRight
.
iRight
.
iLeft
.
iExists
f
,
x
.
iFrame
.
}
iModIntro
.
wp_match
.
wp_p
roj
.
wp_proj
.
iModIntro
.
wp_match
.
wp_p
ures
.
wp_bind
(
f
_
).
iApply
wp_wand_r
.
iSplitL
"Hpx Hf' HR"
.
{
iApply
"Hf'"
.
iFrame
.
}
iIntros
(
v
)
"[HR HQ]"
.
iIntros
(
v
)
"[HR HQ]"
.
wp_pures
.
iInv
N
as
"Hx"
"Hclose"
.
iDestruct
"Hx"
as
"[Hp | [Hp | [Hp | Hp]]]"
;
subst
.
*
iDestruct
"Hp"
as
(?)
"(_ & >Ho1' & _)"
.
...
...
@@ -215,7 +215,7 @@ Section proof.
is_lock
N
γ
lk
lk
(
own
γ
r
(
Excl
())
∗
R
)
∗
Φ
#()
⊢
WP
try_srv
lk
#
s
{{
Φ
}}.
Proof
.
iIntros
"(#? & #? & HΦ)"
.
wp_
seq
.
wp_
let
.
iIntros
"(#? & #? & HΦ)"
.
wp_
lam
.
wp_
pures
.
wp_bind
(
try_acquire
_
).
iApply
(
try_acquire_spec
with
"[]"
)
;
first
done
.
iNext
.
iIntros
([])
;
last
by
(
iIntros
;
wp_if
).
iIntros
"[Hlocked [Ho2 HR]]"
.
...
...
@@ -271,16 +271,16 @@ Section proof.
Proof
.
iIntros
(
R
Φ
)
"HR HΦ"
.
iMod
(
own_alloc
(
Excl
()))
as
(
γ
r
)
"Ho2"
;
first
done
.
wp_
seq
.
wp_bind
(
newlock
_
).
wp_
lam
.
wp_bind
(
newlock
_
).
iApply
(
newlock_spec
_
(
own
γ
r
(
Excl
())
∗
R
)%
I
with
"[$Ho2 $HR]"
)=>//.
iNext
.
iIntros
(
lk
γ
lk
)
"#Hlk"
.
wp_let
.
wp_bind
(
new_stack
_
).
iApply
(
new_bag_spec
N
(
p_inv'
R
γ
m
γ
r
))=>//.
iNext
.
iIntros
(
s
)
"#Hss"
.
wp_
let
.
iApply
"HΦ"
.
rewrite
/
synced
.
iAlways
.
iIntros
(
f
).
wp_
let
.
iAlways
.
wp_
pures
.
iApply
"HΦ"
.
rewrite
/
synced
.
iAlways
.
iIntros
(
f
).
wp_
pures
.
iAlways
.
iIntros
(
P
Q
x
)
"#Hf"
.
iIntros
"!# Hp"
.
wp_
let
.
wp_bind
(
install
_
_
_
).
iIntros
"!# Hp"
.
wp_
pures
.
wp_bind
(
install
_
_
_
).
iApply
(
install_spec
R
P
Q
f
x
γ
m
γ
r
s
with
"[-]"
)=>//.
{
iFrame
.
iFrame
"#"
.
}
iNext
.
iIntros
(
p
[[[[
γ
x
γ
1
]
γ
3
]
γ
4
]
γ
q
])
"[(Ho3 & Hx & HoQ) #?]"
.
...
...
theories/peritem.v
View file @
26b60a28
...
...
@@ -47,7 +47,7 @@ Section proofs.
{{{
True
}}}
new_stack
#()
{{{
s
,
RET
#
s
;
bag_inv
s
}}}.
Proof
.
iIntros
(
Φ
)
"_ HΦ"
.
iApply
wp_fupd
.
wp_
seq
.
wp_bind
(
ref
NONE
)%
E
.
wp_alloc
l
as
"Hl"
.
wp_
lam
.
wp_bind
(
ref
NONE
)%
E
.
wp_alloc
l
as
"Hl"
.
wp_alloc
s
as
"Hs"
.
iAssert
((
∃
xs
,
is_bag_R
N
R
xs
s
))%
I
with
"[-HΦ]"
as
"Hxs"
.
{
iFrame
.
iExists
[],
l
.
...
...
theories/simple_sync.v
View file @
26b60a28
...
...
@@ -22,12 +22,12 @@ Section syncer.
Lemma
mk_sync_spec
:
mk_syncer_spec
mk_sync
.
Proof
.
iIntros
(
R
Φ
)
"HR HΦ"
.
wp_
seq
.
wp_bind
(
newlock
_
).
wp_
lam
.
wp_bind
(
newlock
_
).
iApply
(
newlock_spec
N
R
with
"[HR]"
)
;
first
done
.
iNext
.
iIntros
(
lk
γ
)
"#Hl"
.
wp_
let
.
iApply
"HΦ"
.
iIntros
"!#"
.
iIntros
(
f
).
wp_
let
.
iAlways
.
iIntros
(
lk
γ
)
"#Hl"
.
wp_
pures
.
iApply
"HΦ"
.
iIntros
"!#"
.
iIntros
(
f
).
wp_
pures
.
iAlways
.
iIntros
(
P
Q
x
)
"#Hf !# HP"
.
wp_
let
.
wp_bind
(
acquire
_
).
wp_
pures
.
wp_bind
(
acquire
_
).
iApply
(
acquire_spec
with
"Hl"
).
iNext
.
iIntros
"[Hlocked R]"
.
wp_seq
.
wp_bind
(
f
_
).
iSpecialize
(
"Hf"
with
"[R HP]"
)
;
first
by
iFrame
.
...
...
theories/treiber.v
View file @
26b60a28
...
...
@@ -91,7 +91,7 @@ Section proof.
∀
(
Φ
:
val
→
iProp
Σ
),
(
∀
s
,
is_stack
s
[]
-
∗
Φ
#
s
)
⊢
WP
new_stack
#()
{{
Φ
}}.
Proof
.
iIntros
(
Φ
)
"HΦ"
.
wp_
seq
.
iIntros
(
Φ
)
"HΦ"
.
wp_
lam
.
wp_bind
(
ref
NONE
)%
E
.
wp_alloc
l
as
"Hl"
.
wp_alloc
l'
as
"Hl'"
.
iApply
"HΦ"
.
rewrite
/
is_stack
.
iExists
l
.
...
...
@@ -144,7 +144,7 @@ Section proof.
iDestruct
"Hhd"
as
(
q
)
"[Hhd Hhd']"
.
iMod
(
"Hvs'"
with
"[-Hhd]"
)
as
"HQ"
.
{
iFrame
.
eauto
.
}
iModIntro
.
wp_let
.
wp_load
.
wp_
match
.
iModIntro
.
wp_let
.
wp_load
.
wp_
pures
.
eauto
.
-
simpl
.
iDestruct
"Hhd"
as
(
hd'
q
)
"([[Hhd1 Hhd2] Hhd'] & Hxs')"
.
iDestruct
(
dup_is_list
with
"[Hxs']"
)
as
"[Hxs1 Hxs2]"
;
first
by
iFrame
.
...
...
@@ -166,7 +166,7 @@ Section proof.
iDestruct
(
uniq_is_list
with
"[Hxs1 Hxs'']"
)
as
"%"
;
first
by
iFrame
.
subst
.
repeat
(
iSplitR
"Hxs1 Hs"
;
first
done
).
iFrame
.
}
iModIntro
.
wp_if
.
wp_p
roj
.
eauto
.
iModIntro
.
wp_if
.
wp_p
ures
.
eauto
.
+
wp_cas_fail
.
iDestruct
"Hvs'"
as
"[Hvs' _]"
.
iMod
(
"Hvs'"
with
"[-]"
)
as
"HP"
;
first
by
iFrame
.
iModIntro
.
wp_if
.
by
iApply
"IH"
.
...
...
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