Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaëtan Gilbert
Iris
Commits
01663351
Commit
01663351
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
wp_cas_fail/succ: Report error when proving vals_cas_compare_safe; fast_done is enough
parent
6ac4c4eb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/heap_lang.ref
+5
-0
5 additions, 0 deletions
tests/heap_lang.ref
tests/heap_lang.v
+11
-0
11 additions, 0 deletions
tests/heap_lang.v
theories/heap_lang/proofmode.v
+4
-4
4 additions, 4 deletions
theories/heap_lang/proofmode.v
with
20 additions
and
4 deletions
tests/heap_lang.ref
+
5
−
0
View file @
01663351
...
...
@@ -68,3 +68,8 @@
let: "val2" := fun2 "val1" in
let: "val3" := fun3 "val2" in if: "val1" = "val2" then "val" else "val3"
{{{ (x y : val) (z : Z), RET (x, y, #z); True }}}
"not_cas_compare_safe"
: string
The command has indeed failed with message:
Ltac call to "wp_cas_suc" failed.
Tactic failure: wp_cas_suc: Values are not safe to compare for CAS.
This diff is collapsed.
Click to expand it.
tests/heap_lang.v
+
11
−
0
View file @
01663351
...
...
@@ -161,5 +161,16 @@ Section printing_tests.
End
printing_tests
.
Section
error_tests
.
Context
`{
heapG
Σ
}
.
Check
"not_cas_compare_safe"
.
Lemma
not_cas_compare_safe
(
l
:
loc
)
(
v
:
val
)
:
l
↦
v
-∗
WP
CAS
#
l
v
v
{{
_,
True
}}
.
Proof
.
iIntros
"H↦"
.
Fail
wp_cas_suc
.
Abort
.
End
error_tests
.
Lemma
heap_e_adequate
σ
:
adequate
NotStuck
heap_e
σ
(
=
#
2
)
.
Proof
.
eapply
(
heap_adequacy
heapΣ
)=>
?
.
by
apply
heap_e_spec
.
Qed
.
This diff is collapsed.
Click to expand it.
theories/heap_lang/proofmode.v
+
4
−
4
View file @
01663351
...
...
@@ -406,7 +406,7 @@ Tactic Notation "wp_cas_fail" :=
[
iSolveTC
|
solve_mapsto
()
|
try
congruence
|
done
|
fast_done
||
fail
"wp_cas_fail: Values are not safe to compare for CAS"
|
simpl
;
try
wp_value_head
]
|
|
-
envs_entails
_
(
twp
?s
?E
?e
?Q
)
=>
first
...
...
@@ -415,7 +415,7 @@ Tactic Notation "wp_cas_fail" :=
|
fail
1
"wp_cas_fail: cannot find 'CAS' in"
e
];
[
solve_mapsto
()
|
try
congruence
|
done
|
fast_done
||
fail
"wp_cas_fail: Values are not safe to compare for CAS"
|
wp_expr_simpl
;
try
wp_value_head
]
|
_
=>
fail
"wp_cas_fail: not a 'wp'"
end
.
...
...
@@ -434,7 +434,7 @@ Tactic Notation "wp_cas_suc" :=
[
iSolveTC
|
solve_mapsto
()
|
try
congruence
|
done
|
fast_done
||
fail
"wp_cas_suc: Values are not safe to compare for CAS"
|
pm_reflexivity
|
simpl
;
try
wp_value_head
]
|
|
-
envs_entails
_
(
twp
?E
?e
?Q
)
=>
...
...
@@ -444,7 +444,7 @@ Tactic Notation "wp_cas_suc" :=
|
fail
1
"wp_cas_suc: cannot find 'CAS' in"
e
];
[
solve_mapsto
()
|
try
congruence
|
done
|
fast_done
||
fail
"wp_cas_suc: Values are not safe to compare for CAS"
|
pm_reflexivity
|
wp_expr_simpl
;
try
wp_value_head
]
|
_
=>
fail
"wp_cas_suc: not a 'wp'"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment