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
George Pirlea
Iris
Commits
8a0ff185
Commit
8a0ff185
authored
Apr 25, 2018
by
Ralf Jung
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into gen_proofmode
parents
243a0cab
27d9154a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
theories/heap_lang/proofmode.v
theories/heap_lang/proofmode.v
+11
-5
theories/tests/heap_lang.v
theories/tests/heap_lang.v
+5
-0
theories/tests/proofmode.v
theories/tests/proofmode.v
+3
-0
No files found.
theories/heap_lang/proofmode.v
View file @
8a0ff185
...
...
@@ -16,9 +16,15 @@ Proof. by intros ->. Qed.
Tactic
Notation
"wp_expr_eval"
tactic
(
t
)
:
=
iStartProof
;
try
(
first
[
eapply
tac_wp_expr_eval
|
eapply
tac_twp_expr_eval
]
;
[
let
x
:
=
fresh
in
intros
x
;
t
;
unfold
x
;
reflexivity
|]).
lazymatch
goal
with
|
|-
envs_entails
_
(
wp
?s
?E
?e
?Q
)
=>
eapply
tac_wp_expr_eval
;
[
let
x
:
=
fresh
in
intros
x
;
t
;
unfold
x
;
reflexivity
|]
|
|-
envs_entails
_
(
twp
?s
?E
?e
?Q
)
=>
eapply
tac_twp_expr_eval
;
[
let
x
:
=
fresh
in
intros
x
;
t
;
unfold
x
;
reflexivity
|]
|
_
=>
fail
"wp_expr_eval: not a 'wp'"
end
.
Ltac
wp_expr_simpl
:
=
wp_expr_eval
simpl
.
Ltac
wp_expr_simpl_subst
:
=
wp_expr_eval
simpl_subst
.
...
...
@@ -295,13 +301,13 @@ Tactic Notation "wp_apply" open_constr(lem) :=
lazymatch
goal
with
|
|-
envs_entails
_
(
wp
?s
?E
?e
?Q
)
=>
reshape_expr
e
ltac
:
(
fun
K
e'
=>
wp_bind_core
K
;
iApplyHyp
H
;
try
iNext
;
wp_expr_simpl
)
||
wp_bind_core
K
;
iApplyHyp
H
;
try
iNext
;
try
wp_expr_simpl
)
||
lazymatch
iTypeOf
H
with
|
Some
(
_
,
?P
)
=>
fail
"wp_apply: cannot apply"
P
end
|
|-
envs_entails
_
(
twp
?s
?E
?e
?Q
)
=>
reshape_expr
e
ltac
:
(
fun
K
e'
=>
twp_bind_core
K
;
iApplyHyp
H
;
wp_expr_simpl
)
||
twp_bind_core
K
;
iApplyHyp
H
;
try
wp_expr_simpl
)
||
lazymatch
iTypeOf
H
with
|
Some
(
_
,
?P
)
=>
fail
"wp_apply: cannot apply"
P
end
...
...
theories/tests/heap_lang.v
View file @
8a0ff185
...
...
@@ -104,6 +104,11 @@ Section LiftingTests.
Lemma
Pred_user
E
:
WP
let
:
"x"
:
=
Pred
#
42
in
Pred
"x"
@
E
[{
v
,
⌜
v
=
#
40
⌝
}]%
I
.
Proof
.
iIntros
""
.
wp_apply
Pred_spec
.
wp_let
.
by
wp_apply
Pred_spec
.
Qed
.
Lemma
wp_apply_evar
e
P
:
P
-
∗
(
∀
Q
Φ
,
Q
-
∗
WP
e
{{
Φ
}})
-
∗
WP
e
{{
_
,
True
}}.
Proof
.
iIntros
"HP HW"
.
wp_apply
"HW"
.
iExact
"HP"
.
Qed
.
End
LiftingTests
.
Lemma
heap_e_adequate
σ
:
adequate
NotStuck
heap_e
σ
(=
#
2
).
...
...
theories/tests/proofmode.v
View file @
8a0ff185
...
...
@@ -386,6 +386,9 @@ Proof.
done
.
Qed
.
Lemma
test_iIntros_pure_neg
:
(
⌜
¬
False
⌝
:
PROP
)%
I
.
Proof
.
by
iIntros
(?).
Qed
.
Lemma
test_iFrame_later_1
P
Q
:
P
∗
▷
Q
-
∗
▷
(
P
∗
▷
Q
).
Proof
.
iIntros
"H"
.
iFrame
"H"
.
auto
.
Qed
.
...
...
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