Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Rodolphe Lepigre
Iris
Commits
a1171d02
Commit
a1171d02
authored
Aug 25, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use simpl more to get rid of %V scopes following
6d038c53
.
parent
24be0361
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
tests/counter.v
tests/counter.v
+2
-2
tests/one_shot.v
tests/one_shot.v
+1
-1
tests/tree_sum.v
tests/tree_sum.v
+1
-1
No files found.
tests/counter.v
View file @
a1171d02
...
...
@@ -94,7 +94,7 @@ Lemma newcounter_spec N :
heapN
⊥
N
→
heap_ctx
⊢
{{
True
}}
newcounter
#()
{{
v
,
∃
l
,
v
=
#
l
∧
C
l
0
}}.
Proof
.
iIntros
(?)
"#Hh !# _ /="
.
rewrite
/
newcounter
.
wp_seq
.
wp_alloc
l
as
"Hl"
.
iIntros
(?)
"#Hh !# _ /="
.
rewrite
/
newcounter
/=
.
wp_seq
.
wp_alloc
l
as
"Hl"
.
iVs
(
own_alloc
(
Auth
0
))
as
(
γ
)
"Hγ"
;
first
done
.
rewrite
(
auth_frag_op
0
0
)
//
;
iDestruct
"Hγ"
as
"[Hγ Hγf]"
.
iVs
(
inv_alloc
N
_
(
I
γ
l
)
with
"[Hl Hγ]"
)
as
"#?"
.
...
...
@@ -128,7 +128,7 @@ Lemma read_spec l n :
{{
C
l
n
}}
read
#
l
{{
v
,
∃
m
:
nat
,
■
(
v
=
#
m
∧
n
≤
m
)
∧
C
l
m
}}.
Proof
.
iIntros
"!# Hl /="
.
iDestruct
"Hl"
as
(
N
γ
)
"(% & #Hh & #Hinv & Hγf)"
.
rewrite
/
read
.
wp_let
.
iInv
N
as
(
c
)
"[Hl Hγ]"
"Hclose"
.
wp_load
.
rewrite
/
read
/=
.
wp_let
.
iInv
N
as
(
c
)
"[Hl Hγ]"
"Hclose"
.
wp_load
.
iDestruct
(
own_valid
γ
(
Frag
n
⋅
Auth
c
)
with
"[#]"
)
as
%
?%
auth_frag_valid
.
{
iApply
own_op
.
by
iFrame
.
}
rewrite
(
auth_frag_op
c
c
)
;
last
lia
;
iDestruct
"Hγ"
as
"[Hγ Hγf']"
.
...
...
tests/one_shot.v
View file @
a1171d02
...
...
@@ -42,7 +42,7 @@ Lemma wp_one_shot (Φ : val → iProp Σ) :
⊢
WP
one_shot_example
#()
{{
Φ
}}.
Proof
.
iIntros
"[#? Hf] /="
.
rewrite
/
one_shot_example
.
wp_seq
.
wp_alloc
l
as
"Hl"
.
wp_let
.
rewrite
/
one_shot_example
/=
.
wp_seq
.
wp_alloc
l
as
"Hl"
.
wp_let
.
iVs
(
own_alloc
Pending
)
as
(
γ
)
"Hγ"
;
first
done
.
iVs
(
inv_alloc
N
_
(
one_shot_inv
γ
l
)
with
"[Hl Hγ]"
)
as
"#HN"
.
{
iNext
.
iLeft
.
by
iSplitL
"Hl"
.
}
...
...
tests/tree_sum.v
View file @
a1171d02
...
...
@@ -60,7 +60,7 @@ Lemma sum_wp `{!heapG Σ} v t Φ :
heap_ctx
★
is_tree
v
t
★
(
is_tree
v
t
-
★
Φ
#(
sum
t
))
⊢
WP
sum'
v
{{
Φ
}}.
Proof
.
iIntros
"(#Hh & Ht & HΦ)"
.
rewrite
/
sum'
.
iIntros
"(#Hh & Ht & HΦ)"
.
rewrite
/
sum'
/=
.
wp_let
.
wp_alloc
l
as
"Hl"
.
wp_let
.
wp_apply
sum_loop_wp
;
iFrame
"Hh Ht Hl"
.
rewrite
Z
.
add_0_r
.
...
...
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