aboutsummaryrefslogtreecommitdiff
path: root/ltac
AgeCommit message (Collapse)Author
2016-11-07Merge commit 'e6edb33' into v8.6Maxime Dénès
Was PR#331: Solve_constraints and Set Use Unification Heuristics
2016-11-07More explicit name for status of unification constraints.Maxime Dénès
2016-10-29Fixing #5164 (regression in locating error in argument of "refine").Hugo Herbelin
Reporting location was not expecting a term passed to an ML tactic to be interpreted by the ML tactic itself. Made an empirical fix to report about the as-precise-as-possible location available.
2016-10-22Merge branch 'v8.5' into v8.6Hugo Herbelin
2016-10-22Unification constraint handling (#4763, #5149)Matthieu Sozeau
Refine fix for bug #4763, fixing #5149 Tactic [Refine.solve_constraints] and global option Adds a new multi-goal tactic [Refine.solve_constraints] that forces solving of unification constraints and evar candidates to be solved. run_tactic now calls [solve_constraints] at every [.], preserving (mostly) the 8.4/8.5 behavior of tactics. The option allows to unset the forced solving unification constraints at each ".", letting the user control the places where the use of heuristics is done. Fix test-suite files too.
2016-10-21Revert 214b9ab7969fae71dcf553c399cb1674e463d0e3Matthieu Sozeau
This makes [refine] typecheck the term only once (instead of twice), (Qed excluded of course). Fix test-suite file for output of constraints accordingly.
2016-10-20Merge branch 'bug5036' into v8.6Matthieu Sozeau
2016-10-20Fix bug #5036 autorewrite, sections and universesMatthieu Sozeau
Universe context not properly declared. Improve API and code in declare.ml to allow declaration of universe contexts, used by declaration of universes and constraints (separately).
2016-10-12Fix bug #5116: [Print Ltac] should be able to print strategies.Pierre-Marie Pédrot
2016-10-08Fix bug #5098: Symmetry broken in HoTT.Pierre-Marie Pédrot
We defactorize the in_clause grammar entry to allow parsing of the "symmetry" tactic when it has no arguments. Beforehand, the clause_dft_concl entry accepted the empty stream, preventing the definition of symmetry as a mere identifier.
2016-09-29LtacProf cutoff is for total percent, not timeJason Gross
2016-09-29Merge branch 'bug5036' into v8.6Matthieu Sozeau
2016-09-29Fix bug #5036 autorewrite, sections and universesMatthieu Sozeau
Universe context not properly declared. Improve API and code in declare.ml to allow declaration of universe contexts, used by declaration of universes and constraints (separately).
2016-09-29-profile-ltac-cutoff alike Show Ltac Profile Cutoff (#5100)Enrico Tassi
With this command line flag one can profile ltac in files /and/ trim the results without actually touching the files.
2016-09-28Merge remote-tracking branch 'github/pr/232' into v8.6Maxime Dénès
Was PR#232: Fix the parsing of goal selectors.
2016-09-27LtacProf: "Show Ltac Profile CutOff $N" (fix #5080)Enrico Tassi
It seems we have no grammar rule that parses floats, so I'm parsing an integer, but the whole machinery supports floats.
2016-09-26Fix bug #5093: typeclasses eauto depth arg does not accept a var.Pierre-Marie Pédrot
2016-09-15Continuing fix to #5078, taking also into account intropatterns.Hugo Herbelin
Getting closer from before when the bug was introduced + test.
2016-09-13Fixing #5078 (wrong detection of evaluable local hypotheses).Hugo Herbelin
2016-09-13LtacProp: fix reset_profile (fix #5079)Enrico Tassi
2016-09-11Fix newlines in printout of LtacProfJason Gross
Previously, newlines were missing if a node had no children.
2016-09-11Revert the LtacProf tactic table headerJason Gross
This removes a space (making the final letter of the right-aligned columns line come right before the vertical separators, rather than overlapping them), and left-aligns "tactic", as it was in Tobias' original code, which I think is easier to read. (This way, the alignment of the headers matches the alignment of the entries.)
2016-09-09Fix bug #3920 for good after 44ada64.Pierre-Marie Pédrot
The previous commit did not apply the beta reduction for compatibility on the correct goal. We rather apply it on the first generated subgoal. This fixes the ergo contrib.
2016-09-07Removing useless tactic compatibility layer in Rewrite.Pierre-Marie Pédrot
2016-09-07ltacprof: rec-calls are coaleshedEnrico Tassi
2016-09-05profile_ltac: rewritten to be purely functional and STM awareEnrico Tassi
Changes: - data structures are purely functional (so retracting do work) - profiling data flows towards master using the feedback bus - master aggregates the data on printing
2016-09-01Moving log of "TacReduce"/"reduce" to Tactics.reduce so that internalHugo Herbelin
calls are logged too. Using appropriate printer for reparsability of the output.
2016-08-30Fix bug #4893: not_evar: unexpected failure in 8.5pl1.Pierre-Marie Pédrot
2016-08-30Fix bug #3920: eapply masks an hypothesis name.Pierre-Marie Pédrot
The problem came from the fact that the legacy beta-reduction occurring after a rewrite was wrongly applied to the side-conditions of the rewriting step. We restrict it to the correct goal in this patch.
2016-08-23Fix bug #4914: LtacProf printout has too many newlines.Pierre-Marie Pédrot
2016-08-19Moving Taccoerce to ltac/ folder.Pierre-Marie Pédrot
This was an overlook. There was no reason to let it in the tactics/ folder, as is was semantically part of the Ltac implementation.
2016-08-18Merge remote-tracking branch 'github/bug4188' into v8.6Matthieu Sozeau
2016-08-18Fix bug #4939: LtacProf prints tactic notations weirdly.Pierre-Marie Pédrot
2016-08-17Fix setoid_rewrite to raise proper errorsMatthieu Sozeau
when the rewrite lemma doesn't typecheck or does not correspond to a relation.
2016-08-16Merge branch 'v8.5' into v8.6Pierre-Marie Pédrot
2016-07-29Merge remote-tracking branch 'gforge/v8.5' into v8.6Matthieu Sozeau
2016-07-21Fix bug #4679, weakened setoid_rewrite unificationMatthieu Sozeau
It should use evar instantiations eagerly during unification of the lhs of the lemma, as in 8.4.
2016-07-04Revert "Revert "Improve the interpretation scope of arguments of an ltac ↵Maxime Dénès
match."" We apply this patch to trunk so that it is integrated in 8.6. This reverts commit 0eb08b70f0c576e58912c1fc3ef74f387ad465be.
2016-07-04Merge branch 'v8.5' into trunkMaxime Dénès
2016-07-03rename toplevel/cerror.ml into explainErr.ml (too close to the new ↵Pierre Letouzey
lib/cErrors.ml)
2016-07-03closure.ml renamed into cClosure.ml (avoid clash with a compiler-libs module)Pierre Letouzey
For the moment, there is a Closure module in compiler-libs/ocamloptcomp.cm(x)a
2016-07-03errors.ml renamed into cErrors.ml (avoid clash with an OCaml compiler-lib ↵Pierre Letouzey
module) For the moment, there is an Error module in compilers-lib/ocamlbytecomp.cm(x)a
2016-07-01Separate flags for fix/cofix/match reduction and clean reduction function names.Maxime Dénès
This is a reimplementation of Hugo's PR#117. We are trying to address the problem that the name of some reduction functions was not saying what they were doing (e.g. whd_betadeltaiota was doing let-in reduction). Like PR#117, we are careful that no function changed semantics without changing the names. Porting existing ML code should be a matter of renamings a few function calls. Also, we introduce more precise reduction flags fMATCH, fFIX, fCOFIX collectively denominated iota. We renamed the following functions: Closure.betadeltaiota -> Closure.all Closure.betadeltaiotanolet -> Closure.allnolet Reductionops.beta -> Closure.beta Reductionops.zeta -> Closure.zeta Reductionops.betaiota -> Closure.betaiota Reductionops.betaiotazeta -> Closure.betaiotazeta Reductionops.delta -> Closure.delta Reductionops.betalet -> Closure.betazeta Reductionops.betadelta -> Closure.betadeltazeta Reductionops.betadeltaiota -> Closure.all Reductionops.betadeltaiotanolet -> Closure.allnolet Closure.no_red -> Closure.nored Reductionops.nored -> Closure.nored Reductionops.nf_betadeltaiota -> Reductionops.nf_all Reductionops.whd_betadelta -> Reductionops.whd_betadeltazeta Reductionops.whd_betadeltaiota -> Reductionops.whd_all Reductionops.whd_betadeltaiota_nolet -> Reductionops.whd_allnolet Reductionops.whd_betadelta_stack -> Reductionops.whd_betadeltazeta_stack Reductionops.whd_betadeltaiota_stack -> Reductionops.whd_all_stack Reductionops.whd_betadeltaiota_nolet_stack -> Reductionops.whd_allnolet_stack Reductionops.whd_betadelta_state -> Reductionops.whd_betadeltazeta_state Reductionops.whd_betadeltaiota_state -> Reductionops.whd_all_state Reductionops.whd_betadeltaiota_nolet_state -> Reductionops.whd_allnolet_state Reductionops.whd_eta -> Reductionops.shrink_eta Tacmach.pf_whd_betadeltaiota -> Tacmach.pf_whd_all Tacmach.New.pf_whd_betadeltaiota -> Tacmach.New.pf_whd_all And removed the following ones: Reductionops.whd_betaetalet Reductionops.whd_betaetalet_stack Reductionops.whd_betaetalet_state Reductionops.whd_betadeltaeta_stack Reductionops.whd_betadeltaeta_state Reductionops.whd_betadeltaeta Reductionops.whd_betadeltaiotaeta_stack Reductionops.whd_betadeltaiotaeta_state Reductionops.whd_betadeltaiotaeta They were unused and having some reduction functions perform eta is confusing as whd_all and nf_all don't do it.
2016-06-30Goal selectors now use the keyword [only].Cyprien Mangin
This fixes some parsing problems when doing things like [let n := 2 in idtac n]. See bug #4877.
2016-06-29A new infrastructure for warnings.Maxime Dénès
On the user side, coqtop and coqc take a list of warning names or categories after -w. No prefix means activate the warning, a "-" prefix means deactivate it, and "+" means turn the warning into an error. Special categories include "all", and "default" which contains the warnings enabled by default. We also provide a vernacular Set Warnings which takes the same flags as argument. Note that coqc now prints warnings. The name and category of a warning are printed with the warning itself. On the developer side, Feedback.msg_warning is still accessible, but the recommended way to print a warning is in two steps: 1) create it by: let warn_my_warning = CWarnings.create ~name:"my-warning" ~category:"my-category" (fun args -> Pp.strbrk ...) 2) print it by: warn_my_warning args
2016-06-20LtacProf reports structured results (pr/209)CJ Bell
using a custom feedback message in response to "Show Ltac Profile."
2016-06-20Do not evar-normalize goals when interpreting some hardwired genargs.Pierre-Marie Pédrot
2016-06-18Backporting c064fb933 from 8.5 (another regression with Ltac trace report).Hugo Herbelin
Doing it explicitly because it is in another file.
2016-06-18Adding an "as" clause to specialize.Hugo Herbelin
Comments -------- - The tactic specialize conveys a somehow intuitive reasoning concept and I would support continuing maintaining it even if the design comes in my opinion with some oddities. (Note that the experience of MathComp and SSReflect also suggests that specialize is an interesting concept in itself). There are two variants to specialize: - specialize (H args) with H an hypothesis looks natural: we specialize H with extra arguments and the "as pattern" clause comes naturally as an extension of it, destructuring the result using the pattern. - specialize term with bindings makes the choice of fully applying the term filling missing expressions with bindings and to then behave as generalize. Wouldn't we like a more fine-grained approach and the result to remain in the context? In this second case, the "as" clause works as if the term were posed in the context with "pose proof".
2016-06-18Giving a more natural semantics to injection by default.Hugo Herbelin
There were three versions of injection: 1. "injection term" without "as" clause: was leaving hypotheses on the goal in reverse order 2. "injection term as ipat", first version: was introduction hypotheses using ipat in reverse order without checking that the number of ipat was the size of the injection (activated with "Unset Injection L2R Pattern Order") 3. "injection term as ipat", second version: was introduction hypotheses using ipat in left-to-right order checking that the number of ipat was the size of the injection and clearing the injecting term by default if an hypothesis (activated with "Set Injection L2R Pattern Order", default one from 8.5) There is now: 4. "injection term" without "as" clause, new version: introducing the components of the injection in the context in left-to-right order using default intro-patterns "?" and clearing the injecting term by default if an hypothesis (activated with "Set Structural Injection") The new versions 3. and 4. are the "expected" ones in the sense that they have the following good properties: - introduction in the context is in the natural left-to-right order - "injection" behaves the same with and without "as", always introducing the hypotheses in the goal what corresponds to the natural expectation as the changes I made in the proof scripts for adaptation confirm - clear the "injection" hypothesis when an hypothesis which is the natural expectation as the changes I made in the proof scripts for adaptation confirm The compatibility can be preserved by "Unset Structural Injection" or by calling "simple injection". The flag is currently off.