Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jonas Kastberg
iris
Commits
228f3a2e
Commit
228f3a2e
authored
Nov 29, 2017
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A tactic `wp_simpl_subst` that only simplifies in the `e` of `WP e @ E {{ Φ }}`.
parent
074339d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
theories/heap_lang/proofmode.v
theories/heap_lang/proofmode.v
+13
-1
theories/tests/tree_sum.v
theories/tests/tree_sum.v
+1
-1
No files found.
theories/heap_lang/proofmode.v
View file @
228f3a2e
...
...
@@ -12,6 +12,18 @@ Ltac wp_simpl :=
let
e'
:
=
eval
simpl
in
e
in
change
(
envs_entails
Δ
(
wp
E
e'
Q
))
end
.
Lemma
tac_wp_simpl_subst
`
{
heapG
Σ
}
Δ
E
Φ
e
e'
:
e
=
e'
→
envs_entails
Δ
(
WP
e'
@
E
{{
Φ
}})
→
envs_entails
Δ
(
WP
e
@
E
{{
Φ
}}).
Proof
.
by
intros
->.
Qed
.
Ltac
wp_simpl_subst
:
=
try
iStartProof
;
try
lazymatch
goal
with
|
|-
envs_entails
?
Δ
(
wp
?E
?e
?Q
)
=>
eapply
tac_wp_simpl_subst
;
[
simpl_subst
;
reflexivity
|]
end
.
Lemma
tac_wp_pure
`
{
heapG
Σ
}
Δ
Δ
'
E
e1
e2
φ
Φ
:
PureExec
φ
e1
e2
→
φ
→
...
...
@@ -41,7 +53,7 @@ Tactic Notation "wp_pure" open_constr(efoc) :=
[
apply
_
(* PureExec *)
|
try
fast_done
(* The pure condition for PureExec *)
|
apply
_
(* IntoLaters *)
|
simpl_subst
;
try
wp_value_head
(* new goal *)
|
wp_
simpl_subst
;
try
wp_value_head
(* new goal *)
])
||
fail
"wp_pure: cannot find"
efoc
"in"
e
"or"
efoc
"is not a reduct"
|
_
=>
fail
"wp_pure: not a 'wp'"
...
...
theories/tests/tree_sum.v
View file @
228f3a2e
...
...
@@ -40,7 +40,7 @@ Lemma sum_loop_wp `{!heapG Σ} v t l (n : Z) :
{{{
RET
#()
;
l
↦
#(
sum
t
+
n
)
∗
is_tree
v
t
}}}.
Proof
.
iIntros
(
Φ
)
"[Hl Ht] HΦ"
.
iInduction
t
as
[
n'
|
tl
?
tr
]
"IH"
forall
(
v
l
n
Φ
)
;
wp_rec
;
wp_let
.
iInduction
t
as
[
n'
|
tl
?
tr
]
"IH"
forall
(
v
l
n
Φ
)
;
simpl
;
wp_rec
;
wp_let
.
-
iDestruct
"Ht"
as
"%"
;
subst
.
wp_match
.
wp_load
.
wp_op
.
wp_store
.
by
iApply
(
"HΦ"
with
"[$Hl]"
).
...
...
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