Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
FP
iris-atomic
Commits
d5272bc5
Commit
d5272bc5
authored
Sep 20, 2016
by
Zhen Zhang
Browse files
safe flat
parent
0fa11100
Changes
1
Hide whitespace changes
Inline
Side-by-side
srv.v
View file @
d5272bc5
...
...
@@ -340,5 +340,22 @@ Section proof.
wp_load
.
wp_match
.
by
iApply
"HΦ"
.
Admitted
.
\ No newline at end of file
Lemma
flat_spec
(
f
:
val
)
Q
:
heapN
⊥
N
→
heap_ctx
★
□
(
∀
x
:
val
,
WP
f
x
{{
v
,
■
Q
x
v
}}
)
%
I
⊢
WP
flat
f
{{
f
'
,
True
%
I
}}
.
Proof
.
iIntros
(
HN
)
"(#Hh & #?)"
.
wp_seq
.
wp_alloc
lk
as
"Hl"
.
iVs
(
own_alloc
(
Excl
()))
as
(
γ
2
)
"Ho2"
;
first
done
.
iVs
(
own_alloc
(
Excl
()))
as
(
γ
lk
)
"Hγlk"
;
first
done
.
iVs
(
inv_alloc
N
_
(
lock_inv
γ
lk
lk
(
own
γ
2
(
Excl
())))
with
"[-]"
)
as
"#?"
.
{
iIntros
"!>"
.
iExists
false
.
by
iFrame
.
}
wp_let
.
wp_bind
(
new_stack
_
).
iApply
new_stack_spec
=>
//.
iFrame
"Hh"
.
iIntros
(
s
)
"Hs"
.
wp_let
.
done
.
Qed
.
\ No newline at end of file
Write
Preview
Supports
Markdown
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