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
Jonas Kastberg
iris
Commits
f96e229a
Commit
f96e229a
authored
Jul 19, 2016
by
Robbert Krebbers
Browse files
Better error messages when heap invariant cannot be opened.
parent
2ad416e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
heap_lang/proofmode.v
View file @
f96e229a
...
@@ -105,7 +105,7 @@ Tactic Notation "wp_alloc" ident(l) "as" constr(H) :=
...
@@ -105,7 +105,7 @@ Tactic Notation "wp_alloc" ident(l) "as" constr(H) :=
[
let
e'
:
=
match
goal
with
|-
to_val
?e'
=
_
=>
e'
end
in
[
let
e'
:
=
match
goal
with
|-
to_val
?e'
=
_
=>
e'
end
in
wp_done
||
fail
"wp_alloc:"
e'
"not a value"
wp_done
||
fail
"wp_alloc:"
e'
"not a value"
|
iAssumption
||
fail
"wp_alloc: cannot find heap_ctx"
|
iAssumption
||
fail
"wp_alloc: cannot find heap_ctx"
|
solve_ndisj
|
solve_ndisj
||
fail
"wp_alloc: cannot open heap invariant"
|
apply
_
|
apply
_
|
first
[
intros
l
|
fail
1
"wp_alloc:"
l
"not fresh"
]
;
|
first
[
intros
l
|
fail
1
"wp_alloc:"
l
"not fresh"
]
;
eexists
;
split
;
eexists
;
split
;
...
@@ -126,7 +126,7 @@ Tactic Notation "wp_load" :=
...
@@ -126,7 +126,7 @@ Tactic Notation "wp_load" :=
|
fail
1
"wp_load: cannot find 'Load' in"
e
]
;
|
fail
1
"wp_load: cannot find 'Load' in"
e
]
;
eapply
tac_wp_load
;
eapply
tac_wp_load
;
[
iAssumption
||
fail
"wp_load: cannot find heap_ctx"
[
iAssumption
||
fail
"wp_load: cannot find heap_ctx"
|
solve_ndisj
|
solve_ndisj
||
fail
"wp_load: cannot open heap invariant"
|
apply
_
|
apply
_
|
let
l
:
=
match
goal
with
|-
_
=
Some
(
_
,
(
?l
↦
{
_
}
_
)%
I
)
=>
l
end
in
|
let
l
:
=
match
goal
with
|-
_
=
Some
(
_
,
(
?l
↦
{
_
}
_
)%
I
)
=>
l
end
in
iAssumptionCore
||
fail
"wp_load: cannot find"
l
"↦ ?"
iAssumptionCore
||
fail
"wp_load: cannot find"
l
"↦ ?"
...
@@ -145,7 +145,7 @@ Tactic Notation "wp_store" :=
...
@@ -145,7 +145,7 @@ Tactic Notation "wp_store" :=
[
let
e'
:
=
match
goal
with
|-
to_val
?e'
=
_
=>
e'
end
in
[
let
e'
:
=
match
goal
with
|-
to_val
?e'
=
_
=>
e'
end
in
wp_done
||
fail
"wp_store:"
e'
"not a value"
wp_done
||
fail
"wp_store:"
e'
"not a value"
|
iAssumption
||
fail
"wp_store: cannot find heap_ctx"
|
iAssumption
||
fail
"wp_store: cannot find heap_ctx"
|
solve_ndisj
|
solve_ndisj
||
fail
"wp_store: cannot open heap invariant"
|
apply
_
|
apply
_
|
let
l
:
=
match
goal
with
|-
_
=
Some
(
_
,
(
?l
↦
{
_
}
_
)%
I
)
=>
l
end
in
|
let
l
:
=
match
goal
with
|-
_
=
Some
(
_
,
(
?l
↦
{
_
}
_
)%
I
)
=>
l
end
in
iAssumptionCore
||
fail
"wp_store: cannot find"
l
"↦ ?"
iAssumptionCore
||
fail
"wp_store: cannot find"
l
"↦ ?"
...
@@ -167,7 +167,7 @@ Tactic Notation "wp_cas_fail" :=
...
@@ -167,7 +167,7 @@ Tactic Notation "wp_cas_fail" :=
|
let
e'
:
=
match
goal
with
|-
to_val
?e'
=
_
=>
e'
end
in
|
let
e'
:
=
match
goal
with
|-
to_val
?e'
=
_
=>
e'
end
in
wp_done
||
fail
"wp_cas_fail:"
e'
"not a value"
wp_done
||
fail
"wp_cas_fail:"
e'
"not a value"
|
iAssumption
||
fail
"wp_cas_fail: cannot find heap_ctx"
|
iAssumption
||
fail
"wp_cas_fail: cannot find heap_ctx"
|
solve_ndisj
|
solve_ndisj
||
fail
"wp_cas_fail: cannot open heap invariant"
|
apply
_
|
apply
_
|
let
l
:
=
match
goal
with
|-
_
=
Some
(
_
,
(
?l
↦
{
_
}
_
)%
I
)
=>
l
end
in
|
let
l
:
=
match
goal
with
|-
_
=
Some
(
_
,
(
?l
↦
{
_
}
_
)%
I
)
=>
l
end
in
iAssumptionCore
||
fail
"wp_cas_fail: cannot find"
l
"↦ ?"
iAssumptionCore
||
fail
"wp_cas_fail: cannot find"
l
"↦ ?"
...
@@ -189,7 +189,7 @@ Tactic Notation "wp_cas_suc" :=
...
@@ -189,7 +189,7 @@ Tactic Notation "wp_cas_suc" :=
|
let
e'
:
=
match
goal
with
|-
to_val
?e'
=
_
=>
e'
end
in
|
let
e'
:
=
match
goal
with
|-
to_val
?e'
=
_
=>
e'
end
in
wp_done
||
fail
"wp_cas_suc:"
e'
"not a value"
wp_done
||
fail
"wp_cas_suc:"
e'
"not a value"
|
iAssumption
||
fail
"wp_cas_suc: cannot find heap_ctx"
|
iAssumption
||
fail
"wp_cas_suc: cannot find heap_ctx"
|
solve_ndisj
|
solve_ndisj
||
fail
"wp_cas_suc: cannot open heap invariant"
|
apply
_
|
apply
_
|
let
l
:
=
match
goal
with
|-
_
=
Some
(
_
,
(
?l
↦
{
_
}
_
)%
I
)
=>
l
end
in
|
let
l
:
=
match
goal
with
|-
_
=
Some
(
_
,
(
?l
↦
{
_
}
_
)%
I
)
=>
l
end
in
iAssumptionCore
||
fail
"wp_cas_suc: cannot find"
l
"↦ ?"
iAssumptionCore
||
fail
"wp_cas_suc: cannot find"
l
"↦ ?"
...
...
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