aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
Commit message (Collapse)AuthorAge
* Univs: entirely disallow instantiation of polymorphic constants withGravatar Matthieu Sozeau2015-11-27
| | | | | | | | | 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.
* Fix output of universe arcs. (Fix bug #4422)Gravatar Guillaume Melquiond2015-11-23
|
* 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.
* Fixing fix c71aa6b to primitive projections.Gravatar Hugo Herbelin2015-11-18
| | | | | | | | | | | | - 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.
* Slightly documenting code for building primitive projections.Gravatar Hugo Herbelin2015-11-18
|
* Fixing logical bugs in the presence of let-ins in computiong primitiveGravatar Hugo Herbelin2015-11-18
| | | | | | | | | 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)
* Dead code from the commit having introduced primitive projections (a4043608).Gravatar Hugo Herbelin2015-11-10
|
* Fixing a bug in reporting ill-formed constructor.Gravatar Hugo Herbelin2015-11-10
| | | | | | | | | | | | | | 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.
* Univs: update refman, better printers for universe contexts.Gravatar Matthieu Sozeau2015-11-04
|
* Collect subproof universes in handle_side_effects.Gravatar Matthieu Sozeau2015-10-29
|
* Cleanup API and comments of 908dcd613Gravatar Enrico Tassi2015-10-29
|
* Avoid type checking private_constants (side_eff) again during Qed (#4357).Gravatar Enrico Tassi2015-10-28
| | | | | | | | | | | | | | | | | | | | | 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.
* Refine Gregory Malecha's patch on VM and universe polymorphism.Gravatar Maxime Dénès2015-10-28
| | | | | | | | | | | | | | | | - 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.
* 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.
* Fix minor typo in native compiler.Gravatar Maxime Dénès2015-10-28
|
* Adds support for the virtual machine to perform reduction of universe ↵Gravatar Gregory Malecha2015-10-28
| | | | | | | | 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.
* Safe_typing: add clean_bounded_mod_expr in Include Self of modtype (fix #4331)Gravatar Pierre Letouzey2015-10-25
|
* Minor module cleanup : error HigherOrderInclude was never happeningGravatar Pierre Letouzey2015-10-25
| | | | | | 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.
* Fixing a bug in reporting ill-formed inductive.Gravatar Hugo Herbelin2015-10-22
| | | | Was introduced in b06d3badb (15 Jul 2015).
* Miscellaneous typos, spacing, US spelling in comments or variable names.Gravatar Hugo Herbelin2015-10-18
|
* Adding a function to mirror decompose_prod_n_assum in that it counts let-ins,Gravatar Hugo Herbelin2015-10-18
| | | | | | | 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?
* Remove left2right reference from the kernel.Gravatar Maxime Dénès2015-10-16
| | | | | | | | Was introduced by seemingly unrelated commit fd62149f9bf40b3f309ebbfd7497ef7c185436d5. The currently policy is to avoid exposing global references in the kernel interface when easily doable.
* 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
|
* Warn user when bytecode compilation fails.Gravatar Maxime Dénès2015-10-15
| | | | Previously, the kernel was silently switching back to the standard conversion.
* Remove now useless exception handler in default conversion.Gravatar Maxime Dénès2015-10-15
|
* Fix detection of ties in oracle_order.Gravatar Guillaume Melquiond2015-10-15
| | | | | This commit has no impact, since l2r is always false in practice due to the definition of default_conv.
* Univs: inductives, remove unneeded testGravatar Matthieu Sozeau2015-10-14
|
* Temporary fix: kernel conversion needs to ignore l2r flag.Gravatar Maxime Dénès2015-10-14
| | | | | Stdlib does not compile when l2r flag is actually taken into account. We should investigate...
* Remove reference to default conversion function inside the kernel.Gravatar Maxime Dénès2015-10-14
|
* Remove -vm flag of coqtop.Gravatar Maxime Dénès2015-10-14
| | | | | Used to replace the standard conversion by the VM. Not so useful, and implemented using a bunch of references inside and outside the kernel.
* Remove unused infos structure in VM.Gravatar Maxime Dénès2015-10-14
| | | | Became unused after c47b205206d832430fa80a3386be80149e281d33.
* Make interpreter of PROJ simpler by not using the stack.Gravatar Guillaume Melquiond2015-10-14
|
* Remove some unused variables.Gravatar Guillaume Melquiond2015-10-14
|
* Fix some typos.Gravatar Guillaume Melquiond2015-10-14
|
* Fix some typos.Gravatar Guillaume Melquiond2015-10-13
|
* Univs: be more restrictive for template polymorphic constants: onlyGravatar Matthieu Sozeau2015-10-12
| | | | direct aliases are ok, and indices should not be made polymorphic. Fixes NFix.
* Gather VM tags in Cbytecodes.Gravatar Maxime Dénès2015-10-12
|
* Complete handling of primitive projections in VM.Gravatar Maxime Dénès2015-10-09
| | | | This commit is a follow-up to a51cce369b9c634a93120092d4c7685a242d55b1
* Code cleaning in VM (with Benjamin).Gravatar Maxime Dénès2015-10-09
| | | | | Rename some functions, remove dead code related to (previously deprecated, now removed) option Set Boxed Values.
* Univs: fix bug #3807Gravatar Matthieu Sozeau2015-10-08
| | | | Add a flag to disallow minimization to set
* Proof using: let-in policy, optional auto-clear, forward closure*Gravatar Enrico Tassi2015-10-08
| | | | | | | | | | | | | - "Proof using p*" means: use p and any section var about p. - Simplify the grammar/parser for proof using <expression>. - Section variables with a body (let-in) are pulled in automatically since they are safe to be used (add no extra quantification) - automatic clear of "unused" section variables made optional: Set Proof Using Clear Unused. since clearing section hypotheses does not "always work" (e.g. hint databases are not really cleaned) - term_typing: trigger a "suggest proof using" message also for Let theorems.
* term_typing: strengthen discharging codeGravatar Enrico Tassi2015-10-08
| | | | | | | | | | | | | | | Given the way Lib.extract_hyps is coded if the const_hyps field of a constant declaration contains a named_context that does not have the same order of the one in Environment.env, discharging is broken (as in some section variables are not discharged). If const_hyps is computed by the kernel, then the order is correct by construction. If such list is provided by the user, the order is not granted. We now systematically sort the list of user provided section hyps. The code of Proof using is building the named_context in the right order, but the API was not enforcing/checking it. Now it does.
* Univs: fix bug #4288, Print Sorted generated backward < constraints.Gravatar Matthieu Sozeau2015-10-05
|
* Univs: Change intf of push_named_def to return the computed universeGravatar Matthieu Sozeau2015-10-02
| | | | | | | context Let-bound definitions can be opaque but the whole universe context was not gathered to be discharged at section closing time.
* Univs: refined handling of assumptionsGravatar Matthieu Sozeau2015-10-02
| | | | | | According to their polymorphic/non-polymorphic status, which imply that universe variables introduced with it are assumed to be >= or > Set respectively in the following definitions.
* Univs: forgot a substitution in mod_typing.Gravatar Matthieu Sozeau2015-10-02
|
* Univs: correct handling of with in modulesGravatar Matthieu Sozeau2015-10-02
| | | | | For polymorphic and non-polymorphic parameters and definitions, fixes bugs #4298, #4294
* Univs: fix bug #4251, handling of template polymorphic constants.Gravatar Matthieu Sozeau2015-10-02
|