aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/reductionops.ml
Commit message (Collapse)AuthorAge
* Avoid infinite loop/stack overflow when using "simpl nomatch" (bug #4576).Gravatar Guillaume Melquiond2016-05-02
| | | | | | | | | | | | | | When encountering a "simpl nomatch" constant, the reduction machinery tries to unfold it. If the subsequent partial reduction does not produce any match construct, it keeps going from the reduced term. Unfortunately, the reduced term has been refolded in the meantime, which means that some of the previous reduction steps have been canceled, thus causing an infinite loop. This patch delays the refolding till the very end, so that reduction always progresses. Disclaimer: I have no idea what I am doing here. The patch compiles the standard library and the test suite properly, so hopefully they contain enough tests to exercise the reduction machinery.
* Update copyright headers.Gravatar Maxime Dénès2016-01-20
|
* Fixing kernel bug in typing match with let-ins in the arity.Gravatar Hugo Herbelin2015-11-22
| | | | | | | | | | 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.
* Pushing the backtrace in conversion anomalies.Gravatar Pierre-Marie Pédrot2015-11-09
|
* Conversion of polymorphic inductive types was incomplete in VM and native.Gravatar Maxime Dénès2015-10-28
| | | | | Was showing up when comparing e.g. prod Type Type with prod Type Type (!) with a polymorphic prod.
* Avoid dependency of the pretyper on C code.Gravatar Maxime Dénès2015-10-15
| | | | | | | | | 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.
* Fix #4346 2/2: VM casts were not inferring universe constraints.Gravatar Maxime Dénès2015-10-15
|
* Fix #4346 1/2: native casts were not inferring universe constraints.Gravatar Maxime Dénès2015-10-15
|
* Reverting 16 last commits, committed mistakenly using the wrong push command.Gravatar Hugo Herbelin2015-08-02
| | | | | | | | | | | | | | | | | | | | | | Sorry so much. Reverted: 707bfd5719b76d131152a258d49740165fbafe03. 164637cc3a4e8895ed4ec420e300bd692d3e7812. b9c96c601a8366b75ee8b76d3184ee57379e2620. 21e41af41b52914469885f40155702f325d5c786. 7532f3243ba585f21a8f594d3dc788e38dfa2cb8. 27fb880ab6924ec20ce44aeaeb8d89592c1b91cd. fe340267b0c2082b3af8bc965f7bc0e86d1c3c2c. d9b13d0a74bc0c6dff4bfc61e61a3d7984a0a962. 6737055d165c91904fc04534bee6b9c05c0235b1. 342fed039e53f00ff8758513149f8d41fa3a2e99. 21525bae8801d98ff2f1b52217d7603505ada2d2. b78d86d50727af61e0c4417cf2ef12cbfc73239d. 979de570714d340aaab7a6e99e08d46aa616e7da. f556da10a117396c2c796f6915321b67849f65cd. d8226295e6237a43de33475f798c3c8ac6ac4866. fdab811e58094accc02875c1f83e6476f4598d26.
* Hopefully clearer printing of stack when debugging evarconv unification.Gravatar Hugo Herbelin2015-08-02
|
* Fix incompleteness of conversion used by evarconvGravatar Matthieu Sozeau2015-06-28
| | | | | | 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.
* Fix bug #3532, providing universe inconsistency information when aGravatar Matthieu Sozeau2015-03-04
| | | | unification fails due to that, during a conversion step.
* Fix bug #4103: forgot to allow unfolding projections of cofixpoints likeGravatar Matthieu Sozeau2015-03-03
| | | | cases, in some cases.
* simpl: honor Global for "simpl: never" (Close: 3206)Gravatar Enrico Tassi2015-02-27
| | | | It was an integer overflow! All sorts of memories.
* Add support so that the type of a match in an inductive type with let-inGravatar Hugo Herbelin2015-02-27
| | | | | | | | | 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. *)
* Fixing bug #3071.Gravatar Pierre-Marie Pédrot2015-02-21
|
* Fix 'don't expose cases' in cbnGravatar Pierre Boutillier2015-02-15
|
* Univs: proper printing of global and local universe names (onlyGravatar Matthieu Sozeau2015-01-17
| | | | printing functions touched in the kernel).
* Update headers.Gravatar Maxime Dénès2015-01-12
|
* Option -type-in-type continued (deactivate test for inferred sort ofGravatar Hugo Herbelin2014-11-19
| | | | | inductive types + deactivate test for equality of sort + deactivate the check that the constraints Prop/Set <= Type are declared).
* Evar normalization is now done eagerly.Gravatar Pierre-Marie Pédrot2014-11-10
| | | | | | | | | | | | | | | | | | 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?
* Implement a different strategy to expand primitive projections only whenGravatar Matthieu Sozeau2014-10-15
| | | | | required, i.e. in first-order unification cases where the head of the other side is a hole or the eta-expanded constant.
* Tentative fix for a badly used Option.get in Reductionops.Gravatar Pierre-Marie Pédrot2014-10-12
|
* Work around issues with FO unification trying to unify terms ofGravatar Matthieu Sozeau2014-10-02
| | | | | | | | | 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.
* Fix treatment of projections in Cst_stacks and unfolding behavior in evarconv.Gravatar Matthieu Sozeau2014-10-02
|
* Fix cbn behavior wrt simpl no matchGravatar Pierre Boutillier2014-10-01
|
* Fix the refolding by cbn of mutal constants defined in not included modulesGravatar Pierre Boutillier2014-10-01
|
* Simplify evarconv thanks to new delta status of projections,Gravatar Matthieu Sozeau2014-09-30
| | | | | using whd_state_gen to handle unfolding. Add an isProj/destProj in term. Use the proper environment everywhere in unification.ml.
* In evarconv and unification, expand folded primitive projections toGravatar Matthieu Sozeau2014-09-29
| | | | | | | | | | 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.
* Fix bug #3664 by refolding projections that don't reduce in cbn.Gravatar Matthieu Sozeau2014-09-27
|
* Add a boolean to indicate the unfolding state of a primitive projection,Gravatar Matthieu Sozeau2014-09-27
| | | | | | | | 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.
* Reductionops: (Co)Fixpoints are always refolded during iotaGravatar Pierre Boutillier2014-09-18
|
* Providing a -type-in-type option for collapsing the universe hierarchy.Gravatar Hugo Herbelin2014-09-13
|
* Cleanup code for looking up projection bodies.Gravatar Matthieu Sozeau2014-09-06
|
* Debug RAKAMGravatar Pierre Boutillier2014-08-26
|
* Grammar: "avoiding to" isn't proper, eitherGravatar Jason Gross2014-08-25
|
* Fix bug introduced by earlier commit on first-order unification of primitiveGravatar Matthieu Sozeau2014-08-10
| | | | | projections and their expansion, allowing unfolding when it fails. Cleanup code in reductionops.ml
* - Fix handling of opaque polymorphic definitions which were turned transparent.Gravatar Matthieu Sozeau2014-08-03
| | | | - Decomment code in reductionops forgotten after debugging.
* Move to a representation of universe polymorphic constants using indices for ↵Gravatar Matthieu Sozeau2014-08-03
| | | | | | | 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.
* Rework code for refolding projections in whd_state/whd_simpl to allow ArgumentsGravatar Matthieu Sozeau2014-07-29
| | | | Specifications indicating that the record object must be a constructor. Fixes bug #3432.
* Reduce non-toplevel letins in splay_prod_assum (bug found in Ergo).Gravatar Matthieu Sozeau2014-07-10
|
* Removing dead code.Gravatar Pierre-Marie Pédrot2014-06-17
|
* Adapt simpl/cbn unfolding and refolding machinery to projections, so thatGravatar Matthieu Sozeau2014-06-13
| | | | primitive projections obey the Arguments command.
* - Fix bug #3368, due to wrong use of the Cst_stack for projections.Gravatar Matthieu Sozeau2014-06-11
| | | | | - Monomorphize Cst_stack to 'a = constr. - Add corresponding debug printer.
* Cleanup in Univ, moving code for UniverseConstraints outside the kernel in ↵Gravatar Matthieu Sozeau2014-06-10
| | | | | | | | 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.
* Make kernel reduction code parametric over the handling of universes,Gravatar Matthieu Sozeau2014-06-06
| | | | | | | | | | | 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).
* Collecting in Namegen those conventional default names that are used in ↵Gravatar Hugo Herbelin2014-06-04
| | | | different places
* - Keep all <= constraints during refinement, otherwise we might miss ↵Gravatar Matthieu Sozeau2014-06-04
| | | | | | | collapsed universes. - Fix normalization with universe substitutions during refinement being inconsistent with the one in the kernel.
* cbn understand ! Arguments directiveGravatar Pierre Boutillier2014-06-04
| | | | | Of course, this is an under approximation of the expected behavior : unfolding a constant iff a leaf of its underlying split-tree is reached.
* Cbn reduces Pos.compare p~1 q~1 to Pos.compare p qGravatar Pierre Boutillier2014-05-26
| | | | (refolding of cbn is smarter)