aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/proofview.ml
Commit message (Collapse)AuthorAge
* Update headers.Gravatar Maxime Dénès2015-01-12
|
* Fixed and extend bullet related info/error messages. + doc.Gravatar Pierre Courtieu2015-01-08
| | | | | Had to put some hook in the handler of Proofview.NoSuchgoals. Documentation updated. CHANGE updated.
* Getting rid of Exninfo hacks.Gravatar Pierre-Marie Pédrot2014-12-16
| | | | | | | | | | | | | | | | | | | | Instead of modifying exceptions to wear additional information, we instead use a dedicated type now. All exception-using functions were modified to support this new type, in particular Future's fix_exn-s and the tactic monad. To solve the problem of enriching exceptions at raise time and recover this data in the try-with handler, we use a global datastructure recording the given piece of data imperatively that we retrieve in the try-with handler. We ensure that such instrumented try-with destroy the data so that there may not be confusion with another exception. To further harden the correction of this structure, we also check for pointer equality with the last raised exception. The global data structure is not thread-safe for now, which is incorrect as the STM uses threads and enriched exceptions. Yet, we splitted the patch in two parts, so that we do not introduce dependencies to the Thread library immediatly. This will allow to revert only the second patch if ever we switch to OCaml-coded lightweight threads.
* 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.
* Exporting store of goals so that new_evar in convert, intro, etc. canGravatar Hugo Herbelin2014-12-07
| | | | | | propagate it. This allows C-zar to continue to work. Don't know if it is the best way to do it.
* Occur-check in refine.Gravatar Arnaud Spiwack2014-12-04
| | | | | | | | | | The occur check is done even if the flag [unsafe] is set to true. The rational is that a tactic cannot control where it takes pieces of terms from (and hence will not generally make terms which pass the occur-check), and it would be painful to ask every tactic which takes a term as an argument to do an occur check before [refine]. I reused the same error than used by unification. It gives a pretty nice error message. An alternative would be to have a dedicated error with pretty much the same error message. I'm not sure which is best, so I went for the simplest one. The same check is done in the compatibility layer. Fixes a reported bug which I cannot locate for some reason.
* Refine primitive: [unsafe] is now true by default.Gravatar Arnaud Spiwack2014-12-04
| | | Generally, tactics build type-correct terms. A safe refine is hence a waste of time (somtimes a significant one). The safe option is kept for specific purposes such as debugging, or some weird interaction with the pretyper and universes which still seemed to hold last time I checked (used by the user-level refine tactic).
* Some refactoring following previous commit.Gravatar Arnaud Spiwack2014-12-04
| | | Just hoisted a definition out of a loop. Not that this part of the code is time critical at all. I just feel it's cleaner.
* Better implementation of 4a858a51322f2dd488b02130ca82ebcc4dc9ca35.Gravatar Arnaud Spiwack2014-12-04
| | | Instead of filtering over the goals we have just creating and running through the evar_map, fetching the evar_info (that we've just created), and marking it as unresolvable, the goals are just created unresolvable. Which is probably what I should have done from the beginning, but it had escaped my notice during my code-cleaning session.
* Factoring 2ee213b824dda48c3fe60e95316daf09f07e8075.Gravatar Arnaud Spiwack2014-12-04
| | | I can't say I condone having unsafe primitives which are not used anywhere. But if they are to be there, let's make sure they don't duplicate code.
* Fixing bug #3682.Gravatar Pierre-Marie Pédrot2014-11-30
| | | | | The function initializing proofviews were marking all evars as non-resolvables for the proofview, while only goal evars ought to be.
* Adding missing unsafe primitives to Proofview.Gravatar Pierre-Marie Pédrot2014-11-30
|
* Tactic primitives: missing [advance] lead to spurious dangling goals.Gravatar Arnaud Spiwack2014-11-28
| | | Closes #3801.
* Exporting a primitive allowing to run completely the tactic monad.Gravatar Pierre-Marie Pédrot2014-11-22
|
* 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?
* Plural and singular forms in error messages.Gravatar Hugo Herbelin2014-11-02
|
* Info: do not record info trace unless needed.Gravatar Arnaud Spiwack2014-11-01
|
* Info: print a name for the primitive tactics in [Proofview].Gravatar Arnaud Spiwack2014-11-01
| | | | | | The name is chosen in accordance to Ltac's syntax. In particular [refine] prints as Ltac's refine, which is not entirely correct (Ltac's refine does some βι-reduction after refinement). Maybe it would be better to give make it clear that it is a different refine. Still in refine, the constr is printed without taking into account the new evars, which, apart from potentially getting the order of the goals wrong, prints new evars as ?x instead of ?[x]. A printer for terms with new evars will be necessary. In the case of [V82.tactic], the name is just <unknown> because there is no way to retrieve any information. It won't appear in the first level of info in Ltac, however, if the user would require a deeper trace, he may see internal tactics (Tactics defined with TACTIC EXTEND also have weird, unparsable, internal names).
* Info: dispatching-branches are declared as such in the info trace.Gravatar Arnaud Spiwack2014-11-01
| | | | Hence dispatches are printed as dispatches rather than sequences.
* 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
|
* VarInstance are also goals.Gravatar Hugo Herbelin2014-10-25
|
* Monad: change the error managing of two-list combinators.Gravatar Arnaud Spiwack2014-10-23
| | | Otherwise I risked catching errors from the argument functions when I wanted to catch size mismatch to add information to errors.
* Proofview: forgot to change an exception after refactoring in ( ↵Gravatar Arnaud Spiwack2014-10-23
| | | | 9f51aafebd5f3a00dabfe056772a300830b3c430 )
* Oversight in ce260a0db279ce09dda70e079ae3c35b49f05ec4 (Proper scoping of ↵Gravatar Arnaud Spiwack2014-10-22
| | | | | future goals). Fixes #3757. Thanks to Hugo for helping pinpoint the issue.
* Proofview: documentation and re-ordering.Gravatar Arnaud Spiwack2014-10-22
|
* Split [Proofview] into a file where the basic operations on the state are ↵Gravatar Arnaud Spiwack2014-10-22
| | | | | | defined and the file providing the primitives. The datatypes are defined in [Proofview_monad], previous [Proofview_monad] is now called [Logic_monad] since it is more generic since the refactoring.
* Make names in [Proofview_monad] more uniform.Gravatar Arnaud Spiwack2014-10-22
| | | | ret -> return, bind -> (>>=), etc… So that monads expose a [Monad.S] signature. Also Proofview now exposes the [Monad.S] signature directly rather than in a [Monad.S] subdirectory.
* Proofview: remove and inline [on_advance] function.Gravatar Arnaud Spiwack2014-10-22
| | | | [on_advance] gave almost no gain in readability, while costing a closure.
* Proofview: add a lens for the evar_map and factor some code.Gravatar Arnaud Spiwack2014-10-22
|
* Proofview: use an iter-like combinator rather than a fold_left-like one for ↵Gravatar Arnaud Spiwack2014-10-22
| | | | | | dispatch. Leads to clearer an more efficient code.
* Add more primitives to the [Monad.Make] arguments.Gravatar Arnaud Spiwack2014-10-22
| | | | For optimisation purposes.
* Improve readability the "lenses" in Proofview, using interfaces.Gravatar Arnaud Spiwack2014-10-22
|
* Proofview: clean up code a little.Gravatar Arnaud Spiwack2014-10-22
|
* Proofview: move [list_goto] to the [CList] module.Gravatar Arnaud Spiwack2014-10-22
| | | | It is, after all, a generic function about lists.
* Proofview: replace the functions iter_list and iter_list2 by generic monadic ↵Gravatar Arnaud Spiwack2014-10-22
| | | | combinators.
* Proofview: clean up commented out code.Gravatar Arnaud Spiwack2014-10-22
|
* Proofview: remove a redundant primitive.Gravatar Arnaud Spiwack2014-10-22
|
* Proofview: move more functions to the Unsafe module.Gravatar Arnaud Spiwack2014-10-22
|
* Proofview: split [V82] module into [Unsafe] and [V82].Gravatar Arnaud Spiwack2014-10-22
| | | | The Unsafe module is for unsafe tactics which cannot be done without anytime soon. Whereas V82 indicates a function which we want to get rid of and that shouldn't be used in a new function.
* Proofview: factor init and dependent_init.Gravatar Arnaud Spiwack2014-10-22
|
* Remove unused functions for side effects.Gravatar Arnaud Spiwack2014-10-22
|
* Revert "Naming main goal "Main""Gravatar Hugo Herbelin2014-10-16
| | | | (More thinking needed)
* 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.
* Grab Existential Variables: restore the goal order from v8.4.Gravatar Arnaud Spiwack2014-10-16
| | | | Changes in the implementation details had unwittingly changed the order in which Grab Existential Variables displayed the goals.
* Proofview: cleanup: no more reference to Goal.goal.Gravatar Arnaud Spiwack2014-10-16
|
* 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.
* Refine: proper scoping of the future goals.Gravatar Arnaud Spiwack2014-10-16
| | | | In my first attempt I just dropped all future goals before starting a refinement. This was done for simplicity but is incorrect in general. In this version the future goals which are not introduced by the particular instance of refine are kept for future use.
* Goal: remove [advance] from the API.Gravatar Arnaud Spiwack2014-10-16
| | | | Now [Goal] only contains a few helpers.
* Proofview: remove unused [refresh_sigma] compatibility primitive.Gravatar Arnaud Spiwack2014-10-16
|