aboutsummaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)Author
2019-06-04coqpp: add new ![] specifiers for structured proof interactionGaëtan Gilbert
![proof_stack] is equivalent to the old meaning of ![proof]: the body has type `pstate:Proof_global.t option -> Proof_global.t option` The other specifiers are for the following body types: ~~~ ![open_proof] `is_ontop:bool -> pstate` ![maybe_open_proof] `is_ontop:bool -> pstate option` ![proof] `pstate:pstate -> pstate` ![proof_opt_query] `pstate:pstate option -> unit` ![proof_query] `pstate:pstate -> unit` ~~~ The `is_ontop` is only used for the warning message when declaring a section variable inside a proof, we could also just stop warning. The specifiers look closely related to stm classifiers, but currently they're unconnected. Notably this means that a ![proof_query] doesn't have to be classified QUERY. ![proof_stack] is only used by g_rewrite/rewrite whose behaviour I don't fully understand, maybe we can drop it in the future. For compat we may want to consider keeping ![proof] with its old meaning and using some new name for the new meaning. OTOH fixing plugins to be stricter is easier if we change it as the errors tell us where it's used.
2019-06-04Proof_global: pass only 1 pstate when we don't want the proof stackGaëtan Gilbert
Typically instead of [start_proof : ontop:Proof_global.t option -> bla -> Proof_global.t] we have [start_proof : bla -> Proof_global.pstate] and the pstate is pushed on the stack by a caller around the vernacentries/mlg level. Naming can be a bit awkward, hopefully it can be improved (maybe in a followup PR). We can see some patterns appear waiting for nicer combinators, eg in mlg we often only want to work with the current proof, not the stack. Behaviour should be similar modulo bugs, let's see what CI says.
2019-06-04rewrite.ml: remove outdated commentGaëtan Gilbert
2019-06-04rewrite.ml: drop the id returned by new_instance earlierGaëtan Gilbert
We never use this id in rewrite.ml so don't bother threading it around.
2019-05-31Remove Show Script (deprecated in 8.10)Gaëtan Gilbert
2019-05-27Ensure dynamically that opaque definitions come with their type.Pierre-Marie Pédrot
The only lawbreaker was the Add Ring command. We generate a type for the declaration to fix the code.
2019-05-27Merge PR #10237: Fix some incorrect uses of proof-local environmentPierre-Marie Pédrot
Reviewed-by: gares Reviewed-by: ppedrot
2019-05-25Documenting syntax "injection ... as [= pat1 ... patn ]".Hugo Herbelin
To prevent confusion, forbidding a mix of the "injection term as pat1 ... patn" and of the "injection term as [= pat1 ... patn]" syntax: If a "[= ...]" occurs, this should be a singleton list of patterns.
2019-05-24Merge PR #10233: Fixing typos - Part 3Théo Zimmermann
Reviewed-by: Zimmi48
2019-05-24Use global env in numeral and string notationsMaxime Dénès
Since their introduction, these notations were incorrectly using the proof-local environment.
2019-05-24Stop using pstate in global print queriesGaëtan Gilbert
Using pstate makes no sense for printing global stuff
2019-05-24Remove the indirect opaque accessor hooks from Opaqueproof.Pierre-Marie Pédrot
We simply pass them as arguments, now that they are not called by the kernel anymore. The checker definitely needs to access the opaque proofs. In order not to touch the API at all, I added a hook there, but it could also be provided as an additional argument, at the cost of changing all the upwards callers.
2019-05-23Fixing typos - Part 3JPR
2019-05-23Merge PR #10221: Fixing typos - Part 2 (reopening of #10218)Théo Zimmermann
2019-05-23Merge PR #10185: Remove undocumented Instance : ! syntaxVincent Laporte
Ack-by: SkySkimmer Ack-by: Zimmi48 Reviewed-by: vbgl
2019-05-23Fixing typos - Part 2JPR
2019-05-22Partly revert micromega parsing using typeclasses.Frédéric Besson
Typeclasses resolution is not used anymore for lia. Typeclasses resolution is still used by lra but only to access a database of declared constants.
2019-05-21Remove definition-not-visible warningGaëtan Gilbert
This lets us avoid passing ~ontop to do_definition and co, and after #10050 to even more functions.
2019-05-21Remove undocumented Instance : ! syntaxGaëtan Gilbert
It's used a few times in the stdlib (a couple of which need no other change when removing the !) and not at all throughout our CI. Considering that I think it's fair enough to remove it.
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-20Remove VtUnknown classificationMaxime Dénès
This clean-up removes the dependency of the current proof mode (and hence the parsing state) on unification. The current proof mode can now be known simply by parsing and elaborating attributes. We give access to attributes from the classifier for this purpose. We remove the infamous `VtUnknown` code path in the STM which is known to be buggy. Fixes #3632 #3890 #4638.
2019-05-20Remove Refine Instance Mode optionMaxime Dénès
2019-05-19Parameterize the constant_body type by opaque subproofs.Pierre-Marie Pédrot
2019-05-14Merge PR #8893: Moving evars_of_term from constr to econstrPierre-Marie Pédrot
Ack-by: SkySkimmer Reviewed-by: gares Ack-by: herbelin Reviewed-by: maximedenes Reviewed-by: ppedrot
2019-05-14Allow run_tactic to return a value, remove hack from ltac2Gaë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-13Merge PR #9887: [api] Remove 8.10 deprecations.Gaëtan Gilbert
Reviewed-by: SkySkimmer
2019-05-11Merge PR #10052: Cleanup the hypothesis conversion functionHugo Herbelin
Reviewed-by: herbelin
2019-05-10Split the hypothesis conversion check in a conversion + ordering check.Pierre-Marie Pédrot
2019-05-10Make the check flag of conversion functions mandatory.Pierre-Marie Pédrot
The current situation is a mess, some functions set it by default, but other no. Making it mandatory ensures that the expected value is the correct one.
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-07Improve field_simplify on fractions with constant denominatorthery
Before this patch, `x` was "simplified" to `x / 1`.
2019-05-04Merge PR #9926: [vernac] [ast] Make location info an attribute of vernaculars.Pierre-Marie Pédrot
Ack-by: SkySkimmer Ack-by: ejgallego Reviewed-by: ppedrot
2019-05-03Fix #10054: Numeral Notations without the ltac plugin.Pierre-Marie Pédrot
It was fairly easy, the plugin defined an argument that was only used in a vernacular extension. Thus marking it as VERNAC was enough not to link to Ltac.
2019-05-02Merge PR #10017: Exposing a change_no_check tacticPierre-Marie Pédrot
Ack-by: Zimmi48 Ack-by: herbelin Reviewed-by: ppedrot
2019-04-30Deprecating convert_concl_no_check.Hugo Herbelin
2019-04-30fix `simpl_rel` and notations, `{pred T}` alias, `nonPropType` interfaceGeorges Gonthier
** Changed definition of `simpl_rel` to `T -> `simpl_pred T`, so that `inE` will now expand `a \in r b`, when `r := [rel x y | R]` to `R{b/x, a/y}`, as the expanding coercion is now only inserted in the _last_ application. The old definition made it possible to have a `simpl_rel >-> rel` coercion that does not block expansion, but this can now be achieved more economically with the `Arguments … /.` annotation. ** Deleted the `[rel of P]` notation which is no longer needed with the new `simpl_rel` definition, and was broken anyway. ** Added `relpre f R` definition of functional preimage of a notation. ** `comp` and `idfun` are now proper definitions, using the `Arguments … /.` annotation to specify simplification on application. ** Added `{pred T}` syntax for the alias of `pred T` in the `pred_sort` coercion class; deleted the `pred_class` alias: one should either use `pred_sort` in `Coercion` declarations, or `{pred T}` in type casts. Used `{pred T}` as appropriate in localised predicate (`{in …, …}`) theory. Extended and corrected `pred` coercion internal documentation. ** Simplified the `predType` structure by removing the redundant explicit `mem_pred` subfield, and replacing it with an interlocked projection; deleted `mkPredType`, now replaced by `PredType`. ** Added (and extensively documented) a `nonPropType` interface matching types that do _not_ have sort `Prop`, and used it to remove the non-standard maximal implicits annotation on `Some_inj` introduced in #6911 by @anton-trumov; included `test-suite` entry for `nonPropType`. ** Documented the design of the four structures used to control the matching of `inE` and related predicate rewriting lemmas; added `test-suite` entry covering the `pred` rewriting control idioms. ** Used `only printing` annotations to get rid of token concatenation hacks. ** Fixed boolean and general `if b return t then …` notation so that `b` is bound in `t`. This is a minor source of incompatibility for misuses of this syntax when `b` is _not_ bound in `t`, and `(if b then …) : t` should have been used instead. ** Reserved all `ssreflect`, `ssrfun` and `ssrbool` notation at the top of the file, adding some printing boxes, and removing some spurious `[pred .. => ..]` reserved notation. ** Fixed parsing precedence and format of `<hidden n>` notation, and declared and put it in an explicit `ssr_scope`. ** Used module-and-functor idiom to ensure that the `simpl_pred T >- pred T` _and_ `simpl_pred T >-> {pred T}` coercions are realised by the _same_ Gallina constant. ** Updated `CREDITS`. The policy implied by this PR: that `{pred T}` should systematically be used as the generic collective predicate type, was implemented in MathComp math-comp/math-comp#237. As a result `simpl_pred >-> pred_sort` coercions became more frequent, as it turned out they were not, as incorrectly stated in `ssrbool` internal comments, impossible: while the `simplPredType` canonical instance does solve all `simpl_pred T =~= pred_sort ?pT` instances, it does _not_ solve `simpl_pred T =~= {pred T}`, and so the coercion will be used in that case. However it appeared that having two different coercion constants confused the SSReflect keyed matching heuristic, hence the fix introduced here. This has entailed some rearrangement of `ssrbool`: the large `Predicates` section had to be broken up as the module-functor idiom for aliasing coercions cannot be used inside a section.
2019-04-29Exposing a change_no_check tactic.Hugo Herbelin
2019-04-29Merge PR #9983: Hypothesis conversion allocates a single evarHugo Herbelin
Reviewed-by: gares Ack-by: herbelin
2019-04-29Merge PR #9651: [ssr] Add tactics under and overCyril Cohen
Reviewed-by: CohenCyril Ack-by: Zimmi48 Ack-by: erikmd Ack-by: gares Ack-by: jfehrle
2019-04-29[meta] [dune] Fix discrepancies in plugin namesEmilio Jesus Gallego Arias
We have some discrepancy with the package names for plugins in the META / Dune case. This PR fixes it. At some point there was a need for plugin package names having to be named as their directories. I think this is not true anymore, but taking the "dir_name == package_name" convention just in case.
2019-04-25[vernac] [ast] Make location info an attribute of vernaculars.Emilio Jesus Gallego Arias
This has been a mess for quite a while, we try to improve it.
2019-04-25Add a typing colon in the output of the Search ssreflect vernacularErik Martin-Dorel
See also PR math-comp/math-comp#73
2019-04-23Deprecate the *_no_check variants of conversion tactics.Pierre-Marie Pédrot
2019-04-23[ssr] set under's tactic argument at LEVEL 3Erik Martin-Dorel
So if the underlying tactic "contains a ;" one should actually write: under eq_bigl => i do [rewrite andb_idl; first by move/eqP->].
2019-04-23[ssr] under: optimization of the tactic for (under eq_bigl => *)Erik Martin-Dorel
so it acts "more naturally" like (under eq_bigl; [hnf|]); move=> [*|]. Also: replace "by over." in the doc example with "over."
2019-04-23[ssr] Define over as a rewrite rule & Merge 'Under[ _ ] notationsErik Martin-Dorel
as suggested by @gares, and: * Rename some Under_* terms for better uniformity; * Update & Improve minor details in the documentation.
2019-04-23[ssr] under: Fix the defective form ("=> [*|*]" implied) and its docErik Martin-Dorel
* Add tests accordingly.
2019-04-23[ssr] under: Add iff support in side-conditionsErik Martin-Dorel