aboutsummaryrefslogtreecommitdiff
path: root/proofs/logic.ml
AgeCommit message (Collapse)Author
2021-04-20More efficient variable membership check for Logic.move.Pierre-Marie Pédrot
Instead of repeatedly crawling the same hypothesis again and again we only iter the term once.
2021-04-20Do not construct intermediate lists in Logic.move.Pierre-Marie Pédrot
2021-04-20Specialize the code of Logic.move.Pierre-Marie Pédrot
2021-04-20Preserve the context_val structure as much as possible in Logic.move.Pierre-Marie Pédrot
Instead of going back and forth between the representations, we take advantage of the fact we always leave context suffixes untouched.
2021-01-04Fix behaviour of destruct after change of case representation.Pierre-Marie Pédrot
We ensure not to generate dummy beta-cuts in case branches generated by destruct. There was seemingly code trying to perform this but in an akward way.
2021-01-04Change the representation of kernel case.Pierre-Marie Pédrot
We store bound variable names instead of functions for both branches and predicate, and we furthermore add the parameters in the node. Let bindings are not taken into account and require an environment lookup for retrieval.
2020-07-01UIP in SPropGaëtan Gilbert
2020-06-24Remove the catchable-exception related functions.Pierre-Marie Pédrot
They were deprecated in 8.12.
2020-05-12Write the outermost part of the legacy refiner directly in the monad.Pierre-Marie Pédrot
2020-05-12Clean up the legacy refiner implementation.Pierre-Marie Pédrot
We avoid using global-access primitives and instead rely on purely functional passing of the relevant data. Namely, we replace the goal argument with its environment, and we pass the additional check parameter.
2020-05-12Remove legacy Refiner error constructors.Pierre-Marie Pédrot
They were not used anywhere anymore.
2020-05-12Wrap the legacy refiner type into the Logic API.Pierre-Marie Pédrot
2020-05-12Do not use Unsafe.to_constr for old refiner conclusion.Pierre-Marie Pédrot
This was useless, since we did not observe the difference on evars.
2020-03-18Update headers in the whole code base.Théo Zimmermann
Add headers to a few files which were missing them.
2020-02-06unsafe_type_of -> type_of in Logic.check_typabilityGaëtan Gilbert
2019-11-21[coq] Untabify the whole ML codebase.Emilio Jesus Gallego Arias
We also remove trailing whitespace. Script used: ```bash for i in `find . -name '*.ml' -or -name '*.mli' -or -name '*.mlg'`; do expand -i "$i" | sponge "$i"; sed -e's/[[:space:]]*$//' -i.bak "$i"; done ```
2019-06-17Update ml-style headers to new year.Théo Zimmermann
2019-05-10Fast-path for reordering of a single closed variable.Pierre-Marie Pédrot
Doesn't seem to matter in practice, but it doesn't hurt either.
2019-05-10Split the hypothesis conversion check in a conversion + ordering check.Pierre-Marie Pédrot
2019-05-10Logic.convert_hyp now takes an environment as an argument.Pierre-Marie Pédrot
This prevents having to call global functions, for no good reason. We also seize the opportunity to name the check argument.
2019-05-10Cleanup of Logic.convert_hyp.Pierre-Marie Pédrot
2019-04-05[api] [proofs] Remove dependency of proofs on interp.Emilio Jesus Gallego Arias
We perform some cleanup and remove dependency of `proofs/` on `interp/`, which seems logical. In fact, `interp` + `parsing` are quite self-contained, so if there is interest we could also make tactics to depend directly on proofs.
2018-12-12Merge PR #8965: Add `String Notation` vernacular like `Numeral Notation`Hugo Herbelin
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-11-28Factor out common code in numeral/string notationsJason Gross
As per https://github.com/coq/coq/pull/8965#issuecomment-441440779
2018-11-21[legacy proof engine] Remove some cruft.Emilio Jesus Gallego Arias
We remove the `Proof_types` file which was a trivial stub, we also cleanup a few layers of aliases. This is not a lot but every little step helps.
2018-11-19[proof] Provide better control of "open proofs" exceptions.Emilio Jesus Gallego Arias
This is inspired and an alternative to #8981. We consolidate the "open proof" exception, allowing clients to explicitly capture it and removing some ugly duplicated code in the way. The `Solve Obligation tac` semantics are then tweaked as to removed the wide-scope "catch-all" and indeed will now relay errors in `tac` as it will only absorb tactics that don't error but fail to close the goal such as `auto`. For the rest of the cases, we introduce a warning, and may move to a full error in later releases. We also remove an unnecessary `tclCOMPLETE` call to code that will actually call `close_proof`. In this case, it is better to delegate error management to the core function. Some error messages have changed [as we consolidate two error paths] so this PR may require adjustment in that area.
2018-10-31Renaming is_template_polymorphic -> is_template_polymorphic_ind.Hugo Herbelin
This emphasizes that it works only on inductive types. Also, the name is_template_polymorphic will be reused for a more general version.
2018-10-30Avoid passing dummy env to error printerMaxime Dénès
2018-10-26Cleanup evar_extra: remove evar_info's store and add maps to evar_mapMatthieu Sozeau
2018-10-14Passing env functionally in move_hyp and insert_decl_in_named_context.Hugo Herbelin
2018-09-19Fix Numeral Notations (2/4 - exceptions, usr_err)Jason Gross
Switch to using exceptions rather than user errors. This will be required because the machinery for printing constrs is not available in notation.ml, so we move the error message printing to himsg.ml instead. This is commit 2/4 in the fix for #8401.
2018-06-12[api] Misctypes removal: several moves:Emilio Jesus Gallego Arias
- move_location to proofs/logic. - intro_pattern_naming to Namegen.
2018-06-04Stronger invariants in unification signature.Pierre-Marie Pédrot
We use an option type instead of returning a pair with a boolean. Indeed, the boolean being true was always indicating that the returned value was unchanged. The previous API was somewhat error-prone, and I don't understand why it was designed this way in the first place.
2018-05-23Collecting Array.smart_* functions into a module Array.Smart.Hugo Herbelin
2018-03-29Preparing old-style refine from logic.ml to deal with "Cases" proofHugo Herbelin
terms whose branches are in eta-let-expanded canonical form. This is a hack intended to work only with destruct/case as they are currently implemented. Would not work with arbitrary proofs of the form "Cases(ci,p,c,[|...;b;...|] given to logic.ml for which b, if with Metas, has not the form of an eta-let-expanded Meta.
2018-02-27Update headers following #6543.Théo Zimmermann
2018-02-02Reductionops.nf_* now take an environment.Gaëtan Gilbert
2017-12-11[proof] Embed evar_map in RefinerError exception.Emilio Jesus Gallego Arias
The exception needs to carry aroud a pair of `env, sigma` so printing is correct. This gets rid of a few global calls, and it is IMO the right thing to do. While we are at it, we incorporate some fixes to a couple of additional printing functions missing the `env, sigma` pair.
2017-11-22[api] Deprecate Term destructors, move to ConstrEmilio Jesus Gallego Arias
We mirror the structure of EConstr and move the destructors from `Term` to `Constr`. This is a step towards having a single module for `Constr`.
2017-11-13[api] Another large deprecation, `Nameops`Emilio Jesus Gallego Arias
2017-11-06[api] Move structures deprecated in the API to the core.Emilio Jesus Gallego Arias
We do up to `Term` which is the main bulk of the changes.
2017-08-29Merge PR #830: Moving assert (the "Cut" rule) to new proof engineMaxime Dénès
2017-07-04Bump year in headers.Pierre-Marie Pédrot
2017-06-25Moving "assert" (internally "Cut") to the new proof engine.Hugo Herbelin
It allows in particular to have "Info" on tactic "assert" and derivatives not to give an "<unknown>".
2017-06-25Exporting general-purpose functions on goal contexts from "logic.ml" to ↵Hugo Herbelin
"tactics.ml". This is in preparation of move of "assert" from old to new proof engine.
2017-06-13Improving documentation of tactic "move" (report #4561).Hugo Herbelin
2017-06-02Drop '.' from CErrors.anomaly, insert it in argsJason Gross
As per https://github.com/coq/coq/pull/716#issuecomment-305140839 Partially using ```bash git grep --name-only 'anomaly\s*\(~label:"[^"]*"\s*\)\?\(Pp.\)\?(\(\(Pp.\)\?str\)\?\s*".*[^\.!]")' | xargs sed s'/\(anomaly\s*\(~label:"[^"]*"\s*\)\?\(Pp.\)\?(\(\(Pp.\)\?str\)\?\s*".*\s*[^\.! ]\)\s*")/\1.")/g' -i ``` and ```bash git grep --name-only ' !"' | xargs sed s'/ !"/!"/g' -i ``` The rest were manually edited by looking at the results of ```bash git grep anomaly | grep '\.ml' | grep -v 'anomaly\s*\(~label:"[^"]*"\s*\)\?\(Pp\.\)\?(\(\(Pp.\)\?str\)\?\s*".*\(\.\|!\)")' | grep 'anomaly\($\|[^_]\)' | less ```
2017-05-27[cleanup] Unify all calls to the error function.Emilio Jesus Gallego Arias
This is the continuation of #244, we now deprecate `CErrors.error`, the single entry point in Coq is `user_err`. The rationale is to allow for easier grepping, and to ease a future cleanup of error messages. In particular, we would like to systematically classify all error messages raised by Coq and be sure they are properly documented. We restore the two functions removed in #244 to improve compatibility, but mark them deprecated.
2017-05-03Merge PR#411: Mention template polymorphism in the documentation.Maxime Dénès