aboutsummaryrefslogtreecommitdiff
path: root/pretyping/reductionops.ml
AgeCommit message (Collapse)Author
2015-12-17CLEANUP: in the Reduction moduleMatej Kosik
2015-12-17CLEANUP: in the Reductionops moduleMatej Kosik
2015-12-17CLEANUP: in the Reduction moduleMatej Kosik
2015-11-26More efficient implementation of equality-up-to-universes in Universes.Pierre-Marie Pédrot
Instead of accumulating constraints which are not present in the original graph, we parametrize the equality function by a function actually merging those constraints in the current graph. This prevents doing the work twice.
2015-11-22Fixing kernel bug in typing match with let-ins in the arity.Hugo Herbelin
Was exploitable in 8.3, 8.4 and 8.5beta1. A priori not exploitable in 8.5beta2 and 8.5beta3 from a Coq file because typing done while compiling "match" would serve as a protection. However exploitable by calling the kernel directly, e.g. from a plugin (but a plugin can anyway do what it wants by bypassing kernel type abstraction). Fixing similar error in pretyping.
2015-11-09Pushing the backtrace in conversion anomalies.Pierre-Marie Pédrot
2015-10-28Conversion of polymorphic inductive types was incomplete in VM and native.Maxime Dénès
Was showing up when comparing e.g. prod Type Type with prod Type Type (!) with a polymorphic prod.
2015-10-15Avoid dependency of the pretyper on C code.Maxime Dénès
Using the same hack as in the kernel: VM conversion is a reference to a function, updated when modules using C code are actually linked. This hack should one day go away, but always linking C code may produce some other trouble (with the OCaml debugger for instance), so better be safe for now.
2015-10-15 Fix #4346 2/2: VM casts were not inferring universe constraints.Maxime Dénès
2015-10-15Fix #4346 1/2: native casts were not inferring universe constraints.Maxime Dénès
2015-08-02Reverting 16 last commits, committed mistakenly using the wrong push command.Hugo Herbelin
Sorry so much. Reverted: 707bfd5719b76d131152a258d49740165fbafe03. 164637cc3a4e8895ed4ec420e300bd692d3e7812. b9c96c601a8366b75ee8b76d3184ee57379e2620. 21e41af41b52914469885f40155702f325d5c786. 7532f3243ba585f21a8f594d3dc788e38dfa2cb8. 27fb880ab6924ec20ce44aeaeb8d89592c1b91cd. fe340267b0c2082b3af8bc965f7bc0e86d1c3c2c. d9b13d0a74bc0c6dff4bfc61e61a3d7984a0a962. 6737055d165c91904fc04534bee6b9c05c0235b1. 342fed039e53f00ff8758513149f8d41fa3a2e99. 21525bae8801d98ff2f1b52217d7603505ada2d2. b78d86d50727af61e0c4417cf2ef12cbfc73239d. 979de570714d340aaab7a6e99e08d46aa616e7da. f556da10a117396c2c796f6915321b67849f65cd. d8226295e6237a43de33475f798c3c8ac6ac4866. fdab811e58094accc02875c1f83e6476f4598d26.
2015-08-02Hopefully clearer printing of stack when debugging evarconv unification.Hugo Herbelin
2015-06-28Fix incompleteness of conversion used by evarconvMatthieu Sozeau
In case we need to backtrack on universe inconsistencies when converting two (incompatible) instances of the same constant and unfold them. Bug reported by Amin Timany.
2015-03-04Fix bug #3532, providing universe inconsistency information when aMatthieu Sozeau
unification fails due to that, during a conversion step.
2015-03-03Fix bug #4103: forgot to allow unfolding projections of cofixpoints likeMatthieu Sozeau
cases, in some cases.
2015-02-27simpl: honor Global for "simpl: never" (Close: 3206)Enrico Tassi
It was an integer overflow! All sorts of memories.
2015-02-27Add support so that the type of a match in an inductive type with let-inHugo Herbelin
is reduced as if without let-in, when applied to arguments. This allows e.g. to have a head-betazeta-reduced goal in the following example. Inductive Foo : let X := Set in X := I : Foo. Definition foo (x : Foo) : x = x. destruct x. (* or case x, etc. *)
2015-02-21Fixing bug #3071.Pierre-Marie Pédrot
2015-02-15Fix 'don't expose cases' in cbnPierre Boutillier
2015-01-17Univs: proper printing of global and local universe names (onlyMatthieu Sozeau
printing functions touched in the kernel).
2015-01-12Update headers.Maxime Dénès
2014-11-19Option -type-in-type continued (deactivate test for inferred sort ofHugo Herbelin
inductive types + deactivate test for equality of sort + deactivate the check that the constraints Prop/Set <= Type are declared).
2014-11-10Evar normalization is now done eagerly.Pierre-Marie Pédrot
As witnessed in the ProjectiveGeometry contrib, some evar normalization were taking ages because of an exponential behaviour due to a call-by-name substitution: when normalizing an evar, its arguments were substituted right away and the resulting term was then normalized, leading to a potential duplication of normalizations. Now we normalize evar arguments before substituting them, in a call-by-value fashion. It makes examples from ProjectiveGeometry compile instanteanously when they were killing the machine due to excessive memory allocation before the patch. Note that there is a tension here: we may be normalizing evar arguments too eagerly, and try a call-by-need approach instead. To choose which particular strategy we use, we should do some benchmarks... On stdlib, call-by-value and call-by-need seem indistinguishable. To be continued?
2014-10-15Implement a different strategy to expand primitive projections only whenMatthieu Sozeau
required, i.e. in first-order unification cases where the head of the other side is a hole or the eta-expanded constant.
2014-10-12Tentative fix for a badly used Option.get in Reductionops.Pierre-Marie Pédrot
2014-10-02Work around issues with FO unification trying to unify terms ofMatthieu Sozeau
potentially different types, resulting in ill-typed terms due to eta. Projection expansion now fails gracefully on retyping errors. The proper fix to unification, checking that the heads for FO have unifiable types, is currently too strong, adding unnecessary universe constraints, so it is disabled for now. It might be quite expensive too also it's not noticeable on the stdlib.
2014-10-02Fix treatment of projections in Cst_stacks and unfolding behavior in evarconv.Matthieu Sozeau
2014-10-01Fix cbn behavior wrt simpl no matchPierre Boutillier
2014-10-01Fix the refolding by cbn of mutal constants defined in not included modulesPierre Boutillier
2014-09-30Simplify evarconv thanks to new delta status of projections,Matthieu Sozeau
using whd_state_gen to handle unfolding. Add an isProj/destProj in term. Use the proper environment everywhere in unification.ml.
2014-09-29In evarconv and unification, expand folded primitive projections toMatthieu Sozeau
their eta-expanded forms which can then unfold back to the unfolded primitive projection form. This removes all special code that was necessary to handle primitive projections before, while keeping compatibility. Also fix cbn which was not refolding primitive projections correctly in all cases. Update some test-suite files accordingly.
2014-09-27Fix bug #3664 by refolding projections that don't reduce in cbn.Matthieu Sozeau
2014-09-27Add a boolean to indicate the unfolding state of a primitive projection,Matthieu Sozeau
so as to reproduce correctly the reduction behavior of existing projections, i.e. delta + iota. Make [projection] an abstract datatype in Names.ml, most of the patch is about using that abstraction. Fix unification.ml which tried canonical projections too early in presence of primitive projections.
2014-09-18Reductionops: (Co)Fixpoints are always refolded during iotaPierre Boutillier
2014-09-13Providing a -type-in-type option for collapsing the universe hierarchy.Hugo Herbelin
2014-09-06Cleanup code for looking up projection bodies.Matthieu Sozeau
2014-08-26Debug RAKAMPierre Boutillier
2014-08-25Grammar: "avoiding to" isn't proper, eitherJason Gross
2014-08-10Fix bug introduced by earlier commit on first-order unification of primitiveMatthieu Sozeau
projections and their expansion, allowing unfolding when it fails. Cleanup code in reductionops.ml
2014-08-03- Fix handling of opaque polymorphic definitions which were turned transparent.Matthieu Sozeau
- Decomment code in reductionops forgotten after debugging.
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-07-29Rework code for refolding projections in whd_state/whd_simpl to allow ArgumentsMatthieu Sozeau
Specifications indicating that the record object must be a constructor. Fixes bug #3432.
2014-07-10Reduce non-toplevel letins in splay_prod_assum (bug found in Ergo).Matthieu Sozeau
2014-06-17Removing dead code.Pierre-Marie Pédrot
2014-06-13Adapt simpl/cbn unfolding and refolding machinery to projections, so thatMatthieu Sozeau
primitive projections obey the Arguments command.
2014-06-11- Fix bug #3368, due to wrong use of the Cst_stack for projections.Matthieu Sozeau
- Monomorphize Cst_stack to 'a = constr. - Add corresponding debug printer.
2014-06-10Cleanup in Univ, moving code for UniverseConstraints outside the kernel in ↵Matthieu Sozeau
Universes. Needed to exponse compare_head_gen(_leq) so that it could be reused in Universes. Remove unused functions from univ as well and refactor a little bit. Changed the syntax to Type@{} for explicit universe level specs, following the WG decision.
2014-06-06Make kernel reduction code parametric over the handling of universes,Matthieu Sozeau
allowing fast conversion to be used during unification while respecting the semantics of unification w.r.t universes. - Inside kernel, checked_conv is used mainly, it just does checking, while infer_conv is used for module subtyping. - Outside, infer_conv is wrapped in Reductionops to register the right constraints in an evarmap. - In univ, add a flag to universes to cache the fact that they are >= Set, the most common constraints, resulting in an 4x speedup in some cases (e.g. HigmanS).
2014-06-04Collecting in Namegen those conventional default names that are used in ↵Hugo Herbelin
different places
2014-06-04- Keep all <= constraints during refinement, otherwise we might miss ↵Matthieu Sozeau
collapsed universes. - Fix normalization with universe substitutions during refinement being inconsistent with the one in the kernel.