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
Jonas Kastberg
iris
Commits
0013d853
Commit
0013d853
authored
Nov 27, 2018
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in `wp_cas_suc`.
This closes issue #220.
parent
8d2e6a66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
tests/heap_lang.v
tests/heap_lang.v
+5
-0
theories/heap_lang/proofmode.v
theories/heap_lang/proofmode.v
+1
-1
No files found.
tests/heap_lang.v
View file @
0013d853
...
...
@@ -78,6 +78,11 @@ Section tests.
Lemma
heap_e6_spec
(
v
:
val
)
:
(
WP
heap_e6
v
{{
w
,
⌜
w
=
#
true
⌝
}})%
I
.
Proof
.
wp_lam
.
wp_op
.
by
case_bool_decide
.
Qed
.
Definition
heap_e7
:
val
:
=
λ
:
"v"
,
CAS
"v"
#
0
#
1
.
Lemma
heap_e7_spec
l
:
l
↦
#
0
-
∗
WP
heap_e7
#
l
[{
_
,
l
↦
#
1
}].
Proof
.
iIntros
.
wp_lam
.
wp_cas_suc
.
auto
.
Qed
.
Definition
FindPred
:
val
:
=
rec
:
"pred"
"x"
"y"
:
=
let
:
"yp"
:
=
"y"
+
#
1
in
...
...
theories/heap_lang/proofmode.v
View file @
0013d853
...
...
@@ -511,7 +511,7 @@ Tactic Notation "wp_cas_suc" :=
|
try
congruence
|
try
fast_done
(* vals_cas_compare_safe *)
|
simpl
;
try
wp_value_head
]
|
|-
envs_entails
_
(
twp
?E
?e
?Q
)
=>
|
|-
envs_entails
_
(
twp
?s
?E
?e
?Q
)
=>
first
[
reshape_expr
e
ltac
:
(
fun
K
e'
=>
eapply
(
tac_twp_cas_suc
_
_
_
_
_
K
))
|
fail
1
"wp_cas_suc: cannot find 'CAS' in"
e
]
;
...
...
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