aboutsummaryrefslogtreecommitdiff
path: root/kernel
AgeCommit message (Collapse)Author
2014-06-10Fixing Sorting Universes in a world where le and lt constraints may bePierre-Marie Pédrot
redundant in canonical arcs.
2014-06-10Compute the trace of a universe inconsistency only when explicitly requiredPierre-Marie Pédrot
by the printing options (i.e. when "Print Universes" is set).
2014-06-10Made explanations for universe inconsistencies optional. They are only usedPierre-Marie Pédrot
by the printer anyway.
2014-06-10Specialize the type of [Univ.compare_neq] so that it is clear it is only usedPierre-Marie Pédrot
to recover the trace of a universe inconsistency. Changed its name too btw.
2014-06-10Imperatively check touched universes in compare_neq functions. This ensuresPierre-Marie Pédrot
a O(1) check, contrasting with the previous O(n) behaviour that rendered universe constraint checking prohibitive on big files. I expect a 20% speedup on such files.
2014-06-10- Fix substitution of universes which needlessly hashconsed existing universes.Matthieu Sozeau
- More cleanup. remove unneeded functions in universes
2014-06-10Oops, one refactoring was not compiled.Matthieu Sozeau
2014-06-10More cleanup/reorganizing of univ.ml to separate constraint/universe ↵Matthieu Sozeau
handling from the instance/contexts and substitution code.
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-10Remove unused function in univMatthieu Sozeau
2014-06-09Flattening Level module structure in Univ.Pierre-Marie Pédrot
2014-06-08ind_tables: always declare side effects (Closes: HOTT#110)Enrico Tassi
declare takes care of ignoring side effects that are available in the global environment. This is yet another instance of what the "abominion" (aka abstract) can do: the code was checking for the existence in the environment of the elimination principle, and not regenerating it (nor declaring the corresponding side effect) if the elimination principle is used twice. Of course to functionalize the imperative actions on the environment when two proofs generated by abstract use the same elim principle, such elim principle has to be inlined twice, once in each abstracted proof. In other words, a side effect generated by a tactic inside an abstract is *global* but will be made local, si it must always be declared, no matter what. Now the system works like this: - side effects are always declared, even if a caching mechanism thinks the constant is already there (it can be there, no need to regenerate it but the intent to generate it *must* be declared anyhow) - at Qed time, we filter the list of side effects and decide which ones are really needed to be inlined. bottom line: STOP using abstract.
2014-06-08Function in Univ uselessly exported.Pierre-Marie Pédrot
2014-06-07Moving a Thread.yield in check_interrupt.Pierre-Marie Pédrot
2014-06-07Adding a new Control file centralizing the control options of Coq.Pierre-Marie Pédrot
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-05Dedicated map module for type universes. It uses hashmaps, which arePierre-Marie Pédrot
slightly more efficient than plain balanced maps.
2014-06-05Removing dead code from Univ.Pierre-Marie Pédrot
2014-06-04- Force every universe level to be >= Prop, so one cannot "go under" it anymore.Matthieu Sozeau
- Finish the change to level-to-level substitutions, in the checker.
2014-06-04- Fix hashing of levels to get the "right" order in universe contexts etc...Matthieu Sozeau
- Add a tentative syntax for specifying universes: Type{"i"} and foo@{Type{"i"},Type{"j"}}. These are always rigid. - Use level-to-level substitutions where the more general level-to-universe substitutions were previously used.
2014-06-02Fixing incorrect printf format.Pierre-Marie Pédrot
2014-05-28- Fix for commit 15999903f875f4b5dbb3d5240d2ca39acc3cd777 which disallowed someMatthieu Sozeau
cases of Type (* Prop *) <= Set. - Do check types of metavariables at the end of apply's unification, if it failed at the beginning (otherwise universe constraints can be incomplete).
2014-05-26- Fix in kernel conversion not folding the universe constraintsMatthieu Sozeau
correctly when comparing stacks. - Disallow Type i <= Prop/Set constraints, that would otherwise allow constraints that make a universe lower than Prop. - Fix stm/lemmas that was pushing constraints to the global context, it is done depending on the constant/variable polymorphic status now. - Adapt generalized rewriting in Type code to these fixes.
2014-05-26Update infer_conv to record trivial Prop <= Type i constraints that are ↵Matthieu Sozeau
needed during unification.
2014-05-22Fix native_compute for systems with a limited size for the command line.Guillaume Melquiond
The call to the native compiler can fail due to the sheer amounts of -I options passed to it. Indeed, it is easy to get the command line to exceed 512KB, thus causing various operating systems to reject it. This commit avoids the issue by only passing the -I options that matter for the currently compiled code. Note that, in the worst case, this commit is still not sufficient on Windows (32KB max), but this worst case should be rather uncommon and thus can be ignored for now. For the record, the command-line size mandated by Posix is 4KB.
2014-05-16Revert "Decent error message when a constant is not found"Enrico Tassi
This reverts commit c4bdf93e358b97b32e0d80d6c7d1b79a2ece1dc2.
2014-05-16Decent error message when a constant is not foundEnrico Tassi
2014-05-16Another try at close_proof that should behave better w.r.t. exception handling.Matthieu Sozeau
2014-05-13Rewritten the sorting algorithm for universes with a better complexity.Pierre-Marie Pédrot
This should be now linear instead of the cubic Bellman-Ford algorithm. The new algorithm assumes that the universe graph is a DAG if we remove the {Le, Eq}-cycles, which is the case when the graph is consistent. Luckily we only use the sorting algorithm on such consistent graphs, in the Print Sorted Universes command.
2014-05-11Using Maps to handle imports in Safe_typing. The order is irrelevant indeed,Pierre-Marie Pédrot
and the lookup operation proved to be costly when dealing with big libraries.
2014-05-09Reuse universe level substitutions for template polymorphism, fixing performanceMatthieu Sozeau
problem with hashconsing at the same time. This fixes bug# 3302.
2014-05-08Avoid allocations in type_of_inductiveMatthieu Sozeau
2014-05-08Fast-path equality of sorts in compare_constr*Matthieu Sozeau
2014-05-06Add missing case for primitive projection in fold_map.Matthieu Sozeau
2014-05-06Fix extraction taking a type in the wrong environment.Matthieu Sozeau
Fix restriction of universe contexts to not forget about potentially useful constraints.
2014-05-06Find a more efficient fix for dealing with template universes:Matthieu Sozeau
eagerly solve l <= k constraints as k := l when k is a fresh variable coming from a template type. This has the effect of fixing the variable at the first instantiation of the parameters of template polymorphic inductive and avoiding to generate useless <= constraints that need to be minimized afterwards.
2014-05-06Add doc on the new API for universe polymorphism and primitive projectionsMatthieu Sozeau
2014-05-06- Fix eq_constr_universes restricted to Sorts.equalMatthieu Sozeau
- Fix passing of universe contexts through definitions/proofs, abstract is ok now, even in presence of polymorphism - Correctly mark unresolvable the evars made by the Simple abstraction.
2014-05-06- Fix bug preventing apply from unfolding Fixpoints.Matthieu Sozeau
- Remove Universe Polymorphism flags everywhere. - Properly infer, discharge template arities and fix substitution inside them (kernel code to check for correctness). - Fix tactics that were supposing universe polymorphic constants/inductives to be parametric on that status. Required to make interp_constr* return the whole evar universe context now. - Fix the univ/level/instance hashconsing to respect the fact that marshalling doesn't preserve sharing, sadly losing most of its benefits. Short-term solution is to add hashes to these for faster comparison, longer term requires rewriting all serialization code. Conflicts: kernel/univ.ml tactics/tactics.ml theories/Logic/EqdepFacts.v
2014-05-06Adapt universe polymorphic branch to new handling of futures for delayed proofs.Matthieu Sozeau
2014-05-06Adapt Y. Bertot's path on private inductives (now the keyword is "Private").Yves Bertot
A quick and dirty approach to private inductive types Types for which computable functions are provided, but pattern-matching is disallowed. This kind of type can be used to simulate simple forms of higher inductive types, with convertibility for applications of the inductive principle to 0-constructors Conflicts: intf/vernacexpr.mli kernel/declarations.ml kernel/declarations.mli kernel/entries.mli kernel/indtypes.ml library/declare.ml parsing/g_vernac.ml4 plugins/funind/glob_term_to_relation.ml pretyping/indrec.ml pretyping/tacred.mli printing/ppvernac.ml toplevel/vernacentries.ml Conflicts: kernel/declarations.mli kernel/declareops.ml kernel/indtypes.ml kernel/modops.ml
2014-05-06- Fix handling of polymorphic inductive elimination schemes.Matthieu Sozeau
- Avoid generation of dummy universes for unsafe_global* - Handle side effects better for polymorphic definitions. Conflicts: kernel/term_typing.ml tactics/tactics.ml
2014-05-06Cleanup in constr, correct classification of polymorphic defs.Matthieu Sozeau
2014-05-06- Fix index-list to show computational relations for rewriting files.Matthieu Sozeau
- Fix hasheq which didn't have a case for Proj making hashconsing exponentially slower. Conflicts: kernel/constr.ml kernel/univ.ml proofs/proof_global.ml
2014-05-06Various fixes of universe polymorphism and projections when they're set.Matthieu Sozeau
- Fix substitution of universes! - Properly refresh universes in typeclasses exact hints. Conflicts: kernel/term_typing.ml toplevel/obligations.ml
2014-05-06- Fix Check to use the constraints inferred during type inference.Matthieu Sozeau
- Fix declaration of projections to work again with Primitive Projections on. Conflicts: kernel/term_typing.ml
2014-05-06Improve universe/level comparison using hashes.Matthieu Sozeau
2014-05-06In kernel/univ.ml, better allocation behavior, better eq_univs functionMatthieu Sozeau
avoiding doing work twice, better leq not duplicating a Universe.equal test. Conflicts: kernel/univ.ml
2014-05-06Compat with ocaml 3.12Matthieu Sozeau
Conflicts: kernel/univ.ml
2014-05-06- Fix comparison of universes.Matthieu Sozeau
- Shortcut for Set <= x checks, assuming that this is always true except when x (or rather its canonical representative) is Prop. Invariant to check. - Uncomment the profiling code and make it depend on a (statically known) boolean.