aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics/class_tactics.ml
Commit message (Collapse)AuthorAge
* Clean up type classes flags and update compat file.Gravatar Maxime Dénès2016-10-05
|
* Fix bug #4893: not_evar: unexpected failure in 8.5pl1.Gravatar Pierre-Marie Pédrot2016-08-30
|
* errors.ml renamed into cErrors.ml (avoid clash with an OCaml compiler-lib ↵Gravatar Pierre Letouzey2016-07-03
| | | | | | module) For the moment, there is an Error module in compilers-lib/ocamlbytecomp.cm(x)a
* Separate flags for fix/cofix/match reduction and clean reduction function names.Gravatar Maxime Dénès2016-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Typeclasses: fix treatment of exceptions in compatGravatar Matthieu Sozeau2016-06-27
|
* Typeclasses: mark unresolvable goals in new implementationGravatar Matthieu Sozeau2016-06-27
|
* We want tclORELSE to catch exceptions on backtrackingsGravatar Matthieu Sozeau2016-06-27
|
* Typeclasses:rename solve_instantiation* & use HookGravatar Matthieu Sozeau2016-06-16
|
* Fix resolve_one_typeclass to use the new engineGravatar Matthieu Sozeau2016-06-16
|
* Bind resolve_one_typeclass to 8.5 or 8.6 resolutionGravatar Matthieu Sozeau2016-06-16
|
* Put autoapply back, lost during rebaseGravatar Matthieu Sozeau2016-06-16
|
* Cleanup and refactoringGravatar Matthieu Sozeau2016-06-16
|
* Purely refactoring and code/API cleanup.Gravatar Matthieu Sozeau2016-06-16
| | | | Fix test-suite files
* bteauto: a Proofview.tactic for multiple goalsGravatar Matthieu Sozeau2016-06-16
| | | | | | | Add an option to force backtracking at toplevel, which is used by default when calling typeclasses eauto on a set of goals. They might be depended on by other subgoals, so the tactic should be backtracking by default, a once can make it not backtrack.
* Typeclasses: allow shelved subgoalsGravatar Matthieu Sozeau2016-06-16
| | | | | | | | Be more lenient, allowing non-class subgoals to remain after resolution, this seems necessary when launching resolution in goals containing evars. Also put a tclONCE when hints don't need to backtrack.
* Minor cleanupGravatar Matthieu Sozeau2016-06-16
|
* Typeclasses: refine the eauto tacticGravatar Matthieu Sozeau2016-06-16
| | | | | | | | | - Treat shelved dependent subgoals that might not be resolved after some proof search correctly by restarting their resolution as soon as possible (if they are typeclasses in only_classes mode). - Treat dependencies between goals better, avoiding backtracking more often when dependencies allow.
* Typeclasses: verbosity and Limit Intros optionsGravatar Matthieu Sozeau2016-06-16
| | | | | | | To deactivate the limitation of introductions (which was added to avoid eta expansions in proof terms). This can cause huge blowups due to dumb backtracking. The arrow introduction rule is reversible, so better do it eagerly!
* typeclass resolution: add two compatibility optionsGravatar Matthieu Sozeau2016-06-16
| | | | | | | | | | | Set Typeclasses Compatibility "8.5". uses the old resolution tactic (off by default, but useful for debugging incompatibilities) Set Typeclasses Unification Compatibility "8.5". uses the old clenv unification tactic in resolution even with the new proof engine (on by default for now). Also fix the 8.5-compatible unification with the new engine resolution function, by using with_shelf and unshelve.
* Fix incorrect caching of local hints w.r.t sectionsGravatar Matthieu Sozeau2016-06-16
|
* Compat with ocaml 4.01Gravatar Matthieu Sozeau2016-06-16
|
* Fix iterative deepening strategy failing too earlyGravatar Matthieu Sozeau2016-06-16
| | | | | | Report limit exceeded on _any_ branch so that we pursue search if it was reached at least once. Add example by N. Tabareau in test-suite.
* Implement limited proof search and iterative deepening.Gravatar Matthieu Sozeau2016-06-16
| | | | Fix typo in proofview
* Typeclasses eauto based on new proof engine,Gravatar Matthieu Sozeau2016-06-16
| | | | with full backtracking across multiple goals.
* Add a synonymous Set Debug Typeclasses for Set Typeclasses Debug, for ↵Gravatar Hugo Herbelin2016-06-02
| | | | uniformity.
* Feedback cleanupGravatar Emilio Jesus Gallego Arias2016-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | This patch splits pretty printing representation from IO operations. - `Pp` is kept in charge of the abstract pretty printing representation. - The `Feedback` module provides interface for doing printing IO. The patch continues work initiated for 8.5 and has the following effects: - The following functions in `Pp`: `pp`, `ppnl`, `pperr`, `pperrnl`, `pperr_flush`, `pp_flush`, `flush_all`, `msg`, `msgnl`, `msgerr`, `msgerrnl`, `message` are removed. `Feedback.msg_*` functions must be used instead. - Feedback provides different backends to handle output, currently, `stdout`, `emacs` and CoqIDE backends are provided. - Clients cannot specify flush policy anymore, thus `pp_flush` et al are gone. - `Feedback.feedback` takes an `edit_or_state_id` instead of the old mix. Lightly tested: Test-suite passes, Proof General and CoqIDE seem to work.
* Put the "exact" family of tactic in the monad.Gravatar Pierre-Marie Pédrot2016-05-16
|
* Moving Eauto and Class_tactics to tactics/.Gravatar Pierre-Marie Pédrot2016-03-25
|
* Creating a dedicated ltac/ folder for Hightactics.Gravatar Pierre-Marie Pédrot2016-03-21
|
* merging conflicts with the original "trunk__CLEANUP__Context__2" branchGravatar Matej Kosik2016-02-15
|\
* | Moving conversion functions to the new tactic API.Gravatar Pierre-Marie Pédrot2016-02-15
| |
| * CLEANUP: Context.{Rel,Named}.Declaration.tGravatar Matej Kosik2016-02-09
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally, rel-context was represented as: Context.rel_context = Names.Name.t * Constr.t option * Constr.t Now it is represented as: Context.Rel.t = LocalAssum of Names.Name.t * Constr.t | LocalDef of Names.Name.t * Constr.t * Constr.t Originally, named-context was represented as: Context.named_context = Names.Id.t * Constr.t option * Constr.t Now it is represented as: Context.Named.t = LocalAssum of Names.Id.t * Constr.t | LocalDef of Names.Id.t * Constr.t * Constr.t Motivation: (1) In "tactics/hipattern.ml4" file we define "test_strict_disjunction" function which looked like this: let test_strict_disjunction n lc = Array.for_all_i (fun i c -> match (prod_assum (snd (decompose_prod_n_assum n c))) with | [_,None,c] -> isRel c && Int.equal (destRel c) (n - i) | _ -> false) 0 lc Suppose that you do not know about rel-context and named-context. (that is the case of people who just started to read the source code) Merlin would tell you that the type of the value you are destructing by "match" is: 'a * 'b option * Constr.t (* worst-case scenario *) or Named.Name.t * Constr.t option * Constr.t (* best-case scenario (?) *) To me, this is akin to wearing an opaque veil. It is hard to figure out the meaning of the values you are looking at. In particular, it is hard to discover the connection between the value we are destructing above and the datatypes and functions defined in the "kernel/context.ml" file. In this case, the connection is there, but it is not visible (between the function above and the "Context" module). ------------------------------------------------------------------------ Now consider, what happens when the reader see the same function presented in the following form: let test_strict_disjunction n lc = Array.for_all_i (fun i c -> match (prod_assum (snd (decompose_prod_n_assum n c))) with | [LocalAssum (_,c)] -> isRel c && Int.equal (destRel c) (n - i) | _ -> false) 0 lc If the reader haven't seen "LocalAssum" before, (s)he can use Merlin to jump to the corresponding definition and learn more. In this case, the connection is there, and it is directly visible (between the function above and the "Context" module). (2) Also, if we already have the concepts such as: - local declaration - local assumption - local definition and we describe these notions meticulously in the Reference Manual, then it is a real pity not to reinforce the connection of the actual code with the abstract description we published.
* Merge branch 'v8.5'Gravatar Pierre-Marie Pédrot2016-01-21
|\
| * Update copyright headers.Gravatar Maxime Dénès2016-01-20
| |
* | Remove some unused functions.Gravatar Guillaume Melquiond2016-01-02
| | | | | | | | | | Note: they do not even seem to have a debugging purpose, so better remove them before they bitrot.
* | Inlining the only use of Clenv.connect_clenv.Gravatar Pierre-Marie Pédrot2015-11-18
| |
* | Indexing Proofview.goals with a stage.Gravatar Pierre-Marie Pédrot2015-10-20
| | | | | | | | | | | | This is not perfect though, some primitives are unsound, and some higher-order API should use polymorphic functions so as not to depend on a given level.
* | Boxing the Goal.enter primitive into a record type.Gravatar Pierre-Marie Pédrot2015-10-20
| |
* | Merge branch 'v8.5'Gravatar Pierre-Marie Pédrot2015-10-19
|\|
| * Generalize fix for auto from PMP to eauto and typeclasses eauto.Gravatar Matthieu Sozeau2015-10-16
| |
* | Merge branch 'v8.5'Gravatar Pierre-Marie Pédrot2015-10-15
|\|
| * Exporting the original unprocessed hint in the hint running function.Gravatar Pierre-Marie Pédrot2015-10-14
| |
* | Merge branch 'v8.5'Gravatar Pierre-Marie Pédrot2015-10-06
|\|
| * Fix bug #4354: interpret hints in the right env and sigma.Gravatar Matthieu Sozeau2015-10-06
| |
* | Add an Iterative Deepening search strategy to typeclass resolution.Gravatar Matthieu Sozeau2015-07-27
| |
* | Merge branch 'v8.5' into trunkGravatar Maxime Dénès2015-07-02
|\|
| * class_tactics: make interruptibleGravatar Enrico Tassi2015-06-29
| | | | | | | | Tracing with gdb by Alec Faithfull
| * class_tactics: remove catch-all, use Errors.noncriticalGravatar Enrico Tassi2015-06-29
| |
* | Merge v8.5 into trunkGravatar Hugo Herbelin2015-05-15
|\| | | | | | | | | | | | | Conflicts: tactics/eauto.ml4 (merging eauto.ml4 and adapting coq_micromega.ml to new typing.ml API)
| * Safer typing primitives.Gravatar Pierre-Marie Pédrot2015-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some functions from pretyping/typing.ml and their derivatives were potential source of evarmap leaks, as they dropped their resulting evarmap. This commit clarifies the situation by renaming them according to a unsafe_* scheme. Their sound variant is likewise renamed to their old name. The following renamings were made. - Typing.type_of -> unsafe_type_of - Typing.e_type_of -> type_of - A new e_type_of function that matches the e_ prefix policy - Tacmach.pf_type_of -> pf_unsafe_type_of - A new safe pf_type_of function. All uses of unsafe_* functions should be eventually eliminated.