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
84506228
Commit
84506228
authored
Oct 06, 2016
by
Zhen Zhang
Browse files
fix later by a hackish skip
parent
65081e7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
flat.v
View file @
84506228
...
...
@@ -49,7 +49,8 @@ Definition mk_flat : val :=
let
:
"s"
:
=
new_stack
#()
in
λ
:
"x"
,
let
:
"p"
:
=
install
"x"
"s"
in
loop
"f"
"p"
"s"
"lk"
.
let
:
"r"
:
=
loop
"f"
"p"
"s"
"lk"
in
"r"
.
Global
Opaque
doOp
try_srv
install
loop
mk_flat
.
...
...
@@ -406,7 +407,7 @@ Section proof.
Qed
.
Definition
flatten
(
f'
f
:
val
)
:
=
(
∀
P
Q
(
x
:
val
),
({{
R
★
P
x
}}
f
x
{{
v
,
R
★
Q
x
v
}})
→
({{
P
x
}}
f'
x
{{
v
,
▷
Q
x
v
}}))%
I
.
(
∀
P
Q
(
x
:
val
),
({{
R
★
P
x
}}
f
x
{{
v
,
R
★
Q
x
v
}})
→
({{
P
x
}}
f'
x
{{
v
,
Q
x
v
}}))%
I
.
Lemma
mk_flat_spec
(
f
:
val
)
:
∀
(
Φ
:
val
→
iProp
Σ
),
...
...
@@ -431,13 +432,14 @@ Section proof.
iApply
(
install_spec
_
P
Q
)=>//.
iFrame
"#"
.
iFrame
"Hp"
.
iSplitR
;
first
iApply
"Hf"
.
iIntros
(
p
[[[[
γ
x
γ
1
]
γ
3
]
γ
4
]
γ
q
])
"(Ho3 & Hx & HoQ) Hev Hhd"
.
wp_let
.
iApply
loop_spec
=>//.
wp_let
.
wp_bind
(
loop
_
_
_
_
).
iApply
loop_spec
=>//.
iFrame
"#"
.
iFrame
.
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
.
iNex
t
.
iDestruct
(
uPred
.
cofe_funC_equivI
with
"Heq"
)
as
"Heq"
.
wp_le
t
.
iDestruct
(
uPred
.
cofe_funC_equivI
with
"Heq"
)
as
"Heq"
.
iSpecialize
(
"Heq"
$!
a0
).
by
iRewrite
"Heq"
in
"HQ'"
.
-
iExFalso
.
iCombine
"Hx"
"Hx'"
as
"Hx"
.
iDestruct
(
own_valid
with
"Hx"
)
as
%[
_
H1
].
...
...
@@ -478,7 +480,7 @@ Section atomic_sync.
(
∀
P
Q
,
(
∀
g
,
(
P
x
={
Eo
,
Ei
}=>
gFrag
γ
g
★
□
α
x
)
★
(
gFrag
γ
g
★
□
α
x
={
Ei
,
Eo
}=>
P
x
)
★
(
∀
g'
r
,
gFrag
γ
g'
★
β
x
g
g'
r
={
Ei
,
Eo
}=>
Q
x
r
))
-
★
{{
P
x
}}
f
x
{{
v
,
▷
Q
x
v
}})%
I
.
-
★
{{
P
x
}}
f
x
{{
v
,
Q
x
v
}})%
I
.
Definition
sync
:
val
:
=
λ
:
"f_cons"
"f_seq"
,
...
...
sync.v
View file @
84506228
From
iris
.
program_logic
Require
Export
weakestpre
hoare
.
From
iris
.
proofmode
Require
Import
invariants
ghost_ownership
.
From
iris
.
heap_lang
Require
Export
lang
.
From
iris
.
heap_lang
Require
Import
proofmode
notation
.
From
iris
.
heap_lang
.
lib
Require
Import
spin_lock
.
...
...
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