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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
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
Iris
Iris
Commits
98116d6a
Commit
98116d6a
authored
4 years ago
by
Ralf Jung
Browse files
Options
Downloads
Plain Diff
Merge branch 'ralf/wp-bind-empty' into 'master'
fix wp_bind with empty context See merge request
!579
parents
3bd32904
672f4a53
No related branches found
No related tags found
1 merge request
!579
fix wp_bind with empty context
Pipeline
#37173
canceled
4 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
tests/heap_lang.v
+8
-0
8 additions, 0 deletions
tests/heap_lang.v
theories/heap_lang/proofmode.v
+5
-5
5 additions, 5 deletions
theories/heap_lang/proofmode.v
with
15 additions
and
5 deletions
CHANGELOG.md
+
2
−
0
View file @
98116d6a
...
...
@@ -138,6 +138,8 @@ With this release, we dropped support for Coq 8.9.
**Changes in `heap_lang`:**
*
`wp_pures`
now turns goals of the form
`WP v {{ Φ }}`
into
`Φ v`
.
*
Fix
`wp_bind`
in case of a NOP (i.e., when the given expression pattern is
already at the top level).
The following
`sed`
script helps adjust your code to the renaming (on macOS,
replace
`sed`
by
`gsed`
, installed via e.g.
`brew install gnu-sed`
).
...
...
This diff is collapsed.
Click to expand it.
tests/heap_lang.v
+
8
−
0
View file @
98116d6a
...
...
@@ -138,6 +138,14 @@ Section tests.
by
replace
(
S
n
-
1
)
%
Z
with
(
n
:
Z
)
by
lia
.
Qed
.
(* Make sure [wp_bind] works even when it changes nothing. *)
Lemma
wp_bind_nop
(
e
:
expr
)
:
⊢
WP
e
+
#
0
{{
_,
True
}}
.
Proof
.
wp_bind
(
e
+
#
0
)
%
E
.
Abort
.
Lemma
wp_bind_nop
(
e
:
expr
)
:
⊢
WP
e
+
#
0
[{
_,
True
}]
.
Proof
.
wp_bind
(
e
+
#
0
)
%
E
.
Abort
.
Lemma
wp_apply_evar
e
P
:
P
-∗
(
∀
Q
Φ
,
Q
-∗
WP
e
{{
Φ
}})
-∗
WP
e
{{
_,
True
}}
.
Proof
.
iIntros
"HP HW"
.
wp_apply
"HW"
.
iExact
"HP"
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/proofmode.v
+
5
−
5
View file @
98116d6a
...
...
@@ -56,7 +56,7 @@ Proof. rewrite envs_entails_eq=> ->. by apply twp_value. Qed.
Ltac
wp_expr_simpl
:=
wp_expr_eval
simpl
.
Ltac
wp_value_head
:=
first
[
eapply
tac_wp_value
|
|
eapply
tac_twp_value
]
.
first
[
eapply
tac_wp_value
|
eapply
tac_twp_value
]
.
Ltac
wp_finish
:=
wp_expr_simpl
;
(* simplify occurences of subst/fill *)
...
...
@@ -167,11 +167,11 @@ Tactic Notation "wp_bind" open_constr(efoc) :=
iStartProof
;
lazymatch
goal
with
|
|
-
envs_entails
_
(
wp
?s
?E
?e
?Q
)
=>
reshape_expr
e
ltac
:(
fun
K
e'
=>
unify
e'
efoc
;
wp_bind_core
K
)
|
|
fail
"wp_bind: cannot find"
efoc
"in"
e
first
[
reshape_expr
e
ltac
:(
fun
K
e'
=>
unify
e'
efoc
;
wp_bind_core
K
)
|
fail
"wp_bind: cannot find"
efoc
"in"
e
]
|
|
-
envs_entails
_
(
twp
?s
?E
?e
?Q
)
=>
reshape_expr
e
ltac
:(
fun
K
e'
=>
unify
e'
efoc
;
twp_bind_core
K
)
|
|
fail
"wp_bind: cannot find"
efoc
"in"
e
first
[
reshape_expr
e
ltac
:(
fun
K
e'
=>
unify
e'
efoc
;
twp_bind_core
K
)
|
fail
"wp_bind: cannot find"
efoc
"in"
e
]
|
_
=>
fail
"wp_bind: not a 'wp'"
end
.
...
...
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