aboutsummaryrefslogtreecommitdiff
path: root/tactics
AgeCommit message (Collapse)Author
2020-09-23Merge PR #12977: Statically ensure that only polymophic hint terms come with ↵coqbot-app[bot]
a context. Reviewed-by: mattam82
2020-09-23Merge PR #12847: Tactics inversion and replace work with eq in typePierre-Marie Pédrot
Reviewed-by: ppedrot
2020-09-18Remove unused API from Dn.Pierre-Marie Pédrot
2020-09-18Clean up a bit the implemenation of dnets.Pierre-Marie Pédrot
We use higher-level combinators instead of composition of low-level ones.
2020-09-18Remove dead code in dnets.Pierre-Marie Pédrot
The boolean assumedly used to cut recursion was always set to true, since its introduction in 64ac193.
2020-09-16Merge PR #13008: Use fresher names in eqschemesHugo Herbelin
Reviewed-by: herbelin Reviewed-by: ppedrot
2020-09-13Statically ensure that only polymophic hint terms come with a context.Pierre-Marie Pédrot
It is the duty of the caller to properly declare monomorphic global constraints when creating a non-globref hint. All callers were already abiding by this convention.
2020-09-10Use fresher names in eqschemes.Jasper Hugunin
The previous implementation appears to be sound when Mangle Names is off, but it relies on two fragile assumptions, namely that next_global_ident_away always returns different identifiers when called with naming hints which are different after stripping all digits from the end, and that default_id_of_sort (locally defined) never returns "HC" or "P", or either of those followed by a string of digits. These changes make both assumptions unnecessary. As a side note, it seems odd that fresh is ignoring it's env parameter.
2020-09-10Add a fast-path to Tactics.e_change_in_hyps.Pierre-Marie Pédrot
In case we give an empty list of occurrences to e_change_in_hyps, we can return immediately. This saves the allocation of a dummy evar, and a O(n) map over the context for "local" reduction functions. Note that passing an empty list of hypotheses is the default for both the "change" tactic and reduction tactics.
2020-09-09Merge PR #7825: [tactics] Refine test for unresolved evars: not reachable ↵Pierre-Marie Pédrot
from initial evars Ack-by: JasonGross Ack-by: Zimmi48 Reviewed-by: ejgallego Reviewed-by: gares Ack-by: jfehrle Ack-by: maximedenes Reviewed-by: ppedrot
2020-09-08Merge PR #12993: Remove deprecated tactic cutrewrite.Clément Pit-Claudel
Reviewed-by: cpitclaudel Reviewed-by: ppedrot
2020-09-08Remove deprecated tactic cutrewrite.Théo Zimmermann
2020-09-08Merge PR #12954: Fixes a freshness issue with destruct/induction (see ↵Pierre-Marie Pédrot
comment in #12944). Ack-by: RalfJung Ack-by: jashug Reviewed-by: ppedrot
2020-09-07Refine test for unresolved evars: not reachable from initial evarsMatthieu Sozeau
The test is refined to handle aliases: i.e. undefined evars coming from restrictions and evar-evar unifications with an initial evar are not considered fresh unresolved evars. To check this, we generalize the restricted_evars set to an aliased_evars set in the evar map, registering evars being solved by another evar due to restriction or evar-evar unifications. This implements the proposal of PR #370 for testing the resolution status of evars independently of the evar-evar orientation order. This allows [apply] to refine an evar with a new one if it results from a [clear] request or an evar-evar solution only, otherwise the new evar is considered fresh and an error is raised. Also fixes bugs #4095 and #4413. Co-authored-by: Maxime Dénès <maxime.denes@inria.fr>
2020-09-06Merge PR #12976: Remove clenv chaining in EqualityHugo Herbelin
Reviewed-by: herbelin
2020-09-04Remove the last use of clenv_fchain in Equality.Pierre-Marie Pédrot
Once again, we now statically the type of the argument is the same, so there is no need to call the old unification.
2020-09-04Inline the last use of apply_on_clause in Equality.Pierre-Marie Pédrot
2020-09-04Remove a useless use of clenv_fchain in Equality.Pierre-Marie Pédrot
The clenv was generated to eliminate a negation, but its argument was given immediately and its type statically known to be the same.
2020-09-04Statically enforce that elim is passed a fully applied inductive type.Pierre-Marie Pédrot
2020-09-04Restrict a spurious call to a reduction to a quantified inductive type.Pierre-Marie Pédrot
Actually the callers of that function only apply it to an applied inductive type.
2020-09-04Defunctionalize the mk_elim creation in Elim.Pierre-Marie Pédrot
2020-09-04Enforce the argument of elim functions to be a variable.Pierre-Marie Pédrot
2020-09-03Merge PR #12968: Replace `frozen` by `allowed` evars in evarconv, and delay themPierre-Marie Pédrot
Reviewed-by: ppedrot
2020-09-03Merge PR #12956: Perform an inversion of control in hint validation for eapply.coqbot-app[bot]
Reviewed-by: mattam82 Ack-by: SkySkimmer Ack-by: ppedrot
2020-09-03Merge PR #12973: Random cleanup around the data structures used in EqualityHugo Herbelin
Reviewed-by: herbelin
2020-09-02Abstract type for allowed evarsMaxime Dénès
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())`.