aboutsummaryrefslogtreecommitdiff
path: root/tactics
AgeCommit message (Collapse)Author
2020-09-02Replace `frozen` by `allowed` evars in evarconv, and delay themMaxime Dénès
This is a follow-up of #9062, which introduced a discrenpancy between the two unification engines.
2020-09-02Merge PR #12943: Move Elim-specific codeHugo Herbelin
Ack-by: SkySkimmer Reviewed-by: herbelin
2020-09-02Remove the opening of CErrors in Elim.Pierre-Marie Pédrot
2020-09-02Code deduplication in Elim.Pierre-Marie Pédrot
2020-09-02Factorize the only uses of internal API in Elim for Inv.Pierre-Marie Pédrot
2020-09-02Make the Elim.branch_args type opaque.Pierre-Marie Pédrot
2020-09-02Further remove the type Elim.branch_assumptions.Pierre-Marie Pédrot
Only one field was used throughout the code base.
2020-09-02Remove unused API from Elim.Pierre-Marie Pédrot
2020-09-02Document the Equality.equality type in the ML file.Pierre-Marie Pédrot
2020-09-02Remove redundant data from the equality eliminator datatype.Pierre-Marie Pédrot
2020-09-02Do not look for a quantified inductive type in intropattern injection.Pierre-Marie Pédrot
The code below checks that the term is an applied equality, so allowing non-trivially quantified inductive types would trigger an error right after.
2020-09-02Use a dedicated type for equality elimination.Pierre-Marie Pédrot
In this mess of higher-order callbacks it helps sorting out the invariants of the structure.
2020-09-01Unify the shelvesMaxime Dénès
Before this patch, the proof engine had three notions of shelves: - A local shelf in `proofview` - A global shelf in `Proof.t` - A future shelf in `evar_map` This has lead to a lot of confusion and limitations or bugs, because some components have only a partial view of the shelf: the pretyper can see only the future shelf, tactics can see only the local and future shelves. In particular, this refactoring is needed for #7825. The solution we choose is to move shelf information to the evar map, as a shelf stack (for nested `unshelve` tacticals). Closes #8770. Closes #6292. Co-authored-by: Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>
2020-08-31Perform an inversion of control in hint validation for eapply.Pierre-Marie Pédrot
We move the "verbose" case to the only point it is actually used. It is a bit unfortunate since it implies a bit of code duplication, but this should not affect runtime since the replaying only happens in case of a user-facing warning.
2020-08-31Fix mangle names issue in inductionGaëtan Gilbert
Fix #12944
2020-08-31Fixes a freshness issue with induction (see comment in #12944).Hugo Herbelin
The names computed in consume_pattern were lost when calling intros_pattern_core. Moreover, the computation of names to avoid was done several time. We compute it once for all.
2020-08-31Move elim-specific code from Tacticals to Elim.Pierre-Marie Pédrot
No reason to have them there.
2020-08-28Clarify variable names in abstract implementationGaëtan Gilbert
It makes no sense to call the context from the goal "global"
2020-08-28Make abstract compatible with mangle namesGaëtan Gilbert
Fix #12928 Fix #3146
2020-08-27Merge PR #12849: Rename VM-related kernel/cfoo files to kernel/vmfooPierre-Marie Pédrot
Reviewed-by: gares Reviewed-by: ppedrot Reviewed-by: silene
2020-08-26Make future_goals stack explicit in the evarmapMaxime Dénès
2020-08-26Move given_up goals to evar_mapMaxime Dénès
2020-08-26Better encapsulation of future goalsMaxime Dénès
We try to encapsulate the future goals abstraction in the evar map. A few calls to `save_future_goals` and `restore_future_goals` are still there, but we try to minimize them. This is a preliminary refactoring to make the invariants between the shelf and future goals more explicit, before giving unification access to the shelf, which is needed for #7825.
2020-08-25Deprecate intro_usingGaëtan Gilbert
This is a footgun as it can refresh the name. Callers can still ignore the generated name by doing `intro_using_then id (fun _ -> tclUNIT())`.
2020-08-25elim.ml: stop using intro_usingGaëtan Gilbert
2020-08-25Make decide equality compatible with mangled names.Gaëtan Gilbert
Fix #12676
2020-08-24Merge PR #12565: Dnets now consider axioms as being opaque for pattern ↵coqbot
recognition. Reviewed-by: mattam82
2020-08-24Merge PR #12816: Fixes #12787: anomaly of tactic injection in the presence ↵Pierre-Marie Pédrot
of artificial dependencies disappearing by reduction Reviewed-by: ppedrot
2020-08-20Use properly fresh names for Scheme EqualityJasper Hugunin
2020-08-20Quick fix to #12787 (injection anomaly due to inconsistent comp. of free vars).Hugo Herbelin
We fix it by reducing K-redexes the same in the both places (make_tuple and minimal_free_rels) which compute the dependencies of a dependent equality.
2020-08-20Do not store the transparent state in delayed dnets.Pierre-Marie Pédrot
We know statically that it is going to be the one provided at the time of lookup, so we simply fetch it from there.
2020-08-20Dnets now consider axioms as being opaque for pattern recognition.Pierre-Marie Pédrot
2020-08-19Replace Hints.head_constr_bound with Hints.head_bound.Pierre-Marie Pédrot
The two implementations are essentially the same except for potential interleaving of let-bindings and pattern-matchings. The only place the removed function was called probably does not rely on this difference of behaviour.
2020-08-19Simplify the computation of the head global for hint patterns.Pierre-Marie Pédrot
Instead of having to go through the pattern translation, we compute the pattern directly from the term.
2020-08-19Ensure statically that Hint Extern comes with a pattern.Pierre-Marie Pédrot
2020-08-19Merge PR #12822: Do not precompute hint dnets eagerlyMatthieu Sozeau
Reviewed-by: mattam82
2020-08-19Merge PR #12725: Store evar identity instances in evarinfo / named_context_valEnrico Tassi
Ack-by: SkySkimmer Reviewed-by: gares
2020-08-18Rename VM-related kernel/cfoo files to kernel/vmfooGaëtan Gilbert
2020-08-18Tactic replace: adding support for registration of an equality in Type.Hugo Herbelin
2020-08-18Tactic inversion: adding support for registration of an equality in Type.Hugo Herbelin
2020-08-17Merge PR #12841: Recommend replace as a replacement to cutrewrite.coqbot
Reviewed-by: jfehrle Reviewed-by: ppedrot
2020-08-17Recommend replace as a replacement to cutrewrite.Théo Zimmermann
As suggested by Laurent Thery to Chris Dams on Coq-Club. (And fix the documented syntax in the manual.)
2020-08-17Merge PR #12751: Fixes reduction effect printing in the presence of non ↵Pierre-Marie Pédrot
purely applicative stacks Ack-by: SkySkimmer Reviewed-by: ppedrot
2020-08-14Do not precompute hint dnets eagerly.Pierre-Marie Pédrot
Due to the way transparency is handled in hint databases, every time it is changed, all dnets are recomputed from scratch. This is very expensive, and a bench showed that it was sometimes contributing significantly to the whole compilation time of hint-heavy libraries. This patch makes this computation lazy, so that the dnet is computed only the first time a hint lookup is performed. The implementation is functionally equivalent to wrapping the sentry_bnet field in a Lazy.t, but because dnets are stored in the summary and thus marshalled, I had to manually perform a defunctionalization. A (maybe cleaner?) alternative would be to track the set of constants a hint depend on, in order to only refresh those touched by the change of transparency. Yet, this would be a much more invasive change.
2020-08-13Merge PR #12720: Factor code related to class hint clenvHugo Herbelin
Reviewed-by: SkySkimmer Reviewed-by: herbelin
2020-08-13Merge PR #12718: Do not rely on higher-order interfaces for patterns in dnets.Hugo Herbelin
Reviewed-by: herbelin
2020-08-12Cosmetic changes as suggested by SkySkimmer.Pierre-Marie Pédrot
2020-08-12Further code simplification in typeclass resolution tactic.Pierre-Marie Pédrot
2020-08-12Split the uses of connect_hint_clenv into two different functions.Pierre-Marie Pédrot
The first one is encapsulating the clenv part, and is now purely internal, while the other one provides an abstract interfact to get fresh term instances from a hint.
2020-08-12Tentatively more efficient implementation of e_give_exact for typeclasses.Pierre-Marie Pédrot
The old code was refreshing the whole evarmap when only the constraints introduced by the term would matter. Since exact hints never introduces metas for missing binders, there is nothing to extract from the clenv, so we can just generate a fresh universe substitution.