aboutsummaryrefslogtreecommitdiff
path: root/kernel/environ.ml
AgeCommit message (Collapse)Author
2019-05-24Move body_of_constant_body to Global and specialize its uses.Pierre-Marie Pédrot
This function is breaking the indirect opaque abstraction, so we move it outside of the kernel. Unluckily, there is no better place to put it, so we leave it in Global. The checker uses it in a fundamental way, so we reimplement it there, but this will eventually get removed.
2019-05-21Merge PR #10174: Further cleanup of the side-effect machineryGaëtan Gilbert
Reviewed-by: SkySkimmer Reviewed-by: gares Reviewed-by: maximedenes
2019-05-19Parameterize the constant_body type by opaque subproofs.Pierre-Marie Pédrot
2019-05-11Generalize map_named_val to handle whole declarations.Pierre-Marie Pédrot
2019-03-14Add relevance marks on binders.Gaëtan Gilbert
Kernel should be mostly correct, higher levels do random stuff at times.
2019-03-14Add a non-cumulative impredicative universe SProp.Gaëtan Gilbert
Note currently it's impossible to define inductives in SProp because indtypes.ml and the pretyper aren't fully plugged.
2019-02-11Fix #9527: unknown evar in nonterminating [fix] error.Gaëtan Gilbert
2019-02-05Merge PR #9438: Cleanup universe length for inductives in vconvPierre-Marie Pédrot
Ack-by: SkySkimmer Reviewed-by: ppedrot
2019-02-04Primitive integersMaxime Dénès
This work makes it possible to take advantage of a compact representation for integers in the entire system, as opposed to only in some reduction machines. It is useful for heavily computational applications, where even constructing terms is not possible without such a representation. Concretely, it replaces part of the retroknowledge machinery with a primitive construction for integers in terms, and introduces a kind of FFI which maps constants to operators (on integers). Properties of these operators are expressed as explicit axioms, whereas they were hidden in the retroknowledge-based approach. This has been presented at the Coq workshop and some Coq Working Groups, and has been used by various groups for STM trace checking, computational analysis, etc. Contributions by Guillaume Bertholon and Pierre Roux <Pierre.Roux@onera.fr> Co-authored-by: Benjamin Grégoire <Benjamin.Gregoire@inria.fr> Co-authored-by: Vincent Laporte <Vincent.Laporte@fondation-inria.fr>
2019-01-30Cleanup universe length for inductives in vconvGaëtan Gilbert
2019-01-21Refactor typechecking of inductive typesGaëtan Gilbert
We split into smaller functions, use more specific types for universe manipulation, and try to limit how much of the big tuple gets passed to subroutines.
2018-11-27Merge PR #8850: Private universes for opaque polymorphic constants.Matthieu Sozeau
2018-11-26Put -indices-matter in typing_flagsGaëtan Gilbert
2018-11-23Local universes for opaque polymorphic constants.Gaëtan Gilbert
2018-11-15Make set_typing_flags "smart"Gaëtan Gilbert
Fix #8609 gares said: I believe it was introduced in de20a45 where the option (part of the summary) is moved to the save env. By setting the summary, you unshare the safe env. Now we do that only if needed. The stm uses `==` on the safe env to detect tactics that alter the env, eg abstract.
2018-11-05Merge PR #8866: Check universe instances in TypingPierre-Marie Pédrot
2018-10-31Seeing Global purely as a wrapper on top of kernel functions.Hugo Herbelin
2018-10-30Remove Environ.set_universes / Typing.enrich_envGaëtan Gilbert
Made possible by the previous commit passing ~evars to check_hyps_inclusion.
2018-10-30Simplify universe handling in environ constant_type functionsGaëtan Gilbert
2018-10-16Simplify vars_of_global usageGaëtan Gilbert
2018-10-16Simplify fresh_foo_instance functions and pretyping of univ instanceGaëtan Gilbert
2018-10-16Deprecate Global.universes_of_global (replaced by environ version)Gaëtan Gilbert
2018-10-11A state-free version of is_polymorphic.Hugo Herbelin
2018-09-24[kernel] Compile with almost all warnings enabled.Emilio Jesus Gallego Arias
This is a partial resurrection of #6423 but only for the kernel. IMHO, we pay a bit of price for this but it is a good safety measure. Only warning "4: fragile pattern matching" and "44: open hides a type" are disabled. We would like to enable 44 for sure once we do some alias cleanup.
2018-09-19Merge PR #8341: Reduce universe redeclarations (catching AlreadyDeclared)Matthieu Sozeau
2018-09-14Retroknowledge: use GlobRef.t instead of Constr.t as entryVincent Laporte
2018-09-14Retroknowledge.KInt31: remove the (unused) group parameterVincent Laporte
2018-09-13Do not catch already declared universes in Environ.add_universesGaëtan Gilbert
Include is still causing repeat declarations in add_universes_set
2018-07-24Projections use index representationGaëtan Gilbert
The upper layers still need a mapping constant -> projection, which is provided by Recordops.
2018-06-29Merge PR #7080: Swapping Context and Constr and defining declarations on ↵Maxime Dénès
constr in Constr
2018-06-28Make Environ.globals abstract.Gaëtan Gilbert
2018-06-27Swapping Context and Constr: defining declarations on constr in Constr.Hugo Herbelin
This shall eventually allow to use contexts of declarations in the definition of the "Case" constructor. Basically, this means that Constr now includes Context and that the "t" types of Context which were specialized on constr are not defined in Constr (unfortunately using a heavy boilerplate).
2018-06-23Using more general information for primitive records.Pierre-Marie Pédrot
This brings more compatibility with handling of mutual primitive records in the kernel.
2018-06-17Getting rid of the const_proj field in the kernel.Pierre-Marie Pédrot
This field used to signal that a constant was the compatibility eta-expansion of a primitive projections, but since a previous cleanup in the kernel it had become useless.
2018-05-31Reduce circular dependency constants <-> projectionsGaëtan Gilbert
Instead of having the projection data in the constant data we have it independently in the environment.
2018-05-28Unify pre_env and envMaxime Dénès
We now have only two notions of environments in the kernel: env and safe_env.
2018-02-27Update headers following #6543.Théo Zimmermann
2018-02-23New IR in VM: Clambda.Maxime Dénès
This intermediate representation serves two purposes: 1- It is a preliminary step for primitive machine integers, as iterators will be compiled to Clambda. 2- It makes the VM compilation passes closer to the ones of native_compute. Once we unifiy the representation of values, we should be able to factorize the lambda-code generation between the two compilers, as well as the reification code. This code was written by Benjamin Grégoire and myself.
2018-01-23Merge PR #6627: Fix #6619: coqchk does not reduce compatibility constants ↵Maxime Dénès
for primitive projections
2018-01-22Merge PR #6506: Fast rel lookupMaxime Dénès
2018-01-20Remove dead code in Environ.Pierre-Marie Pédrot
The constant_value function was actually not behaving the same as constant_value_in w.r.t. projections. The former was not used, and the only place that used the latter was in Tacred and was statically insensitive to the use of projections.
2018-01-14Store the conversion oracle in constant and inductive definitions.Pierre-Marie Pédrot
We also have to update the checker to deserialize this additional data, but it is not using it in type-checking yet.
2017-12-29Fast environment lookup for rels.Pierre-Marie Pédrot
We take advantage of the range structure to get a O(log n) retrieval of values bound to a rel in an environment.
2017-11-06[api] Move structures deprecated in the API to the core.Emilio Jesus Gallego Arias
We do up to `Term` which is the main bulk of the changes.
2017-09-28Efficient computation of the names contained in an environment.Pierre-Marie Pédrot
2017-08-12Moving file primitive.ml to cPrimitive.ml to avoid conflict with OCaml.Hugo Herbelin
Indeed OCaml has a similar file and this conflicts, at least in debugger.
2017-07-26Removing template polymorphism for definitions.Pierre-Marie Pédrot
The use of template polymorphism in constants was quite limited, as it only applied to definitions that were exactly inductive types without any parameter whatsoever. Furthermore, it seems that following the introduction of polymorphic definitions, the code path enforced regular polymorphism as soon as the type of a definition was given, which was in practice almost always. Removing this feature had no observable effect neither on the test-suite, nor on any development that we monitor on Travis. I believe it is safe to assume it was nowadays useless.
2017-07-11Safe API for accessing universe constraints of global references.Pierre-Marie Pédrot
Instead of returning either an instance or the set of constraints, we rather return the corresponding abstracted context. We also push back all uses of abstraction-breaking calls from these functions out of the kernel.
2017-07-11Less footguns in universe handling: remove subst_instance_context.Pierre-Marie Pédrot
This function was lurking around, waiting to bite anybody willing to use it. We use instead a better API, correct and much less error-prone.
2017-07-04Bump year in headers.Pierre-Marie Pédrot