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
2f754628
Commit
2f754628
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
do not make use of wp_bind_inv unnecessarily
parent
eba7e9e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/heap_lang/proofmode.v
+8
-7
8 additions, 7 deletions
theories/heap_lang/proofmode.v
theories/program_logic/language.v
+13
-0
13 additions, 0 deletions
theories/program_logic/language.v
with
21 additions
and
7 deletions
theories/heap_lang/proofmode.v
+
8
−
7
View file @
2f754628
...
...
@@ -5,15 +5,15 @@ From iris.heap_lang Require Export tactics lifting.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
Lemma
tac_wp_pure
`{
heapG
Σ
}
K
Δ
Δ'
E
e1
e2
φ
Φ
:
Lemma
tac_wp_pure
`{
heapG
Σ
}
Δ
Δ'
E
e1
e2
φ
Φ
:
PureExec
φ
e1
e2
→
φ
→
IntoLaterNEnvs
1
Δ
Δ'
→
envs_entails
Δ'
(
WP
fill
K
e2
@
E
{{
Φ
}})
→
envs_entails
Δ
(
WP
fill
K
e1
@
E
{{
Φ
}})
.
envs_entails
Δ'
(
WP
e2
@
E
{{
Φ
}})
→
envs_entails
Δ
(
WP
e1
@
E
{{
Φ
}})
.
Proof
.
rewrite
/
envs_entails
=>
???
HΔ'
.
rewrite
into_laterN_env_sound
/=.
rewrite
-
wp_bind
HΔ'
-
wp_pure_step_later
//.
by
rewrite
-
wp_bind_inv
.
rewrite
HΔ'
-
wp_pure_step_later
//.
Qed
.
Lemma
tac_wp_value
`{
heapG
Σ
}
Δ
E
Φ
e
v
:
...
...
@@ -28,11 +28,12 @@ Tactic Notation "wp_pure" open_constr(efoc) :=
lazymatch
goal
with
|
|
-
envs_entails
_
(
wp
?E
?e
?Q
)
=>
reshape_expr
e
ltac
:(
fun
K
e'
=>
unify
e'
efoc
;
eapply
(
tac_wp_pure
K
)
;
[
simpl
;
apply
_
(* PureExec *)
eapply
tac_wp_pure
;
[
simpl
;
change
e
with
(
fill
K
e'
);
apply
_
(* PureExec *)
|
try
fast_done
(* The pure condition for PureExec *)
|
apply
_
(* IntoLaters *)
|
simpl_subst
;
try
wp_value_head
(* new goal *)
])
|
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'"
end
.
...
...
This diff is collapsed.
Click to expand it.
theories/program_logic/language.v
+
13
−
0
View file @
2f754628
...
...
@@ -140,6 +140,19 @@ Section language.
PureExec
P
e1
e2
.
Proof
.
intros
HPE
.
split
;
intros
;
eapply
HPE
;
eauto
.
Qed
.
Global
Instance
pure_exec_ctx
K
`{
LanguageCtx
Λ
K
}
e1
e2
φ
:
PureExec
φ
e1
e2
→
PureExec
φ
(
K
e1
)
(
K
e2
)
.
Proof
.
intros
[
Hred
Hstep
]
.
split
.
-
intros
σ
?
.
destruct
(
Hred
σ
)
as
(?
&
?
&
?
&
?);
first
done
.
do
3
eexists
.
eapply
fill_step
.
done
.
-
intros
σ
????
Hpstep
.
edestruct
fill_step_inv
as
(?
&
?
&
?);
[|
exact
Hpstep
|]
.
+
destruct
(
Hred
σ
)
as
(?
&
?
&
?
&
?);
first
done
.
eapply
val_stuck
.
done
.
+
edestruct
Hstep
as
(?
&
?
&
?);
[
done
..|]
.
by
subst
.
Qed
.
(* This is a family of frequent assumptions for PureExec *)
Class
IntoVal
(
e
:
expr
Λ
)
(
v
:
val
Λ
)
:=
into_val
:
to_val
e
=
Some
v
.
...
...
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