Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
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
Operate
Environments
Monitor
Incidents
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
Rodolphe Lepigre
Iris
Commits
ed12ea1c
Commit
ed12ea1c
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
instead of a thunk; use idtac
parent
faf2018e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
heap_lang/wp_tactics.v
+8
-10
8 additions, 10 deletions
heap_lang/wp_tactics.v
with
8 additions
and
10 deletions
heap_lang/wp_tactics.v
+
8
−
10
View file @
ed12ea1c
...
@@ -48,12 +48,10 @@ Ltac u_strip_later :=
...
@@ -48,12 +48,10 @@ Ltac u_strip_later :=
etrans
;
last
eapply
later_mono
;
first
solve
[
strip
])
.
etrans
;
last
eapply
later_mono
;
first
solve
[
strip
])
.
(* ssreflect-locks the part after the ⊑ *)
(* ssreflect-locks the part after the ⊑ *)
(* FIXME: I tried doing a lazymatch to only apply the tactic if the goal has shape ⊑,
bit the match is executed *before* doing the recursion... WTF? *)
Ltac
u_lock_goal
:=
revert_intros
ltac
:(
apply
uPred_lock_conclusion
)
.
Ltac
u_lock_goal
:=
revert_intros
ltac
:(
apply
uPred_lock_conclusion
)
.
(** Transforms a goal of the form ∀ ..., ?0... → ?1 ⊑ ?2
(** Transforms a goal of the form ∀ ..., ?0... → ?1 ⊑ ?2
into True ⊑ ∀..., ■?0... → ?1
→
?2, applies tac, and
into True ⊑ ∀..., ■?0... → ?1
-★
?2, applies tac, and
the moves all the assumptions back. *)
the moves all the assumptions back. *)
Ltac
u_revert_all
:=
Ltac
u_revert_all
:=
lazymatch
goal
with
lazymatch
goal
with
...
@@ -71,10 +69,8 @@ Ltac u_revert_all :=
...
@@ -71,10 +69,8 @@ Ltac u_revert_all :=
(** This starts on a goal of the form ∀ ..., ?0... → ?1 ⊑ ?2.
(** This starts on a goal of the form ∀ ..., ?0... → ?1 ⊑ ?2.
It applies löb where all the Coq assumptions have been turned into logical
It applies löb where all the Coq assumptions have been turned into logical
assumptions, then moves all the Coq assumptions back out to the context,
assumptions, then moves all the Coq assumptions back out to the context,
applies [tac ()] on the goal (now of the form _ ⊑ _), and then reverts the
applies [tac] on the goal (now of the form _ ⊑ _), and then reverts the
Coq assumption so that we end up with the same shape as where we started.
Coq assumption so that we end up with the same shape as where we started. *)
[tac] is a thunk because I found no other way to prevent Coq from expandig
matches too early.*)
Ltac
u_löb
tac
:=
Ltac
u_löb
tac
:=
u_lock_goal
;
u_revert_all
;
u_lock_goal
;
u_revert_all
;
(* We now have a goal for the form True ⊑ P, with the "original" conclusion
(* We now have a goal for the form True ⊑ P, with the "original" conclusion
...
@@ -89,8 +85,9 @@ Ltac u_löb tac :=
...
@@ -89,8 +85,9 @@ Ltac u_löb tac :=
let
H
:=
fresh
in
intro
H
;
go
;
revert
H
let
H
:=
fresh
in
intro
H
;
go
;
revert
H
|
|
-
_
⊑
(
■
_
→
_)
=>
apply
impl_intro_l
,
const_elim_l
;
|
|
-
_
⊑
(
■
_
→
_)
=>
apply
impl_intro_l
,
const_elim_l
;
let
H
:=
fresh
in
intro
H
;
go
;
revert
H
let
H
:=
fresh
in
intro
H
;
go
;
revert
H
|
|
-
▷
?R
⊑
(
?L
-★
locked
_)
=>
apply
wand_intro_l
;
(* This is the "bottom" of the goal, where we see the wand introduced
unlock
;
tac
()
by u_revert_all and the lock, as well as the ▷ from löb_strong. *)
|
|
-
▷
_
⊑
(_
-★
locked
_)
=>
apply
wand_intro_l
;
unlock
;
tac
end
end
in
go
.
in
go
.
...
@@ -124,7 +121,8 @@ Ltac wp_finish :=
...
@@ -124,7 +121,8 @@ Ltac wp_finish :=
end
in
simpl
;
revert_intros
go
.
end
in
simpl
;
revert_intros
go
.
Tactic
Notation
"wp_rec"
">"
:=
Tactic
Notation
"wp_rec"
">"
:=
u_löb
ltac
:(
fun
_
=>
(* Find the redex and apply wp_rec *)
u_löb
ltac
:(
(* Find the redex and apply wp_rec *)
idtac
;
(* FIXME WTF without this, it matches the goal before executing u_löb ?!? *)
lazymatch
goal
with
lazymatch
goal
with
|
|
-
_
⊑
wp
?E
?e
?Q
=>
reshape_expr
e
ltac
:(
fun
K
e'
=>
|
|
-
_
⊑
wp
?E
?e
?Q
=>
reshape_expr
e
ltac
:(
fun
K
e'
=>
match
eval
cbv
in
e'
with
match
eval
cbv
in
e'
with
...
...
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