aboutsummaryrefslogtreecommitdiff
path: root/tactics
AgeCommit message (Collapse)Author
2014-08-05Experimentally adding an option for automatically erasing anHugo Herbelin
hypothesis when using it in apply or rewrite (prefix ">", undocumented), and a modifier to explicitly keep it in induction or destruct (prefix "!", reminiscent of non-linerarity). Also added undocumented option "Set Default Clearing Used Hypotheses" which makes apply and rewrite default to erasing the hypothesis they use (if ever their argument is indeed an hypothesis of the context).
2014-08-05Adding a syntax "enough" for the variant of "assert" with the order ofHugo Herbelin
subgoals and the role of the "by tac" clause swapped.
2014-08-05A new step in the new "standard" naming policy for propositional hypothesesHugo Herbelin
obtained from case analysis or induction. Made it under experimental status. This replaces commit bf7d2a3ad2535e7d57db79c17c81aaf67d956965 which was acting at the level of logic.ml. Now acting in tactics.ml. Parts of things to be done about naming (not related to Propositions): induction on H:nat+bool produces hypotheses n and b but destruct on H produces a and b. This is because induction takes the dependent scheme whose names are statically inferred to be a and b while destruct dynamically builds a new scheme.
2014-08-05STM: new "par:" goal selector, like "all:" but in parallelEnrico Tassi
par: distributes the goals among a number of workers given by -async-proofs-tac-j (defaults to 2).
2014-08-05Ltac's [idtac] is now interpreted outside of a goal if possible.Arnaud Spiwack
It avoids printing several times the same things when no constr are involved in the message. It also allows to print messages even after all goals have been solved.
2014-08-05Ltac's idtac is now implemented using the new API.Arnaud Spiwack
2014-08-05Tacinterp: [interp_message] and associate now only require an environment ↵Arnaud Spiwack
rather than an entire goal.
2014-08-05Tactics: [tclENV] is now sensitive to [Proofview.Goal.enter].Arnaud Spiwack
When "entering" in a goal, the environment observed by [tclENV] is changed (in the scope of the goal) to be that of the goal. I'm not entirely sure it is the right semantics. But it allows to write tactics which are agnostic of whether they are run in a goal or not.
2014-08-05Fix interpretation bug in [uconstr].Arnaud Spiwack
Substitution of the Ltac variables would only occur if the internalised [uconstr] was of the form [glob, Some expr], which is the case only in tactics defined inside a proof, but not in tactics defined in [Ltac].
2014-08-05The [refine] tactic now accepts [uconstr].Arnaud Spiwack
Arguments of refine can hence be built by tactics instead of given in their entirety in one go.
2014-08-04Cleaning of the new implementation of the tactic monad.Arnaud Spiwack
* Add comments in the code (mostly imported from Monad.v) * Inline duplicated module * Clean up some artifacts due to the extracted code. * [NonLogical.new_ref] -> [NonLogical.ref] (I don't even remember why I chose this name originally) * Remove the now superfluous [Proof_errors] module (which was used to define exceptions to be used in the extracted code). * Remove Monad.v
2014-08-03Move to a representation of universe polymorphic constants using indices for ↵Matthieu Sozeau
variables. Simplifies instantiation of constants/inductives, requiring less allocation and Map.find's. Abstraction by variables is handled mostly inside the kernel but could be moved outside.
2014-08-02Better struture for Ltac internalization environments in Constrintern.Pierre-Marie Pédrot
2014-08-01Faster uconstr.Arnaud Spiwack
Detyping was called on every typed constr in the Ltac context which was costly as most of the context is likely not to be refered to in a particular uconstr. This commit calls detyping lazily instead.
2014-08-01New tactical [> t1…tn] to apply tactics t1…tn to the corresponding goal.Arnaud Spiwack
Differs from the usual t;[t1…tn] in two ways: * It can be used without a preceding tactic * It counts every focused subgoal, rather than considering independently the goals generated by the application of the preceding tactic on individual goals. In other words t;[t1…tn] is [> t;[>t1…tn].. ].
2014-08-01Add [guard] tactic.Arnaud Spiwack
The [guard] tactic accepts simple tests (on integers) as argument, succeeds if the test passes and fails if the test fails. Together with [numgoal] can be used to fork on the number of goals of a tactic. The syntax is not very robust (in particular [guard n<=1] is correct but not [guard (n<=1)]). Maybe tests should be moved to the general parser to allow for more flexibility.
2014-08-01Add [numgoal] to Ltac.Arnaud Spiwack
2014-08-01Untyped terms in ltac: simplify [coerce_to_uconstr].Arnaud Spiwack
Following advice by Hugo Herbelin.
2014-08-01Remove spurious [1] in equality.ml.Arnaud Spiwack
Introduced in a4043608f
2014-08-01A tentative uniform naming policy in module Inductiveops.Hugo Herbelin
- realargs: refers either to the indices of an inductive, or to the proper args of a constructor - params: refers to parameters (which are common to inductive and constructors) - allargs = params + realargs - realdecls: refers to the defining context of indices or proper args of a constructor (it includes letins) - paramdecls: refers to the defining context of params (it includes letins) - alldecls = paramdecls + realdecls
2014-08-01Removing more tactic compatibility layer.Pierre-Marie Pédrot
2014-08-01Removing some tactic compatibility layer.Pierre-Marie Pédrot
2014-07-31Add an option to solve typeclass goals generated by apply which can't beMatthieu Sozeau
catched otherwise due to the discrepancy between evars and metas.
2014-07-30Fix discrimination net which was not recognizing primitive projections.Matthieu Sozeau
2014-07-29Untyped terms in tactic: add the possibility to use a typed term inside an ↵Arnaud Spiwack
untyped term.
2014-07-29Untyped terms in tactic: function [type_term c] to give a typed version of [c].Arnaud Spiwack
2014-07-29Add a type of untyped term to Ltac's value.Arnaud Spiwack
It is meant to avoid intermediary retyping when a term is built in Ltac. See #3218. The implementation makes a small modification in Constrintern: now the main internalisation function can take an extra substitution from Ltac variables to glob_constr and will apply the substitution during the internalisation.
2014-07-29Clean up obsolete comment.Arnaud Spiwack
2014-07-28CPS-style tactic matching. We use the tactic monad as the target of the CPS.Pierre-Marie Pédrot
This allows for tail-rec calls, prevents unwanted capture of closures and results in an overall more efficient evaluation.
2014-07-27Code cleaning in Tacenv.Pierre-Marie Pédrot
2014-07-27Qualified ML tactic names. The plugin name is used to discriminatePierre-Marie Pédrot
potentially conflicting tactics names from different plugins.
2014-07-25Removing dead code relative to or_metaid.Pierre-Marie Pédrot
2014-07-25Add a tactic [swap i j] to swap the position of goals [i] and [j].Arnaud Spiwack
If [i] or [j] is negative goals are counted from the end.
2014-07-25Adds a cycle tactic to reorder goals in a loop.Arnaud Spiwack
[cycle 1] puts the first goal last, [cycle -1] puts the last goal first, [cycle n] is like [do n cycle 1], [cycle -n] is like [do n cycle -1].
2014-07-25A slightly more fine grained way to check whether a TACTIC EXTEND is global ↵Arnaud Spiwack
or local to goals. Checks if the arguments need anything from the goal by looking at their tags, if not, the tactic is global.
2014-07-24Distinguish tactics t1;t2 and t1;[t2..].Arnaud Spiwack
They used to be the same (and had a single entry in the AST). But now that t2 can be a multi-goal tactic, t1;[t2..] has the semantics of executing t2 in each goal independently.
2014-07-22Small code sharing in TacticMatching.Pierre-Marie Pédrot
2014-07-21Correct eauto which was not dealing properly with polymorphic constants.Matthieu Sozeau
2014-07-14Redo PMP's patch to rewriting to make it purely functional using state passing.Matthieu Sozeau
2014-07-13Adding a "time" tactical for benchmarking purposes. In case the tacticHugo Herbelin
backtracks, print time spent in each of successive calls.
2014-07-10check_for_interrupt: better (but slower) in threading modeEnrico Tassi
Experimenting with PIDE I discovered that yield is not sufficient to have a rescheduling, hence the delay.
2014-07-10Fix a oversight in 5bf9e67b .Arnaud Spiwack
About 8 months after making this commit, I realised that I forgot to change a tclORELSE into a tclOR (which was the whole point of the commit to begin with). Shame on me. It does not seem to have much of an effect on efficiency, though. It may be a hair faster, but mostly indistinguishably so.
2014-07-07Revert "time tac" (committed by mistake).Hugo Herbelin
This reverts commit abad0a15ac44cb5b53b87382bb4d587d9800a0f6.
2014-07-07time tacHugo Herbelin
2014-07-05Using IStream coiterator to explicit the captured state of tactic matching ↵Pierre-Marie Pédrot
results.
2014-07-03Restore proper order of effects in letin_tac_gen. Fixes CFGV again.Matthieu Sozeau
2014-07-03More efficient implementation of Ltac match, by inlining a stream map.Pierre-Marie Pédrot
2014-07-02In setoid_rewrite, force resolution of the contraints generated by rewriting ↵Matthieu Sozeau
only. Do not mix it with resolution of user-introduced subgoals of typeclass type (bug found in ATBR).
2014-07-01Fixing the place where to insert a space in "Tactic failure"Hugo Herbelin
message. Otherwise, a heading space was missing when calling tclFAIL from ML tactics.
2014-06-30Useless keeping of dirpath in tactic aliases.Pierre-Marie Pédrot