aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
Commit message (Collapse)AuthorAge
...
| | * | | | Inline the only use of hcons_j in Term_typing.Gravatar Pierre-Marie Pédrot2017-04-07
| | | | | |
| | * | | | Documenting the fact terms are only hashconsed outside of a section.Gravatar Pierre-Marie Pédrot2017-04-06
| | | | | |
| * | | | | Merge PR#434: Optimizing array mapping in the kernel.Gravatar Maxime Dénès2017-04-05
| |\ \ \ \ \
| | | | * | | Fix substitution of abstracted lemmas.Gravatar Pierre-Marie Pédrot2017-04-04
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of browsing the term as many times as there are abstracted constants, we replace the constants in one pass. We have to be a bit careful to replace the right variables though, in case there are chained abstracts. This is much faster. This solves the second part of bug #5382: Huge case analysis fails in coq8.5.x.
| | | | * | Fix bug #5435: [Eval native_compute in] raises anomaly.Gravatar Maxime Dénès2017-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was introduced by 4f041384cb27f0d2. Unsoundness seems miraculously avoided by a safeguard I put in nativecode.ml. But other kernel changes in this commit should probably be reviewed carefully.
* | | | | | Make the Constr.kind_of_term type parametric in sorts and universes.Gravatar Pierre-Marie Pédrot2017-03-31
| | | | | |
| | | * | | More efficient check in validity of side-effects.Gravatar Pierre-Marie Pédrot2017-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to look for the size of the whole list to find whether we can extract a suffix from it, as we can do it in one go instead. This slowness was observable in abstract-heavy code.
| | | * | | Adding the size of the opaquetab in its representation.Gravatar Pierre-Marie Pédrot2017-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This turned out to be costly in proofs with many abstracted lemmas, as an important part of the time was passed in the computation of the size of the opaquetab.
| | | * | | Fix hashconsing of terms in the kernel.Gravatar Pierre-Marie Pédrot2017-03-27
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In one case, the hashconsed type of a judgement was not used anywhere else. In another case, the Opaqueproof module was rehashconsing terms that had already gone through a hashconsing phase. Indeed, most OpaqueDef constructor applications actually called it beforehand, so that the one performed in Opaqueproof was most often useless. The only case where this was not true was at section closing time, so that we tweak the Cooking.cook_constant to perform hashconsing for us.
* | | | | Merge branch 'trunk' into pr379Gravatar Maxime Dénès2017-03-24
|\| | | |
| * | | | Merge branch 'v8.6' into trunkGravatar Maxime Dénès2017-03-24
| |\ \ \ \ | | | |/ / | | |/| |
| | * | | Documenting the API of side-effects.Gravatar Pierre-Marie Pédrot2017-03-23
| | | | |
| | * | | Using a dedicated datastructure for side effect ordering.Gravatar Pierre-Marie Pédrot2017-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were doing fishy things in the Term_typing file, where side-effects were not considered in the right uniquization order because of the uniq_seff_rev function. It probably did not matter after a9b76df because effects were (mostly) uniquize upfront, but this is not clear because of the use of the transparente API in the module. Now everything has to go through the opaque API, so that a proper dependence order is ensured.
| | * | | Making the side_effects type opaque.Gravatar Pierre-Marie Pédrot2017-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | We move it from Entries to Term_typing and export the few functions needed to manipulate it in this module.
| * | | | Merge branch 'v8.6' into trunkGravatar Maxime Dénès2017-03-23
| |\| | |
| * | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2017-03-22
| |\ \ \ \
| * \ \ \ \ Merge PR#482: [toplevel] Remove unusable option -notopGravatar Maxime Dénès2017-03-22
| |\ \ \ \ \
| | | | * | | Add a few comments in term_typing.ml.Gravatar Maxime Dénès2017-03-21
| | | | | | |
| | | | * | | Do not typecheck twice the type of opaque constants.Gravatar Maxime Dénès2017-03-21
| | | |/ / / | | | | | | | | | | | | | | | | | | I believe an unwanted shadowing was introduced by a4043608f704f0.
| * | | | | Merge PR#134: Enable `-safe-string`Gravatar Maxime Dénès2017-03-21
| |\ \ \ \ \
| | | | * | | In the Kami project, that causes a stack overflow in one of the example filesGravatar Paul Steckler2017-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (ProcThreeStInl.v, when the final "Defined" runs). I've verified that the change here fixes the stack overflow there with Coq 8.5pl2. In this version, all the recursive calls are in tail position. Instead of taking a single list of instructions, `emit' here takes a curent list and a remaining list of lists of instructions. That means the two calls elsewhere in the file now add an empty list argument. The algorithm works on the current list until it's empty, then works on the remaining lists. The most complex case is for Ksequence, where one of the pieces becomes the new current list, and the other pieces are consed onto the remaining sub-lists.
| | * | | | | [misc] Remove warnings about String.setGravatar Emilio Jesus Gallego Arias2017-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `a.[i] <- x` notation is deprecated and we were getting a couple of warnings.
| | * | | | | [safe-string] Enable -safe-string !Gravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now build Coq with `-safe-string`, which enforces functional use of the `string` datatype. Coq was pretty safe in these regard so only a few tweaks were needed. - coq_makefile: build plugins with -safe-string too. - `names.ml`: we remove `String.copy` uses, as they are not needed.
| | * | | | | [safe_string] library/nameopsGravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We add a more convenient API to create identifiers from mutable strings. We cannot solve the `String.copy` deprecation problem until we enable `-safe-string`.
| | * | | | | [safe_string] kernel/cemitcodesGravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `emitcodes` string type was used in both a functional and an imperative way, so we have to handle it with care in order to preserve the previous optimizations and semantics.
| | | * | | | [toplevel] Remove unusable option -notopGravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maxime points out that -notop cannot be used as the kernel requires all constants to belong into a module. Indeed: ``` $ rlwrap ./bin/coqtop -notop Coq < Definition foo := True. Toplevel input, characters 0-23: > Definition foo := True. > ^^^^^^^^^^^^^^^^^^^^^^^ Error: No session module started (use -top dir) Coq < Module M. Definition foo := True. End M. Module M is defined Coq < Locate foo. Constant If you see this, it's a bug.M.foo (shorter name to refer to it in current context is M.foo) ``` My rationale for the removal is that this kind of incomplete features are often confusing to newcomers ─ it has happened to me many times ─ as it can be seen for example in #397 .
| | * | | | | [safe-string] kernel/nativevaluesGravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional change.
| | * | | | | [safe_string] kernel/term_typingGravatar Emilio Jesus Gallego Arias2017-03-14
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | No functional change, we create the new string beforehand and `id_of_string` will become a noop with `-safe-string`.
| * / / / / [future] Remove unused parameter greedy.Gravatar Emilio Jesus Gallego Arias2017-03-14
| |/ / / / | | | | | | | | | | | | | | | It was always set to `greedy:true`.
| | | | * Do not recompute twice the whnf of terms in conversion.Gravatar Pierre-Marie Pédrot2017-02-27
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This performance bug was introduced 9 years ago in a8b0345, where the responsibility of normalizing the term went from ccnv to eqappr in Reduction. As a result, all recursive calls to eqappr that were preemptively reducing the term ended up calling whd_stack twice, once by themselves, and once in the subsequent call to eqappr. This caused an important slowdown for conversion-intensive proofs, as the whd_stack calls CClosure.zip to perfom in-place term sharing, leading to useless huge re-allocations and repetitive write barriers. Now that eqappr always head-normalizes the term beforehand, we simply don't call whd_stack anymore when jumping to eqappr.
| * | | Merge PR#189: Remove tabulation support from pretty-printing.Gravatar Maxime Dénès2017-02-20
| |\ \ \
| | | | * Optimizing array mapping in the kernel.Gravatar Pierre-Marie Pédrot2017-02-19
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We unroll the map operation by hand in two performance-critical cases so as not to call the generic array allocation function in OCaml, and allocate directly on the minor heap instead. The generic array function is slow because it needs to discriminate between float and non-float arrays. The unrolling replaces this by a simple increment to the minor heap pointer and moves from the stack. The quantity of unrolling was determined by experimental measures on various Coq developments. It looks like most of the maps are for small arrays of size lesser or equal to 4, so this is what is implemented here. We could probably extend it to an even bigger number, but that would result in ugly code. From what I've seen, virtually all maps are of size less than 16, so that we could probably be almost optimal by going up to 16 unrollings, but the code tradeoffs are not obvious. Maybe when we have PPX?
* | | | Merge branch 'master'.Gravatar Pierre-Marie Pédrot2017-02-14
|\| | |
* | | | Introducing contexts parameterized by the inner term type.Gravatar Pierre-Marie Pédrot2017-02-14
| | | | | | | | | | | | | | | | | | | | This allows the decoupling of the notions of context containing kernel terms and context containing tactic-level terms.
* | | | Reductionops now return EConstrs.Gravatar Pierre-Marie Pédrot2017-02-14
| | | |
* | | | Making judgment type generic over the type of inner constrs.Gravatar Pierre-Marie Pédrot2017-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to factorize code and prevents the unnecessary use of back and forth conversions between the various types of terms. Note that functions from typing may now raise errors as PretypeError rather than TypeError, because they call the proper wrapper. I think that they were wrongly calling the kernel because of an overlook of open modules.
| * | | Merge PR#393: Replace Typeops with Fast_typeopsGravatar Maxime Dénès2017-02-08
| |\ \ \
| * \ \ \ Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2017-02-01
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | Merge branch 'v8.5' into v8.6Gravatar Pierre-Marie Pédrot2017-02-01
| | |\ \ \
| | | | * | Remove useless commentsGravatar Gaetan Gilbert2017-01-28
| | | | | |
| | | * | | [native comp] Improve error message on linking error.Gravatar Emilio Jesus Gallego Arias2017-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The native compiler doesn't support `Require` inside `Module` sections in some cases, we improve the error message. See: https://coq.inria.fr/bugs/show_bug.cgi?id=4335 This patch improves the error message and gives the user some feedback.
| | * | | | Do not add redundant side effects in tactic code.Gravatar Pierre-Marie Pédrot2017-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was observable in long proofs, because side effects kept being duplicated, leading to an additional cost linear in the size of the proof. This commit touches kernel files, but the corresponding API is only used in tactic-facing code so that the side_effects type remains opaque. Thus it does not affect the kernel safety.
| * | | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2017-01-19
| |\| | | |
| | * | | | Mapping named_context_val preserves sharing when possible.Gravatar Pierre-Marie Pédrot2017-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was deactivated by 27c9346 and made an optimization moot in eauto. This optimization was physically checking for equality, but as lists where rebuilt by the mapping, this was never true. Some contribs were thus quite slower, including persistent-union-find which was twice slower. This 2-line patch fixes it by trying to preserve sharing as much as possible. Note that we should still do something about eauto, because it does redo useless work a lot whenever the environment only changes a bit, while we could cache this computation.
| | | * | | Handle application of a primitive projection to a not yet evaluated ↵Gravatar Guillaume Melquiond2016-12-26
| | | | | | | | | | | | | | | | | | | | | | | | cofixpoint (bug #5286).
| | * | | | Handle application of a primitive projection to a not yet evaluated ↵Gravatar Guillaume Melquiond2016-12-23
| | | | | | | | | | | | | | | | | | | | | | | | cofixpoint (bug #5286).
| * | | | | Fixing injection in the presence of let-in in constructors.Gravatar Hugo Herbelin2016-12-22
| | | | | | | | | | | | | | | | | | | | | | | | This also fixes decide equality, discriminate, ... (see e.g. #5279).
| | | | * | Replace Typeops by Fast_typeopsGravatar Gaetan Gilbert2016-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is really [mv fast_typeops.ml{,i} typeops.ml{,i}] plus trivial changes in the other files, the real changes are in the parent commit.
| | | | * | Extend Fast_typeops to be a replacement for TypeopsGravatar Gaetan Gilbert2016-12-12
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings the fix in cad44fc for #2996 to the copy of Fast_typeops.check_hyps_inclusion. Fast_typeops.constant_type checks the universe constraints instead of outputting them. Since everyone who used Typeops.constant_type just discarded the constraints they've been switched to constant_type_in which should be the same in Fast_typeops and Typeops. There are some small differences in the interfaces: - Typeops.type_of_projection <-> Fast_typeops.type_of_projection_constant to avoid collision with the internally used type_of_projection (which gives the type of [Proj(p,c)]). - check_hyps_inclusion takes [('a -> constr)] and ['a] instead of [constr] for reporting errors.
| * | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-12-07
| |\| | |