aboutsummaryrefslogtreecommitdiff
path: root/kernel
AgeCommit message (Collapse)Author
2015-12-05Moving three related small half-general half-ad-hoc utility functionsHugo Herbelin
next to each other, waiting for possible integration into a more uniform API.
2015-12-01New algorithm for universe cycle detections.Jacques-Henri Jourdan
2015-11-29Merge branch 'v8.5'Pierre-Marie Pédrot
2015-11-27Univs: entirely disallow instantiation of polymorphic constants withMatthieu Sozeau
Prop levels. As they are typed assuming all variables are >= Set now, and this was breaking an invariant in typing. Only one instance in the standard library was used in Hurkens, which can be avoided easily. This also avoids displaying unnecessary >= Set constraints everywhere.
2015-11-26Merge branch 'v8.5'Pierre-Marie Pédrot
2015-11-23Fix output of universe arcs. (Fix bug #4422)Guillaume Melquiond
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-20Merge branch 'v8.5'Pierre-Marie Pédrot
2015-11-18Fixing fix c71aa6b to primitive projections.Hugo Herbelin
- Introduced an error: fold was counting in the wrong direction and I did not test it. Sorry. - Substitution from params-with-let to params-without-let was still not correct. Hopefully everything ok now. Eventually, we should use canonical combinators for that: extended_rel_context to built the instance and and a combinator apparently yet to define for building a substitution contracting the let-ins.
2015-11-18Slightly documenting code for building primitive projections.Hugo Herbelin
2015-11-18Fixing logical bugs in the presence of let-ins in computiong primitiveHugo Herbelin
projections. - lift accounting for the record missing in computing the subst from fields to projections of the record - substitution for parameters should not lift the local definitions - typo in building the latter (subst -> letsubst)
2015-11-15Hashconsing modules.Pierre-Marie Pédrot
Modules inserted into the environment were not hashconsed, leading to an important redundancy, especially in module signatures that are always fully expanded. This patch divides by two the size and memory consumption of module-heavy files by hashconsing modules before putting them in the environment. Note that this is not a real hashconsing, in the sense that we only hashcons the inner terms contained in the modules, that are only mapped over. Compilation time should globally decrease, even though some files definining a lot of modules may see their compilation time increase. Some remaining overhead may persist, as for instance module inclusion is not hashconsed.
2015-11-10Merge origin/v8.5 into trunkHugo Herbelin
Did some manual merge in tactics/tactics.ml.
2015-11-10Dead code from the commit having introduced primitive projections (a4043608).Hugo Herbelin
2015-11-10Fixing a bug in reporting ill-formed constructor.Hugo Herbelin
For instance, Inductive a (x:=1) := C : a -> True. was wrongly reporting Error: The type of constructor C is not valid; its conclusion must be "a" applied to its parameter. Also "simplifying" explain_ind_err.
2015-11-05Merge branch 'v8.5'Pierre-Marie Pédrot
2015-11-04Univs: update refman, better printers for universe contexts.Matthieu Sozeau
2015-10-30Merge branch 'v8.5'Pierre-Marie Pédrot
2015-10-29Collect subproof universes in handle_side_effects.Matthieu Sozeau
2015-10-29Cleanup API and comments of 908dcd613Enrico Tassi
2015-10-29Merge branch 'v8.5'Pierre-Marie Pédrot
2015-10-28Avoid type checking private_constants (side_eff) again during Qed (#4357).Enrico Tassi
Side effects are now an opaque data type, called private_constant, you can only obtain from safe_typing. When add_constant is called on a definition_entry that contains private constants, they are either - inlined in the main proof term but not re-checked - declared globally without re-checking them As a safety measure, the opaque data type contains a pointer to the revstruct (an internal field of safe_env that changes every time a new constant is added), and such pointer is compared with the current value store in safe_env when the private_constant is inlined. Only when the comparison is successful the private_constant is not re-checked. Otherwise else it is. In short, we accept into the kernel private constant only when they arrive in the very same order and on top of the very same env they arrived when we fist checked them. Note: private_constants produced by workers never pass the safety measure (the revstruct pointer is an Ephemeron). Sending back the entire revstruct is possible but: 1. we lack a way to quickly compare two revstructs, 2. it can be large.
2015-10-28Refine Gregory Malecha's patch on VM and universe polymorphism.Maxime Dénès
- Universes are now represented in the VM by a structured constant containing the global levels. This constant is applied to local level variables if any. - When reading back a universe, we perform the union of these levels and return a [Vsort]. - Fixed a bug: structured constants could contain local universe variables in constructor arguments, which has to be prevented. Was showing up for instance when evaluating [cons _ list (nil _)] with a polymorphic [list] type. - Fixed a bug: polymorphic inductive types can have an empty stack. Was showing up when evaluating [bool] with a polymorphic [bool] type. - Made a few cosmetic changes. Patch written with Benjamin Grégoire.
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-28Fix minor typo in native compiler.Maxime Dénès
2015-10-28Adds support for the virtual machine to perform reduction of universe ↵Gregory Malecha
polymorphic definitions. - This implementation passes universes in separate arguments and does not eagerly instanitate polymorphic definitions. - This means that it pays no cost on monomorphic definitions.
2015-10-26Merge branch 'v8.5'Pierre-Marie Pédrot
2015-10-25Safe_typing: add clean_bounded_mod_expr in Include Self of modtype (fix #4331)Pierre Letouzey
2015-10-25Minor module cleanup : error HigherOrderInclude was never happeningPierre Letouzey
When F is a Functor, doing an 'Include F' triggers the 'Include Self' mechanism: the current context is used as an pseudo-argument to F. This may fail with a subtype error if the current context isn't adequate.
2015-10-22Fixing a bug in reporting ill-formed inductive.Hugo Herbelin
Was introduced in b06d3badb (15 Jul 2015).
2015-10-19Merge branch 'v8.5'Pierre-Marie Pédrot
2015-10-18Miscellaneous typos, spacing, US spelling in comments or variable names.Hugo Herbelin
2015-10-18Adding a function to mirror decompose_prod_n_assum in that it counts let-ins,Hugo Herbelin
to compensate decompose_lam_n_assum which does not count let-ins. Any idea on a uniform and clear naming scheme for this kind of decomposition functions?
2015-10-16Merge branch 'v8.5' into trunkMaxime Dénès
2015-10-16Hashcons bytecode generated by the VM.Pierre-Marie Pédrot
2015-10-16Exporting a purely functional interface to bytecode patching.Pierre-Marie Pédrot
2015-10-16Remove left2right reference from the kernel.Maxime Dénès
Was introduced by seemingly unrelated commit fd62149f9bf40b3f309ebbfd7497ef7c185436d5. The currently policy is to avoid exposing global references in the kernel interface when easily doable.
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-10-15Warn user when bytecode compilation fails.Maxime Dénès
Previously, the kernel was silently switching back to the standard conversion.
2015-10-15Remove now useless exception handler in default conversion.Maxime Dénès
2015-10-15Merge branch 'v8.5'Pierre-Marie Pédrot
2015-10-15Fix detection of ties in oracle_order.Guillaume Melquiond
This commit has no impact, since l2r is always false in practice due to the definition of default_conv.
2015-10-14Univs: inductives, remove unneeded testMatthieu Sozeau
2015-10-14Temporary fix: kernel conversion needs to ignore l2r flag.Maxime Dénès
Stdlib does not compile when l2r flag is actually taken into account. We should investigate...
2015-10-14Remove reference to default conversion function inside the kernel.Maxime Dénès
2015-10-14Remove -vm flag of coqtop.Maxime Dénès
Used to replace the standard conversion by the VM. Not so useful, and implemented using a bunch of references inside and outside the kernel.
2015-10-14Remove unused infos structure in VM.Maxime Dénès
Became unused after c47b205206d832430fa80a3386be80149e281d33.
2015-10-14Make interpreter of PROJ simpler by not using the stack.Guillaume Melquiond