aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
Commit message (Collapse)AuthorAge
* Pass around information on the use of template polymorphism forGravatar Matthieu Sozeau2014-11-23
| | | | | | | 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).
* Fix #3824. de Bruijn error in normalization of fixpoints.Gravatar Maxime Dénès2014-11-23
| | | | | | 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.
* Fix bug #3804.Gravatar Matthieu Sozeau2014-11-21
|
* Exporting the function handling side-effects only applied to terms.Gravatar Pierre-Marie Pédrot2014-11-20
|
* Slightly improving error messages when mismatch with Proof using at Qed time.Gravatar Hugo Herbelin2014-11-19
|
* Option -type-in-type continued (deactivate test for inferred sort ofGravatar Hugo Herbelin2014-11-19
| | | | | inductive types + deactivate test for equality of sort + deactivate the check that the constraints Prop/Set <= Type are declared).
* Cleaner interfaces for linking locations of native compiler.Gravatar Maxime Dénès2014-11-12
| | | | | | 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.
* Fix #3282: VM confused by let bindings in fixpoints.Gravatar Maxime Dénès2014-11-10
| | | | | I'm afraid this fix is a bit heuristic, but it seems to generate correct code in all cases.
* Better printing of dynlink errors in native compiler.Gravatar Maxime Dénès2014-11-10
|
* Fix some typos in comments.Gravatar Guillaume Melquiond2014-10-27
|
* Remove an ununsed pattern and commented code in the kernel.Gravatar Matthieu Sozeau2014-10-24
| | | | | Reestablish completeness in conversion when Opaque primitive projections are used.
* Fix retroknowledge for int31 division.Gravatar Maxime Dénès2014-10-24
| | | | | Was broken accidentally by 5b0769b33, slowing down vm_compute and native_compute on numeric computations.
* No hash consing across calls to the native compiler.Gravatar Maxime Dénès2014-10-24
| | | | The induced side effects were incompatible with the undo machinery.
* Pushing Pierre's factorization of names in goal context printing fromGravatar Hugo Herbelin2014-10-22
| | | | | | coqide to coqtop. (Joint work with Pierre)
* A patch for printing "match" when constructors are defined with let-inGravatar Hugo Herbelin2014-10-20
| | | | | | | | | | | 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.
* Revert "Move eta-expansion after delta reduction in kernel reduction. This ↵Gravatar Matthieu Sozeau2014-10-14
| | | | | | | makes" This makes CatsInZFC explode by expanding constants unnecessarily. This reverts commit cf36105854c9a42960ee4139c6afdaa75ec8f31a.
* selective join/export of the safe_environmentGravatar Enrico Tassi2014-10-13
| | | | | This generalizes the BuildVi flag and lets one choose which opaque proofs are done and which not.
* STM: simplify how the term part of a side effect is retrievedGravatar Enrico Tassi2014-10-13
| | | | | Now the seff contains it directly, no need to force the future or to hope that it is a Direct opaque proof.
* library/opaqueTables: enable their use in interactive modeGravatar Enrico Tassi2014-10-13
| | | | | | | | | | | | | | 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
* Revert d0cd27e209be08ee51a2d609157367f053438a10: giving a different nameGravatar Matthieu Sozeau2014-10-11
| | | | | | | 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.
* Fix segfault in native compiler on int31 division.Gravatar Maxime Dénès2014-10-10
| | | | Thanks to Yves for reporting it!
* Implement module subtyping for polymorphic constants (errors onGravatar Matthieu Sozeau2014-10-02
| | | | | | | | 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.
* Move eta-expansion after delta reduction in kernel reduction. This makesGravatar Matthieu Sozeau2014-10-02
| | | | | | 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.
* Simplify evarconv thanks to new delta status of projections,Gravatar Matthieu Sozeau2014-09-30
| | | | | using whd_state_gen to handle unfolding. Add an isProj/destProj in term. Use the proper environment everywhere in unification.ml.
* Add a boolean to indicate the unfolding state of a primitive projection,Gravatar Matthieu Sozeau2014-09-27
| | | | | | | | 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.
* Make the retroknowledge marshalable.Gravatar Arnaud Spiwack2014-09-24
| | | | | | 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.
* Clean a bit of univ.ml, add credits.Gravatar Matthieu Sozeau2014-09-18
|
* Providing a -type-in-type option for collapsing the universe hierarchy.Gravatar Hugo Herbelin2014-09-13
|
* Fix generation of inductive elimination principle for primitive records.Gravatar Matthieu Sozeau2014-09-10
| | | | Let r.(p) be a strict subterm of r during the guardness check.
* Fix checker to handle projections with eta and universe polymorphism correctly.Gravatar Matthieu Sozeau2014-09-06
|
* Fix checker treatment of inductives using subst_instances instead of ↵Gravatar Matthieu Sozeau2014-09-05
| | | | subst_univs_levels.
* Rename eta_expand_ind_stacks, fix the one from the checker and adaptGravatar Matthieu Sozeau2014-09-05
| | | | | it to the new representation of projections and the new mind_finite type.
* Fix primitive projections declarations for inductive records.Gravatar Matthieu Sozeau2014-09-05
|
* Fix bug #3559, ensuring a canonical order of universe level quantifications whenGravatar Matthieu Sozeau2014-09-04
| | | | | introducing constants (e.g. Top.1 is always before Top.2), compatible with the one used before introduction of hMaps in LMap/LSet.
* Print [Variant] types with the keyword [Variant].Gravatar Arnaud Spiwack2014-09-04
| | | | Involves changing the [mind_finite] field in the kernel from a bool to the trivalued type [Decl_kinds.recursivity_kind]. This is why so many files are (unfortunately) affected. It would not be very surprising if some bug was introduced.
* Coqide prints succesive hyps of the same type on 1 lineGravatar Pierre Boutillier2014-09-01
| | | | | This revert somehow f5d7b2b1eda550f5bf0965286d449112acbbadde about "Hypotheses don't respect Barendregt convention".
* Simplify even further the declaration of primitive projections,Gravatar Matthieu Sozeau2014-08-30
| | | | | | | | | | | now done entirely using declare_mind, which declares the associated constants for primitive records. This avoids a hack related to elimination schemes and ensures that the forward references to constants in the mutual inductive entry are properly declared just after the inductive. This also clarifies (and simplifies) the code of term_typing for constants which does not have to deal with building or checking projections anymore. Also fix printing of universes showing the de Bruijn encoding in a few places.
* Add test-suite file. Compute the name for the record binder in theGravatar Matthieu Sozeau2014-08-29
| | | | eta-expanded version of a projection as before.
* Change the way primitive projections are declared to the kernel.Gravatar Matthieu Sozeau2014-08-28
| | | | | | | | | | | Now kernel/indtypes builds the corresponding terms (has to be trusted) while translate_constant just binds a constant name to the already entered projection body, avoiding the dubious "check" of user given terms. "case" Pattern-matching on primitive records is now disallowed, and the default scheme is implemented using projections and eta (all elimination tactics now use projections as well). Elaborate "let (x, y) := p in t" using let bindings for the projections of p too.
* "allows to", like "allowing to", is improperGravatar Jason Gross2014-08-25
| | | | | | | | | | | It's possible that I should have removed more "allows", as many instances of "foo allows to bar" could have been replaced by "foo bars" (e.g., "[Qed] allows to check and save a complete proof term" could be "[Qed] checks and saves a complete proof term"), but not always (e.g., "the optional argument allows to ignore universe polymorphism" should not be "the optional argument ignores universe polymorphism" but "the optional argument allows the caller to instruct Coq to ignore universe polymorphism" or something similar).
* Fix pretty-printing of the graph in Print Sorted Universes. Type.0 was ↵Gravatar Matthieu Sozeau2014-08-18
| | | | larger than Type.1 etc...
* Restrict eta-conversion to inductive records, fixing bug #3310.Gravatar Matthieu Sozeau2014-08-14
|
* Small optimization in Cooking: do not construct identity substitutions.Gravatar Pierre-Marie Pédrot2014-08-13
|
* Adding a primitive to merge ContextSets which is more efficient when oneGravatar Pierre-Marie Pédrot2014-08-09
| | | | of the argument is smaller than the other one.
* Cleaning up interface of ContextSet.Gravatar Pierre-Marie Pédrot2014-08-09
| | | | | Names and arguments were uniformized, and some functions were redesigned to take their typical use-case into account.
* Relax a bit the guard condition.Gravatar Maxime Dénès2014-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My previous optimization of guard checking (f1280889) made it slightly stricter, in the presence of dependent pattern matching and nested inductive types whose toplevel types are mutually recursive. The following (cooked-up) example illustrates this: Inductive list (A B : Type) := nil : list A B | cons : A -> list A B -> list A B. Inductive tree := Node : list tree tree -> tree. Lemma foo : tree = tree. exact eq_refl. Qed. Fixpoint id (t : tree) := match t with | Node l => let l := match foo in (_ = T) return list tree T with eq_refl => l end in match l with | nil => Node (nil _ _) | cons x tl => Node (cons _ _ (id x) tl) end end. is accepted, but changing tree to: Inductive tree := Node : list tree tree -> tree. with tree2 := . made id be rejected after the optimization. The same problem occurred in Paco, and is now fixed. Note that in the example above, list cannot be mutually recursive because of the current strict positivity condition for tree.
* make a few lines fit the screenGravatar Enrico Tassi2014-08-05
|
* One more optimization for guard checking of cofixpoints.Gravatar Maxime Dénès2014-08-04
| | | | | | In check_one_cofix, we now avoid calling dest_subterms each time we meet a constructor by storing both the current tree (needed for the new criterion) and a precomputed array of trees for subterms.
* More optimization in guard checking.Gravatar Maxime Dénès2014-08-04
| | | | | When dynamically computing the recarg tree, we now prune it according to the inferred tree. Compilation of CompCert is now ok.
* Fix an exponential behavior in guard checker for cofixpoints.Gravatar Maxime Dénès2014-08-04
| | | | | I had introduced it by mistake due to my OCaml dyslexia :) Thanks to Enrico and Arnaud for saving my day!