aboutsummaryrefslogtreecommitdiff
path: root/kernel
AgeCommit message (Collapse)Author
2015-01-06improve efficiency of the reduction interpreter of coqtopBruno Barras
Conflicts: kernel/closure.ml kernel/closure.mli kernel/reduction.ml
2015-01-06Rename ill-named "imports" field of safe_env into "required".Maxime Dénès
2015-01-05kernel/ind Change interface of declare_mind and declare_mutualMatthieu Sozeau
Removing unused argument and fixing bug #3899, now warning when a record cannot be made primitive in Set Primitive Projections mode because it has no projection or at least one undefinable projection.
2014-12-27universes_of_constant: do a proper set union of body and type univsEnrico Tassi
Before the union was performed as a UContext.t union, that concatenates the instances arrays, while one wants to avoid duplicates. We also assert that polymorphic constants have all constraints in the constant_body (field const_universes), since the extra body univs (stored in the opaque tables) are just for regular constants processed asynchronously.
2014-12-27Revert "Term: include a function to print terms"Enrico Tassi
Such printer is already in Termops This reverts commit 5d6106a075b79abbb92b03bbca7b13a517cf4925.
2014-12-26Term: include a function to print termsEnrico Tassi
I find it very odd not to have a pretty printer for terms than can be called from *everywhere*. This commit sticks in Term a long spaghetti to let Printer install a printing function.
2014-12-25Forbid Require inside interactive modules and module types.Maxime Dénès
Fixes #3379 and part of #3363. Also avoids fragile code propagating required libraries when closing an interactive module. Had to fix a few occurrences in std lib.
2014-12-21Dead code in Univ.Pierre-Marie Pédrot
2014-12-18Cleaning up universe list implementation in Univ.Pierre-Marie Pédrot
We use private types to ensure apriori hashconsing, and get rid of the use of recursive modules. The hash of the universe list is also inlined into each node instead of relying on a supplementary indirection.
2014-12-17Ensuring the good invariants of hashcons table generation in the API.Pierre-Marie Pédrot
2014-12-17Fix (actually, properly implement :) hashconsing of projections,Matthieu Sozeau
resulting in huge speedup at Qed/section closing in presence of primitive projections.
2014-12-16Getting rid of Exninfo hacks.Pierre-Marie Pédrot
Instead of modifying exceptions to wear additional information, we instead use a dedicated type now. All exception-using functions were modified to support this new type, in particular Future's fix_exn-s and the tactic monad. To solve the problem of enriching exceptions at raise time and recover this data in the try-with handler, we use a global datastructure recording the given piece of data imperatively that we retrieve in the try-with handler. We ensure that such instrumented try-with destroy the data so that there may not be confusion with another exception. To further harden the correction of this structure, we also check for pointer equality with the last raised exception. The global data structure is not thread-safe for now, which is incorrect as the STM uses threads and enriched exceptions. Yet, we splitted the patch in two parts, so that we do not introduce dependencies to the Thread library immediatly. This will allow to revert only the second patch if ever we switch to OCaml-coded lightweight threads.
2014-12-16Fix for #3154: use CUnix.sys_command to call native compiler.Maxime Dénès
Patch by CJ on bugzilla. CUnix.sys_command doesn't rely on a shell, so extra care with cmd.exe vs sh is no longer required.
2014-12-15Fix treatment of universe context in typecheck inductive (was addedMatthieu Sozeau
twice). Thanks to Marc Lasson for spotting this.
2014-12-14Fix merging of name maps in union of universe contexts.Matthieu Sozeau
2014-12-10Revert commit that inverted the preference for FFlex/FProj problems inMatthieu Sozeau
kernel reduction.
2014-12-09Switch the few remaining iso-latin-1 files to utf8Pierre Letouzey
2014-11-23Pass around information on the use of template polymorphism forMatthieu Sozeau
inductive types (i.e., ones declared with an explicit anonymous Type at the conclusion of their arity). With this change one can force inductives to live in higher universes even in the non-fully universe polymorphic case (e.g. bug #3821).
2014-11-23Fix #3824. de Bruijn error in normalization of fixpoints.Maxime Dénès
This bug was affecting the VM and the native compiler, but only in the pretyper (not the kernel). Types of arguments of fixpoints were incorrectly normalized due to a missing lift.
2014-11-21Fix bug #3804.Matthieu Sozeau
2014-11-20Exporting the function handling side-effects only applied to terms.Pierre-Marie Pédrot
2014-11-19Slightly improving error messages when mismatch with Proof using at Qed time.Hugo Herbelin
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-12Cleaner interfaces for linking locations of native compiler.Maxime Dénès
Stop sharing those references across constants of the same module, which was triggering some bugs when using native_compute in interactive mode in a functor declaration.
2014-11-10Fix #3282: VM confused by let bindings in fixpoints.Maxime Dénès
I'm afraid this fix is a bit heuristic, but it seems to generate correct code in all cases.
2014-11-10Better printing of dynlink errors in native compiler.Maxime Dénès
2014-10-27Fix some typos in comments.Guillaume Melquiond
2014-10-24Remove an ununsed pattern and commented code in the kernel.Matthieu Sozeau
Reestablish completeness in conversion when Opaque primitive projections are used.
2014-10-24Fix retroknowledge for int31 division.Maxime Dénès
Was broken accidentally by 5b0769b33, slowing down vm_compute and native_compute on numeric computations.
2014-10-24No hash consing across calls to the native compiler.Maxime Dénès
The induced side effects were incompatible with the undo machinery.
2014-10-22Pushing Pierre's factorization of names in goal context printing fromHugo Herbelin
coqide to coqtop. (Joint work with Pierre)
2014-10-20A patch for printing "match" when constructors are defined with let-inHugo Herbelin
but the internal representation dropped let-in. Ideally, the internal representation of the "match" should use contexts for the predicate and the branches. This would however be a rather significant change. In the meantime, just a hack. To do, there is still an extra @ in the constructor name that does not need to be there.
2014-10-14Revert "Move eta-expansion after delta reduction in kernel reduction. This ↵Matthieu Sozeau
makes" This makes CatsInZFC explode by expanding constants unnecessarily. This reverts commit cf36105854c9a42960ee4139c6afdaa75ec8f31a.
2014-10-13selective join/export of the safe_environmentEnrico Tassi
This generalizes the BuildVi flag and lets one choose which opaque proofs are done and which not.
2014-10-13STM: simplify how the term part of a side effect is retrievedEnrico Tassi
Now the seff contains it directly, no need to force the future or to hope that it is a Direct opaque proof.
2014-10-13library/opaqueTables: enable their use in interactive modeEnrico Tassi
Before this patch opaque tables were only growing, making them unusable in interactive mode (leak on Undo). With this patch the opaque tables are functional and part of the env. I.e. a constant_body can point to the proof term in 2 ways: 1) directly (before the constant is discharged) 2) indirectly, via an int, that is mapped by the opaque table to the proof term. This is now consistent in batch/interactive mode This is step 0 to make an interactive coqtop able to dump a .vo/.vi
2014-10-11Revert d0cd27e209be08ee51a2d609157367f053438a10: giving a different nameMatthieu Sozeau
for the record binder of classes. This name is no longer generated in the kernel but part of the declaration. Also cleanup the interface to recognize primitive records based on an option type instead of a dynamic check of the length of an array.
2014-10-10Fix segfault in native compiler on int31 division.Maxime Dénès
Thanks to Yves for reporting it!
2014-10-02Implement module subtyping for polymorphic constants (errors onMatthieu Sozeau
inductives). The implementation constant should have the a universe instance of the same length, we assume the universes are in the same order and we check that the definition does not add any constraints to the expected ones. This fixes bug #3670.
2014-10-02Move eta-expansion after delta reduction in kernel reduction. This makesMatthieu Sozeau
it closer to evarconv/unification's behavior and it is less prone to weird failures and successes in case of first-order unification sending problems where the two terms have different types.
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-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-24Make the retroknowledge marshalable.Arnaud Spiwack
Essential for parallel processing of Coq documents. It is a fairly straightforward change but a tad tedious, I may have introduced some bugs in the process.
2014-09-18Clean a bit of univ.ml, add credits.Matthieu Sozeau
2014-09-13Providing a -type-in-type option for collapsing the universe hierarchy.Hugo Herbelin
2014-09-10Fix generation of inductive elimination principle for primitive records.Matthieu Sozeau
Let r.(p) be a strict subterm of r during the guardness check.
2014-09-06Fix checker to handle projections with eta and universe polymorphism correctly.Matthieu Sozeau
2014-09-05Fix checker treatment of inductives using subst_instances instead of ↵Matthieu Sozeau
subst_univs_levels.
2014-09-05Rename eta_expand_ind_stacks, fix the one from the checker and adaptMatthieu Sozeau
it to the new representation of projections and the new mind_finite type.
2014-09-05Fix primitive projections declarations for inductive records.Matthieu Sozeau