aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
Commit message (Collapse)AuthorAge
* 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!
* Fixing semantics of Univ.Level.equal.Gravatar Pierre-Marie Pédrot2014-08-04
|
* Fix infer conv using the wrong universe conversion flexibility informationGravatar Matthieu Sozeau2014-08-03
| | | | | for constants that are not unfolded during conversion. Fix discharge of polymorphic section variables over inductive types.
* - Fix handling of opaque polymorphic definitions which were turned transparent.Gravatar Matthieu Sozeau2014-08-03
| | | | - Decomment code in reductionops forgotten after debugging.
* Move to a representation of universe polymorphic constants using indices for ↵Gravatar Matthieu Sozeau2014-08-03
| | | | | | | variables. Simplifies instantiation of constants/inductives, requiring less allocation and Map.find's. Abstraction by variables is handled mostly inside the kernel but could be moved outside.
* A tentative uniform naming policy in module Inductiveops.Gravatar Hugo Herbelin2014-08-01
| | | | | | | | | | | | - realargs: refers either to the indices of an inductive, or to the proper args of a constructor - params: refers to parameters (which are common to inductive and constructors) - allargs = params + realargs - realdecls: refers to the defining context of indices or proper args of a constructor (it includes letins) - paramdecls: refers to the defining context of params (it includes letins) - alldecls = paramdecls + realdecls
* Useless export of Instance.eqeq. We hashcons everything before calling thisGravatar Pierre-Marie Pédrot2014-07-31
| | | | function, so plain pointer equality is sufficient.
* Optimize check of new subterm relation on match.Gravatar Maxime Dénès2014-07-31
| | | | | | | If the return predicate is not dependent, we avoid dynamically regenerating the regular tree of the corresponding inductive type. This includes the commutative cut rule. Should solve some performance issues observed in Compcert and Paco at Qed time.
* Fix dynamic computation of recargs for mutual inductives.Gravatar Maxime Dénès2014-07-31
| | | | Used by the new guard criterion compatible with type isomorphisms.
* Avoid hconsing instances during appends and conversions from/to arrays.Gravatar Matthieu Sozeau2014-07-30
|
* Fix eta-conversion code which was failing in nested cases. Fixes bug #3429.Gravatar Matthieu Sozeau2014-07-29
|
* - Do module substitution inside mind_record.Gravatar Matthieu Sozeau2014-07-25
| | | | | - Distinguish between primitive and non-primitive records in the kernel declaration, so as to try eta-conversion on primitive records only.
* Minor cleaning.Gravatar Maxime Dénès2014-07-22
|
* Revert "Extend subterm relation to pattern matching in return predicates."Gravatar Maxime Dénès2014-07-22
| | | | This reverts commit ec1bb8a981fef14b58ab65483244fc42b05aef13.
* Revert "Propagate size info through pattern matching in predicates, for the"Gravatar Maxime Dénès2014-07-22
| | | | | | This reverts commit 6a3bcd3ae320e65347cbd6ef4bac458f073d02ea. Apply again if this kind of dependently typed programming idioms are needed.
* Propagate size info through pattern matching in predicates, for theGravatar Maxime Dénès2014-07-22
| | | | | | | commutative cut rule. The error messages of the guard checker are now sometimes not informative enough.
* Extend subterm relation to pattern matching in return predicates.Gravatar Maxime Dénès2014-07-22
| | | | | | | | | | A pattern matching is can now be a subterm if: - Every branch is a subterm - The return predicate is a pattern matching whose return predicate is an arity. - That pattern matching (in the return predicate) returns the same inductive family in the conclusion of each branch. The commutative cut rule hasn't been updated accordingly yet.
* Fix check_inductive_codomain.Gravatar Maxime Dénès2014-07-22
|
* Refine check_is_subterm.Gravatar Maxime Dénès2014-07-22
| | | | | | | Following Bruno's suggestion, we check if the tree expected for the recursive argument is included in the one which is inferred. This check is probably not necessary in the current state of affairs, but might become so after further extensions of the guard condition.
* Refined guard condition of cofixpoints, to anticipate potential futurGravatar Maxime Dénès2014-07-22
| | | | extensions.
* First attempt at a fix for guard condition on cofixpoints.Gravatar Maxime Dénès2014-07-22
|
* Typo in comment.Gravatar Maxime Dénès2014-07-22
|
* Made intersection on regular trees less intensional.Gravatar Maxime Dénès2014-07-22
|
* Refining match subterm and commutative cut rules. The parameters that areGravatar Maxime Dénès2014-07-22
| | | | | | instantiated in the return predicate are now taken into account. The resulting recargs tree is the intersection between the one of the branches and the appearing in the return predicate. Both the domain and co-domain are filtered.
* Tentative fix for the commutative cut subterm rule.Gravatar Maxime Dénès2014-07-22
| | | | | Some fixpoints are now rejected in the standard library, but that's probably because we compare trees for equality instead of intersecting them.
* Tentative patch for incompatibility between subterm relation and dependentGravatar Maxime Dénès2014-07-22
| | | | | | | | | | | | pattern matching. This patch should be improved in two ways: (1) Implement the same checks for the commutative cut subterm rule. (2) When checking safe recursive subterms for each of the branches in a match, instanciated parameters in the return predicate should be taken into account. Step (1) should be enough to restore a correct guard condition, but (2) will be required if we don't want to rule out some legitimate and practical examples.
* Universe level maps use HMaps.Gravatar Pierre-Marie Pédrot2014-07-21
|
* Cleanup substitution inside universe instances, only done through subst_fn now,Gravatar Matthieu Sozeau2014-07-21
| | | | | and disable hashconsing of substituted instances which had a huge performance penalty in general. They are hashconsed when put in the environment only now.
* Cleanup code for constant equality in kernel conversion.Gravatar Matthieu Sozeau2014-07-21
|
* Use kernel conversion on terms that contain universe variables during ↵Gravatar Matthieu Sozeau2014-07-20
| | | | | | unification, speeding it up considerably Revert backwards-incompatible commit 77df7b1283940d979d3e14893d151bc544f41410
* Properly add a Set lower bound on any polymorphic inductive in Type withGravatar Matthieu Sozeau2014-07-11
| | | | more than one constructor.
* Overlooked to remove a change in kernel/closure that made reducing underGravatar Matthieu Sozeau2014-07-10
| | | | a primitive projection impossible.
* Fixing the previous patch to keep transparent states in sync.Gravatar Pierre-Marie Pédrot2014-07-09
|
* Recovering transparent state from kernel oracles in constant time.Gravatar Pierre-Marie Pédrot2014-07-09
|