aboutsummaryrefslogtreecommitdiff
path: root/engine
AgeCommit message (Collapse)Author
2019-05-28Faster renaming of shadowed variables in evar instance creation.Pierre-Marie Pédrot
Instead of blindly renaming the variables in all the terms in the context, we only do so for those appearing after the variable being renamed. By typing, we know that the other ones cannot refer to the variable being replaced. Fixes #9992.
2019-05-27[debug] Print restriction metadata in evar map debug printerMaxime Dénès
2019-05-23Fixing typos - Part 2JPR
2019-05-21Fixing typos - Part 1JPR
2019-05-21Merge PR #10144: Fix #9919: conversion functions are non-linearHugo Herbelin
Ack-by: herbelin Reviewed-by: maximedenes Ack-by: ppedrot
2019-05-14Fix #10161: occur check when defining an algebraic universe.Gaëtan Gilbert
2019-05-13Passing evar_map to evars_of_term rather than expecting the term to be evar-nf.Hugo Herbelin
2019-05-13Moving Evd.evars_of_term from constr to econstr + consequences.Hugo Herbelin
This impacts a lot of code, apparently in the good, removing several conversions back and forth constr.
2019-05-11Generalize map_named_val to handle whole declarations.Pierre-Marie Pédrot
2019-05-10[api] Remove 8.10 deprecations.Emilio Jesus Gallego Arias
Some of them are significant so presumably it will take a bit of effort to fix overlays. I left out the removal of `nf_enter` for now as MTac2 needs some serious porting in order to avoid it.
2019-05-02Add union in Map interfaceMaxime Dénès
2019-04-24Fix proof bullet error helper (nosuchgoal)Gaëtan Gilbert
The [int] is incorrect for list focusing, we could work a bit harder to fix that. It's only used for pluralisation in the error message "no such goal(s)" so we could also ignore the issue.
2019-04-24[proof] Fix proof bullet error helper which was implemented as a hookEmilio Jesus Gallego Arias
We add the information on the proper layer by catching the low-level exception.
2019-04-03Merge PR #9078: Provide a faster bound name generation algorithm through a flagVincent Laporte
Ack-by: jfehrle Ack-by: ppedrot Reviewed-by: vbgl
2019-04-02Define an efficient representation of subscripted identifiers.Pierre-Marie Pédrot
This is not used yet but it will become useful for efficiently generate fresh identifiers.
2019-03-25Fix #9652: rewrite fails to detect lack of progressGaëtan Gilbert
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-03-14Make Sorts.t privateGaëtan Gilbert
2019-03-12Merge PR #7819: Ho matching occ selEnrico Tassi
Ack-by: gares Ack-by: herbelin Ack-by: mattam82 Ack-by: ppedrot
2019-02-21Merge PR #9577: [Namegen] Use Global.exists_objlabel in `next_global_ident_away`Pierre-Marie Pédrot
Reviewed-by: maximedenes Reviewed-by: ppedrot
2019-02-18[Namegen] Use Global.exists_objlabel in `next_global_ident_away`Vincent Laporte
Fixes #9323.
2019-02-17Separate variance and universe fields in inductives.Gaëtan Gilbert
I think the usage looks cleaner this way.
2019-02-17Merge PR #9528: Fix #9527: unknown evar in nonterminating [fix] error.Pierre-Marie Pédrot
Reviewed-by: gares Reviewed-by: ppedrot
2019-02-12[tactics] Remove dependency of abstract on global proof state.Emilio Jesus Gallego Arias
In order to do so we place the polymorphic status and name in the read-only part of the monad. Note the added comments, as well as the fact that almost no part of tactics depends on `proofs` nor `interp`, thus they should be placed just after pretyping. Gaëtan Gilbert noted that ideally, abstract should not depend on the polymorphic status, should we be able to defer closing of the constant, however this will require significant effort. Also, we may deprecate nameless abstract, thus rending both of the changes this PR need unnecessary.
2019-02-11Fix #9527: unknown evar in nonterminating [fix] error.Gaëtan Gilbert
2019-02-08Abstraction namingMatthieu Sozeau
2019-02-08evarconv/evarsolve: HO matching algorithm with occurrence selectionMatthieu Sozeau
Also extend evarconv to handle frozen evars and flags for delta and betaiota reduction. - Make evar_conv unification take a record of flags - Adds an imitate_defs option to evarsolve, deactivated in first-order unification - Add a way to call back conv_algo differently on types - We distinguish comparison of terms and types which might be different w.r.t. delta reductions allowed (everything for types, controlled for terms). We keep the with_cs flag even for types, to avoid incompatibilities (in HoTT's theories/Spaces/No.v, the refine in No_encode_le_lt would diverge due to trying a default canonical structure during type verification). - In evarsolve, do_project_effects checks evar instances now - Solve evar-evar unification using miller patterns if possible. - FO heuristic in evarconv - Do not catch critical exceptions in evarconv - Force HO matching to abstract toplevel evar args, This disallows K on them, more compatible with w_unify_to_subterm. - occur_rigidly improvement, better approx of occur-check. - K_at_toplevel, subterm_ts, betaiota and frozen_evars flags taken into account in apply_on_subterm and evar_conv_x. This allow implementing a unification without reduction, e.g. for the fast path of rewrite subterm selection. - second_order_matching works up-to cumulativity - pretyping/coercion: now take unification flags as argument - pretyping/unification: default_occurrence_test takes a frozen_evars set export elim_flags_evars to compute frozen evars before elim - evarsolve: fix evar_define doing check in the wrong order, as conv_algo can trigger the definition of the evar itself, define it first in the evd. - w_unify: disallow HO in consider_remaining. Only used in rewrite now - use evar_abstraction info - catch second_order_matching NoOccurrence exception in second_order_matching_with_args - unify_with_heuristics in API - second_order_matching: thin evars after abstraction to put in the right env or fail.
2019-02-08Evd/evarsolve: add an abstraction field to evars for unificationMatthieu Sozeau
Named evar_abstract_arguments, this field indicates if the evar arguments corresponding to certain hypothesis can be immitated during inversion or not. If the argument comes from an abstraction (the evar was of arrow type), then imitation is disallowed as it gives unnatural solutions, and lambda abstraction is preferred.
2019-02-05Make Program a regular attributeMaxime Dénès
We remove all calls to `Flags.is_program_mode` except one (to compute the default value of the attribute). Everything else is passed explicitely, and we remove the special logic in the interpretation loop to set/unset the flag. This is especially important since the value of the flag has an impact on proof modes, so on the separation of parsing and execution phases.
2019-02-04Merge PR #6914: Primitive integersPierre-Marie Pédrot
Ack-by: JasonGross Ack-by: SkySkimmer Ack-by: ejgallego Ack-by: gares Ack-by: maximedenes Ack-by: ppedrot
2019-02-04Merge PR #9144: Fixes #4633: clearer message unknown existentialPierre-Marie Pédrot
Ack-by: herbelin 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-02-04Merge PR #9452: [proof] optimize proof always works on incomplete proofsPierre-Marie Pédrot
Ack-by: SkySkimmer Ack-by: ejgallego Ack-by: gares Reviewed-by: ppedrot
2019-01-31[proof] optimize proof always works on incomplete proofsEnrico Tassi
2019-01-24Global [open Univ] in UStateGaëtan Gilbert
2019-01-21[EConstr] Expose API to normalize and check if evars are remainingMaxime Dénès
2019-01-06Renaming pr_evar_suggested_name into -> evar_suggested_name.Hugo Herbelin
Since it returns an Id.t and not a Pp.t.
2018-12-19Merge PR #9139: [engine] Allow debug printers to access the environment.Pierre-Marie Pédrot
2018-12-17Add Map.find_optGaëtan Gilbert
2018-12-13[engine] Allow debug printers to access the environment.Emilio Jesus Gallego Arias
This should improve correctness and will be needed for the PRs that remove global access to the proof state.
2018-12-12Merge PR #9150: [doc] Enable Warning 50 [incorrect doc comment] and fix ↵Maxime Dénès
comments.
2018-12-11Merge PR #9155: Fix race condition triggered by fresh universe generationEnrico Tassi
2018-12-09[doc] Enable Warning 50 [incorrect doc comment] and fix comments.Emilio Jesus Gallego Arias
This is a pre-requisite to use automated formatting tools such as `ocamlformat`, also, there were quite a few places where the comments had basically no effect, thus it was confusing for the developer. p.s: Reading some comments was a lot of fun :)
2018-12-06Revise API for global universes.Gaëtan Gilbert
Rename Univ.Level.{Qualid -> UGlobal}, remove Univ.Level.Id. Remove the ability to split the argument of `Univ.Level.Level` into a dirpath*int pair (except by going through string hacks like detyping/pretyping(/funind) does). Id.of_string_soft to turn unnamed universes into qualid is pushed up to detyping. (TODO some followup PR clean up more) This makes it pointless to have an opaque type for ints in Univ.Level: it would only be used as argument to Univ.Level.UGlobal.make, ie ~~~ open Univ.Level let x = UGlobal.make dp (Id.make n) (* vs *) let x = UGlobal.make dp n ~~~ Remaining places which create levels from ints are various hacks (eg the dummy in inductive.ml, the Type.n universes in ugraph sort_universes) and univgen. UnivGen does have an opaque type for ints used as univ ids since they get manipulated by the stm. NB: build breaks due to ocamldep issue if UGlobal is named Global instead.
2018-12-06Evarutil.finalize: combine minimize, to_constr and restrict.Gaëtan Gilbert
2018-12-06Fix race condition triggered by fresh universe generationMaxime Dénès
Remote counters were trying to build universe levels (as opposed to simple integers), but did not have access to the right dirpath at construction time. We fix it by constructing the level only at use time, and we introduce some abstractions for qualified and unqualified level names.
2018-11-28[options] New helper for creation of boolean options plus reference.Emilio Jesus Gallego Arias
This makes setting the option outside of the synchronized summary impossible.
2018-11-27Merge PR #8854: Fix #8364: making univ algebraic when already equal to another.Matthieu Sozeau
2018-11-27Merge PR #9046: Goptions.declare_* functions return unit instead of a ↵Emilio Jesus Gallego Arias
write_function