aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/proof.ml
Commit message (Collapse)AuthorAge
* Add an invariant on future goals in Proof.run_tactic.Gravatar Hugo Herbelin2018-03-08
| | | | | | | | | | | | | | | | | | | | | | | More precisely, we check that future goals retrieved in run_tactic have no given_up goals since given_up goals are supposed to be produced only by Proofview.given_up and put on the given_up store. Doing the same for the shelf does not work: there is a situation where run_tactic ends where the same goal is both in the comb and on the shelf. This is when calling "clear x" on a goal "x:A |- ?p:B(?q[x])" when the dependent goal "x:A |- ?q:C" is not on the shelf. Tactic "clear" creates "|- ?p':B(?q'[])" and "|- ?q':C". The "advance" thing sees that the new comb is now composed of ?p' and ?q' but ?q' is a future goal which is later collected on the shelf (which ?q' is also in the comb). I tried to remove this redundancy but apparently it is necessary. There is an example in HoTT (file Classes/theory/rational.v) which requires this redundancy. I did not investigate why: the dependent evar is created by ring as part of a big term. So, as a conclusion, I kept the redundancy.
* Merge PR #6855: Update headers following #6543.Gravatar Maxime Dénès2018-03-05
|\
* | [econstr] Continue consolidation of EConstr API under `interp`.Gravatar Emilio Jesus Gallego Arias2018-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit was motivated by true spurious conversions arising in my `to_constr` debug branch. The changes here need careful review as the tradeoffs are subtle and still a lot of clean up remains to be done in `vernac/*`. We have opted for penalize [minimally] the few users coming from true `Constr`-land, but I am sure we can tweak code in a much better way. In particular, it is not clear if internalization should take an `evar_map` even in the cases where it is not triggered, see the changes under `plugins` for a good example. Also, the new return type of `Pretyping.understand` should undergo careful review. We don't touch `Impargs` as it is not clear how to proceed, however, the current type of `compute_implicits_gen` looks very suspicious as it is called often with free evars. Some TODOs are: - impargs was calling whd_all, the Econstr equivalent can be either + Reductionops.whd_all [which does refolding and no sharing] + Reductionops.clos_whd_flags with all as a flag.
| * Update headers following #6543.Gravatar Théo Zimmermann2018-02-27
|/
* [proof] [api] Rename proof types in preparation for functionalization.Gravatar Emilio Jesus Gallego Arias2017-11-29
| | | | | In particular `Proof_global.t` will become a first class object for the upper parts of the system in a next commit.
* [proof] Attempt to deprecate some V82 parts of the proof API.Gravatar Emilio Jesus Gallego Arias2017-11-19
| | | | | | | | | | | | I followed what seems to be the intention of the code, with the original intention of remove the global imperative proof state. However, I fully fail to see why the new API is better than the old one. In fact the opposite seems the contrary. Still big parts of the "new proof engine" seem unfinished, and I'm afraid I am not the right person to know what direction things should take.
* [api] Insert miscellaneous API deprecation back to core.Gravatar Emilio Jesus Gallego Arias2017-11-13
|
* Bump year in headers.Gravatar Pierre-Marie Pédrot2017-07-04
|
* A fix to #5414 (ident bound by ltac names now known for "match").Gravatar Hugo Herbelin2017-06-09
| | | | | | | | | Also taking into account a name in the return clause and in the indices. Note the double meaning ``bound as a term to match'' and ``binding in the "as" clause'' when the term to match is a variable for all of "match", "if" and "let".
* [cleanup] Unify all calls to the error function.Gravatar Emilio Jesus Gallego Arias2017-05-27
| | | | | | | | | | | | | 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.
* Adding a printer for Proof.proof reflecting the focusing layout.Gravatar Hugo Herbelin2017-01-26
| | | | | | | | This is a modest contribution serving before all the purpose of displaying the focus stack and the shelf and give_up list. It does not print the sigma (while it could). Any improvements are welcome.
* Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-10-12
|\
| * Merge branch 'v8.5' into v8.6Gravatar Pierre-Marie Pédrot2016-10-12
| |\
| | * Fix bug #5123: mark all shelved evars unresolvableGravatar Matthieu Sozeau2016-10-11
| | | | | | | | | | | | | | | Previously, some splipped through and were caught by unrelated calls to typeclass resolution.
* | | Make the user_err header an optional parameter.Gravatar Emilio Jesus Gallego Arias2016-08-19
| | | | | | | | | | | | Suggested by @ppedrot
* | | Remove errorlabstrm in favor of user_errGravatar Emilio Jesus Gallego Arias2016-08-19
|/ / | | | | | | | | | | | | As noted by @ppedrot, the first is redundant. The patch is basically a renaming. We didn't make the component optional yet, but this could happen in a future patch.
* | errors.ml renamed into cErrors.ml (avoid clash with an OCaml compiler-lib ↵Gravatar Pierre Letouzey2016-07-03
| | | | | | | | | | | | module) For the moment, there is an Error module in compilers-lib/ocamlbytecomp.cm(x)a
* | Moving Refine to its proper module.Gravatar Pierre-Marie Pédrot2016-03-20
| |
* | Extruding the code for the Existential command from Proofview.Gravatar Pierre-Marie Pédrot2016-03-20
|/
* Update copyright headers.Gravatar Maxime Dénès2016-01-20
|
* Proof: suggest Admitted->Qed only if the proof is really complete (#4349)Gravatar Enrico Tassi2015-09-20
|
* STM/Univ: save initial univs (the ones in the statement) in Proof.proofGravatar Enrico Tassi2015-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | This makes the treatment of universe constraints/normalization more understandable in the Sync/Async case: - if one has to keep the constraints of the body and the type of a lemma separate, then equations coming from the body are kept (see: 866c41 ) - if they can be merge then the equations (substituted on both the body and type) can be removed (one of the sides occurs nowhere) The result is that, semantically, the constraints of a lemma do not depend on weather it was produced asynchronously (v->vio->vo, or in a CoqIDE session) or synchronously (v->vo). Still the internal representation of the constraints changes to accommodate an optimization (to reduce the size of the constraint set): - in the synchronous case (some) equations are substituted (in both the type and body), hence they can be completely dropped from the constraint set - in the asynchronous case (some) equations are substituted in the body only (the type is fixed once and for all before the equations are discovered/generated), hence these equations are necessary to relate the type and the (optimized) body and are hence kept in the constraint set
* Update headers.Gravatar Maxime Dénès2015-01-12
|
* Make sure the goals on the shelve are identified as goal and unresolvable ↵Gravatar Arnaud Spiwack2014-12-12
| | | | | | | for typeclasses. This was not the case for goals created at the end of the tactic by salvaging the [future_goals] from the evar map. It would cause typeclass resolution to try and solve these goals (if they have a class type) at each subsequent tactic. Fixes #3841.
* Fix (somewhat obsolete) [Existential] command, which conflicted with the shelf.Gravatar Arnaud Spiwack2014-11-28
| | | | | When an evar was instantiated it failed to disapear from the shelf. It had the consequence of stopping Qed from happening. Fixes test-suite/success/apply.v
* new: Optimize Proof, Optimize HeapGravatar Enrico Tassi2014-11-09
| | | | | | | | - drops all Defined entries from the evar map (applying the subst to the initial evar and the undefined evars types). - call Gc.compact Now the question is: where should these two commands be documented?
* Add [Info] command.Gravatar Arnaud Spiwack2014-11-01
| | | | Called with [Info n tac], runs [tac] and prints its info trace unfolding [n] level of tactic names ([0] for no unfolding at all).
* An API for info traces.Gravatar Arnaud Spiwack2014-11-01
|
* Evd.future_goals: forgot to revert the list in two places.Gravatar Arnaud Spiwack2014-10-23
|
* Proofview: move [list_goto] to the [CList] module.Gravatar Arnaud Spiwack2014-10-22
| | | | It is, after all, a generic function about lists.
* Proofview: remove a redundant primitive.Gravatar Arnaud Spiwack2014-10-22
|
* Proofview: move more functions to the Unsafe module.Gravatar Arnaud Spiwack2014-10-22
|
* Remove unused functions for side effects.Gravatar Arnaud Spiwack2014-10-22
|
* Refactoring proofview: make the definition of the logic monad polymorphic.Gravatar Arnaud Spiwack2014-10-16
| | | | | | Makes the monad more flexible as it will be easier to add new components to the concrete state of the tactic monad. The Proofview module is also organised in a more abstract way with dedicated submodules to access various parts of the state or writer.
* Put evars remaining after a tactic on the shelf.Gravatar Arnaud Spiwack2014-10-16
| | | | Uses the new architecture which allows to keep track of all new evars. The [future_goals] are flushed at the end of the tactics, the [principal_future_goal] is ignored.
* Goal: remove [advance] from the API.Gravatar Arnaud Spiwack2014-10-16
| | | | Now [Goal] only contains a few helpers.
* Factored out IDE goal structure.Gravatar Carst Tankink2014-10-01
| | | | | | | | | | | | The more structured goal record type of CoqIDE is also useful for other interfaces (in particular, for PIDE). To support this, the datatype was factored out to the Proof module. In addition, the record gains a type parameter, to allow interfaces to adapt the output to their needs. To accommodate this type, the Proof module also gains the map_structured_proof that takes a Proof.proof and a function on the individual goals (in the context of an evar map) and produces a structured goal based on the goal transformer.
* Small reorganisation in proof.ml.Gravatar Arnaud Spiwack2014-07-25
|
* Fail gracefully when focusing on non-existing goals with user commands.Gravatar Arnaud Spiwack2014-07-25
| | | Fixes bug #3457
* Proof_global.start_dependent_proof: properly threads the sigma through the ↵Gravatar Arnaud Spiwack2014-07-23
| | | | | telescope. Allows for a more refined notion of dependently generated initial goals.
* Transfering the initial goals from the proofview to the proof object.Gravatar Pierre-Marie Pédrot2014-04-07
| | | | They were just passed along in the tactics.
* Fixing backtrace registering of various tactic-related try-with blocks.Gravatar Pierre-Marie Pédrot2013-12-11
|
* Allow proofs to start with dependent goals.Gravatar Arnaud Spiwack2013-12-04
| | | I use a telescope to represent to goals, and let proofview.ml generate the appropriate existential variables.
* Allowing proofs starting with a non-empty evarmap.Gravatar ppedrot2013-11-04
| | | | git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@17055 85f007b7-540e-0410-9357-904b9bb8a0f7
* Update comments.Gravatar aspiwack2013-11-02
| | | | git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@17033 85f007b7-540e-0410-9357-904b9bb8a0f7
* Adds a tactic give_up.Gravatar aspiwack2013-11-02
| | | | | | Gives up on the focused goals. Shows an unsafe status. Unlike the admit tactic, the proof cannot be closed until the users goes back and solves these goals. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@17018 85f007b7-540e-0410-9357-904b9bb8a0f7
* Adds a shelve tactic.Gravatar aspiwack2013-11-02
| | | | | | The shelve tactic puts all the focused goals out of sight. They can be later recalled by the Unshelve command. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@17013 85f007b7-540e-0410-9357-904b9bb8a0f7
* The tactic [admit] exits with the "unsafe" status.Gravatar aspiwack2013-11-02
| | | | | | | | | | | | | It is highlighted in yellow in Coqide. The unsafe status is tracked throughout the execution of tactics such that nested calls to admit are caught. Many function (mainly those building constr with tactics such as typeclass related stuff, and Function, and a few other like eauto's use of Hint Extern) drop the unsafe status. This is unfortunate, but a lot of refactoring would be in order. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16977 85f007b7-540e-0410-9357-904b9bb8a0f7
* Getting rid of Goal.here, and all the related exceptions and combinators.Gravatar aspiwack2013-11-02
| | | | | | It was a bad idea. The new API based on lists seems more sensible. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16969 85f007b7-540e-0410-9357-904b9bb8a0f7
* Moving side effects into evar_map. There was no reason to keep anotherGravatar ppedrot2013-10-05
| | | | | | | | | | | | | | | | | | | state out of one we were threading all the way along. This should be safer, as one cannot forego side effects accidentally by manipulating explicitly the [sigma] container. Still, this patch raised the issue of badly used evar maps. There is an ad-hoc workaround (i.e. a hack) in Rewrite to handle the fact it uses evar maps in an unorthodox way. Likewise, that mean we have to revert all contrib patches that added effect threading... There was also a dubious use of side effects in their toplevel handling, that duplicates them, leading to the need of a rather unsafe List.uniquize afterwards. It should be investigaged. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16850 85f007b7-540e-0410-9357-904b9bb8a0f7