aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/evarconv.ml
Commit message (Collapse)AuthorAge
* Merge PR#512: [cleanup] Unify all calls to the error function.Gravatar Maxime Dénès2017-05-29
|\
| * [cleanup] Unify all calls to the error function.Gravatar Emilio Jesus Gallego Arias2017-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the continuation of #244, we now deprecate `CErrors.error`, the single entry point in Coq is `user_err`. The rationale is to allow for easier grepping, and to ease a future cleanup of error messages. In particular, we would like to systematically classify all error messages raised by Coq and be sure they are properly documented. We restore the two functions removed in #244 to improve compatibility, but mark them deprecated.
* | [coqlib] Move `Coqlib` to `library/`.Gravatar Emilio Jesus Gallego Arias2017-05-27
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We move Coqlib to library in preparation for the late binding of Gallina-level references. Placing `Coqlib` in `library/` is convenient as some components such as pretyping need to depend on it. By moving we lose the ability to locate references by syntactic abbreviations, but IMHO it makes to require ML code to refer to a true constant instead of an abbreviation/notation. Unfortunately this change means that we break the `Coqlib` API (providing a compatibility function is not possible), however we do so for a good reason. The main changes are: - move `Coqlib` to `library/`. - remove reference -> term from `Coqlib`. In particular, clients will have different needs with regards to universes/evar_maps, so we force them to call the (not very safe) `Universes.constr_of_global` explicitly so the users are marked. - move late binding of impossible case from `Termops` to `pretying/Evarconv`. Remove hook. - `Coqlib.find_reference` doesn't support syntactic abbreviations anymore. - remove duplication of `Coqlib` code in `Program`. - remove duplication of `Coqlib` code in `Ltac.Rewrite`. - A special note about bug 5066 and commit 6e87877 . This case illustrates the danger of duplication in the code base; the solution chosen there was to transform the not-found anomaly into an error message, however the general policy was far from clear. The long term solution is indeed make `find_reference` emit `Not_found` and let the client handle the error maybe non-fatally. (so they can test for constants.
* Merge PR#481: [option] Remove support for non-synchronous options.Gravatar Maxime Dénès2017-05-25
|\
* \ Merge branch 'trunk' into located_switchGravatar Emilio Jesus Gallego Arias2017-05-24
|\ \
| | * [option] Remove support for non-synchronous options.Gravatar Emilio Jesus Gallego Arias2017-05-24
| |/ | | | | | | | | | | | | | | | | | | | | | | Inspired by https://coq.inria.fr/bugs/show_bug.cgi?id=5229 , which this PR solves, I propose to remove support for non-synchronous options. It seems the few uses of `optsync = false` we legacy and shouldn't have any impact. Moreover, non synchronous options may create particularly tricky situations as for instance, they won't be propagated to workers.
| * Remove unused [open] statementsGravatar Gaetan Gilbert2017-04-27
| |
* | [location] Make location optional in Loc.locatedGravatar Emilio Jesus Gallego Arias2017-04-25
| | | | | | | | | | | | | | | | | | | | | | | | This completes the Loc.ghost removal, the idea is to gear the API towards optional, but uniform, location handling. We don't print <unknown> anymore in the case there is no location. This is what the test suite expects. The old printing logic for located items was a bit inconsistent as it sometimes printed <unknown> and other times it printed nothing as the caller checked for `is_ghost` upstream.
* | [location] Remove Loc.ghost.Gravatar Emilio Jesus Gallego Arias2017-04-25
|/ | | | Now it is a private field, locations are optional.
* Merge branch 'master' into econstrGravatar Pierre-Marie Pédrot2017-04-07
|\
* | Removing a normalization hotspot from EConstr.Gravatar Pierre-Marie Pédrot2017-04-05
| | | | | | | | | | It was not necessary to normalize a term just to check whether it was a global reference. The hotspot appeared in mathcomp.
* | Using delayed universe instances in EConstr.Gravatar Pierre-Marie Pédrot2017-04-01
| | | | | | | | | | | | The transition has been done a bit brutally. I think we can still save a lot of useless normalizations here and there by providing the right API in EConstr. Nonetheless, this is a first step.
* | Actually exporting delayed universes in the EConstr implementation.Gravatar Pierre-Marie Pédrot2017-04-01
| | | | | | | | | | For now we only normalize sorts, and we leave instances for the next commit.
* | Merge branch 'trunk' into pr379Gravatar Maxime Dénès2017-03-24
|\ \
| | * Better algorithm for Evarconv.max_undefined_with_candidates.Gravatar Pierre-Marie Pédrot2017-03-24
| |/ | | | | | | | | Instead of crawling the whole undefined evar map, we use the fold_right function to process evars in decreasing order.
* | Merge branch 'master'.Gravatar Pierre-Marie Pédrot2017-02-14
|\ \
* | | Chasing a few unsafe constr coercions.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Definining EConstr-based contexts.Gravatar Pierre-Marie Pédrot2017-02-14
| | | | | | | | | | | | | | | | | | This removes quite a few unsafe casts. Unluckily, I had to reintroduce the old non-module based names for these data structures, because I could not reproduce easily the same hierarchy in EConstr.
* | | Evar-normalizing functions now act on EConstrs.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Removing compatibility layers related to printing.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Removing compatibility layers in RetypingGravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Removing some return type compatibility layers in Termops.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Eliminating parts of the right-hand side compatibility layerGravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Tactics API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Clenv API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Cleaning up opening of the EConstr module in pretyping folder.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Making judgment type generic over the type of inner constrs.Gravatar Pierre-Marie Pédrot2017-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to factorize code and prevents the unnecessary use of back and forth conversions between the various types of terms. Note that functions from typing may now raise errors as PretypeError rather than TypeError, because they call the proper wrapper. I think that they were wrongly calling the kernel because of an overlook of open modules.
* | | Unification API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Pretyping API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Tacred API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Evarconv API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Evarsolve API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Evardefine API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Retyping API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Reductionops API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
* | | Termops API using EConstr.Gravatar Pierre-Marie Pédrot2017-02-14
| | |
| | * Improve unification debug trace.Gravatar Théo Zimmermann2016-12-13
| |/ | | | | | | | | - Add a debug message when applying a heuristic. - Fix double newlines.
| * Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-11-18
|/|
| * Merge commit 'e6edb33' into v8.6Gravatar Maxime Dénès2016-11-07
| |\ | | | | | | | | | Was PR#331: Solve_constraints and Set Use Unification Heuristics
* | | Stronger static invariant in equality upto universes.Gravatar Pierre-Marie Pédrot2016-10-31
| | | | | | | | | | | | | | | We return an option type, as constraints were always dropped if the boolean was false. They did not make much sense anyway.
* | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-10-29
|\| |
| * | Merge branch 'v8.5' into v8.6Gravatar Pierre-Marie Pédrot2016-10-26
| |\ \
| | | * Renamings to avoid confusion deprecating old namesGravatar Matthieu Sozeau2016-10-22
| | |/ | |/| | | | | | | | | | reconsider_conv_pbs -> reconsider_unif_constraints consider_remaining_unif_problems -> solve_unif_constraints_with_heuristics
| | * Fix a bug in error printing of unif constraintsGravatar Matthieu Sozeau2016-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conversion problems are in a de Bruijn environment that may include references to unbound rels (because of the way evars are created), we patch the env to named all de Bruijn variables so that error printing does not raise an anomaly. Also fix a minor printing bug in unsatisfiable constraints error reporting. HoTT_coq_117.v tests all of this.
* | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-10-18
|\| |
| * | Merge branch 'v8.5' into v8.6Gravatar Pierre-Marie Pédrot2016-10-18
| |\|
| * | Quick fix to unification regression #4955.Gravatar Hugo Herbelin2016-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit which caused the regression (5ea2539d4a) looks reasonable. However, it happens that this commit made that unification started in the #4955 example to follow a path with problems of the form "proj ?x == ?x" which clearly are unsolvable (both ?x have the same instance). We hack the corresponding very permissive occur-check function so that it is a bit less permissive. One day, this occur-check function would have to be rewritten in a more stricter way. ---------------------------------------------------------------------- Extra comments: I could list several functions for occur check of evars. Four of them are too strict in the sense that they do not take into account occurrences of evars which may disappear by reduction, nor evars which have instances made in such a way that the occur-check is solvable (as in "fst ?x[y:=(0,0)] = ?x[y:=0]"). These are: - Termops.occur_evar for clenv, evar_refiner, tactic unification - syntactic check without any normalization, even on defined evars - Evarutil.occur_evar_upto for refine and the V82 compatibility mode - syntactic check without any normalization but inlining of defined evars - Evarsolve.occur_evar_upto_types for evar_define - syntactic check without any normalization but inlining of defined evars - occur-check in the type of evars met - optimization for not visiting several time the same evar - Evarsolve.noccur_evar for pattern unification and for inversion of substitution (evar/evar or evar/term problems) - syntactic check without any normalization but inlining of defined evars - occur-check in the type of evars met in arguments of projections - occur-check in the type of variables met in arguments of projections - optimization for not visiting several time the same evar - optimization for not visiting several time the type of the same variable - note: to go this way, it seems to me that it should check also in all types which are a cut-formula in the expression One is much too lax: - Evarconv.occur_rigidly - no recursive check except on the types of "forall" and sometimes in the arguments of an application - note: there is obviously a large room for refinements without loosing solutions
| | * Fixing a missing constraint in consider_remaining_unif_constraints.Gravatar Hugo Herbelin2016-10-17
| | |
* | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-10-08
|\| |
| * | Merge branch 'v8.5' into v8.6Gravatar Pierre-Marie Pédrot2016-10-08
| |\|