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
Environments
Terraform modules
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
Adam
Iris
Commits
13aa09a8
Commit
13aa09a8
authored
8 months ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
More documentation.
parent
77fd4c86
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
iris/proofmode/ltac_tactics.v
+4
-0
4 additions, 0 deletions
iris/proofmode/ltac_tactics.v
iris/proofmode/reduction.v
+22
-3
22 additions, 3 deletions
iris/proofmode/reduction.v
with
26 additions
and
3 deletions
iris/proofmode/ltac_tactics.v
+
4
−
0
View file @
13aa09a8
...
@@ -418,6 +418,7 @@ Ltac iFrameAnyIntuitionistic :=
...
@@ -418,6 +418,7 @@ Ltac iFrameAnyIntuitionistic :=
match
Hs
with
[]
=>
idtac
|
?H
::
?Hs
=>
repeat
iFrameHyp
H
;
go
Hs
end
in
match
Hs
with
[]
=>
idtac
|
?H
::
?Hs
=>
repeat
iFrameHyp
H
;
go
Hs
end
in
match
goal
with
match
goal
with
|
|
-
envs_entails
?Δ
_
=>
|
|
-
envs_entails
?Δ
_
=>
(* [lazy] because [Δ] involves user terms *)
let
Hs
:=
eval
lazy
in
(
env_dom
(
env_intuitionistic
Δ
))
in
go
Hs
let
Hs
:=
eval
lazy
in
(
env_dom
(
env_intuitionistic
Δ
))
in
go
Hs
end
.
end
.
...
@@ -427,6 +428,7 @@ Ltac iFrameAnySpatial :=
...
@@ -427,6 +428,7 @@ Ltac iFrameAnySpatial :=
match
Hs
with
[]
=>
idtac
|
?H
::
?Hs
=>
try
iFrameHyp
H
;
go
Hs
end
in
match
Hs
with
[]
=>
idtac
|
?H
::
?Hs
=>
try
iFrameHyp
H
;
go
Hs
end
in
match
goal
with
match
goal
with
|
|
-
envs_entails
?Δ
_
=>
|
|
-
envs_entails
?Δ
_
=>
(* [lazy] because [Δ] involves user terms *)
let
Hs
:=
eval
lazy
in
(
env_dom
(
env_spatial
Δ
))
in
go
Hs
let
Hs
:=
eval
lazy
in
(
env_dom
(
env_spatial
Δ
))
in
go
Hs
end
.
end
.
...
@@ -1021,6 +1023,7 @@ Tactic Notation "iSpecializeCore" open_constr(H)
...
@@ -1021,6 +1023,7 @@ Tactic Notation "iSpecializeCore" open_constr(H)
(* Check if we should use [tac_specialize_intuitionistic_helper]. Notice
(* Check if we should use [tac_specialize_intuitionistic_helper]. Notice
that [pm_eval] does not unfold [use_tac_specialize_intuitionistic_helper],
that [pm_eval] does not unfold [use_tac_specialize_intuitionistic_helper],
so we should do that first. *)
so we should do that first. *)
(* [lazy] because [Δ] involves user terms *)
let
b
:=
eval
lazy
[
use_tac_specialize_intuitionistic_helper
]
in
let
b
:=
eval
lazy
[
use_tac_specialize_intuitionistic_helper
]
in
(
if
p
then
use_tac_specialize_intuitionistic_helper
Δ
pat
else
false
)
in
(
if
p
then
use_tac_specialize_intuitionistic_helper
Δ
pat
else
false
)
in
lazymatch
eval
pm_eval
in
b
with
lazymatch
eval
pm_eval
in
b
with
...
@@ -1030,6 +1033,7 @@ Tactic Notation "iSpecializeCore" open_constr(H)
...
@@ -1030,6 +1033,7 @@ Tactic Notation "iSpecializeCore" open_constr(H)
lazymatch
iTypeOf
H
with
lazymatch
iTypeOf
H
with
|
Some
(
?q
,
_)
=>
|
Some
(
?q
,
_)
=>
let
PROP
:=
iBiOfGoal
in
let
PROP
:=
iBiOfGoal
in
(* [lazy] because [PROP] involves user terms *)
lazymatch
eval
lazy
in
(
q
||
tc_to_bool
(
BiAffine
PROP
))
with
lazymatch
eval
lazy
in
(
q
||
tc_to_bool
(
BiAffine
PROP
))
with
|
true
=>
|
true
=>
notypeclasses
refine
(
tac_specialize_intuitionistic_helper
_
H
_
_
_
_
_
_
_
_
_
_);
notypeclasses
refine
(
tac_specialize_intuitionistic_helper
_
H
_
_
_
_
_
_
_
_
_
_);
...
...
This diff is collapsed.
Click to expand it.
iris/proofmode/reduction.v
+
22
−
3
View file @
13aa09a8
...
@@ -12,12 +12,31 @@ proofmode:
...
@@ -12,12 +12,31 @@ proofmode:
- Use [lazy] if the expected result is a simple term and the input term *does*
- Use [lazy] if the expected result is a simple term and the input term *does*
involve user terms.
involve user terms.
- Use [pm_eval] otherwise, particularly to compute new proof mode environments
- Use [pm_eval] otherwise, particularly to compute new proof mode environments
and to lookup items in the proof mode environment.
*)
and to lookup items in the proof mode environment.
(**
The reduction [pm_eval] avoids reducing anything user-visible to make sure
The reduction [pm_eval] avoids reducing anything user-visible to make sure
we do not reduce e.g., before unification happens in [iApply]. This needs to
we do not reduce e.g., before unification happens in [iApply]. This needs to
contain all definitions used in the user-visible statements in [coq_tactics],
contain all definitions used in the user-visible statements in [coq_tactics],
and their dependencies. *)
and their dependencies.
Examples:
- [envs_lookup i Δ], where [Δ] is a proof mode environment. This should be
computed using [pm_eval] because [Δ] involves user terms and the result is
also a user term (a hypothesis).
- [dom Δ], where [Δ] is a proof mode environment. This should be computed with
[lazy] because [Δ] involves user terms and the result is a list of strings.
This should *never* be computed using [cbv]/[vm_compute] as that would eagerly
unfold all hypotheses in [Δ]. Note that in this specific case one could also
use [pm_eval] because all definitions in [dom] are whitelisted by [pm_eval].
However, [lazy] is more useful when considering [f (dom Δ)] where [f] is not
whitelisted, as [pm_eval] would simply get stuck.
- [tc_to_bool (BiAffine PROP)]. This should be computed using [lazy] as [PROP]
involves user terms (a BI canonical structure instance) and the result is a
mere Boolean. This term trivially normalizes with [lazy] to a Boolean (which
is present as implicit parameter derived by TC search), while [cbv] would
eagerly normalize the whole of [PROP] (i.e., all BI operations contained in
the record). *)
Declare
Reduction
pm_eval
:=
cbv
[
Declare
Reduction
pm_eval
:=
cbv
[
(* base *)
(* base *)
base
.
negb
base
.
beq
base
.
negb
base
.
beq
...
...
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