aboutsummaryrefslogtreecommitdiff
path: root/proofs/proofview.ml
AgeCommit message (Collapse)Author
2014-10-16Revert "Naming main goal "Main""Hugo Herbelin
(More thinking needed)
2014-10-16Refactoring proofview: make the definition of the logic monad polymorphic.Arnaud Spiwack
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.
2014-10-16Grab Existential Variables: restore the goal order from v8.4.Arnaud Spiwack
Changes in the implementation details had unwittingly changed the order in which Grab Existential Variables displayed the goals.
2014-10-16Proofview: cleanup: no more reference to Goal.goal.Arnaud Spiwack
2014-10-16Put evars remaining after a tactic on the shelf.Arnaud Spiwack
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.
2014-10-16Refine: proper scoping of the future goals.Arnaud Spiwack
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.
2014-10-16Goal: remove [advance] from the API.Arnaud Spiwack
Now [Goal] only contains a few helpers.
2014-10-16Proofview: remove unused [refresh_sigma] compatibility primitive.Arnaud Spiwack
2014-10-16Goal: remove some functions from the compatibility layer.Arnaud Spiwack
The rest will take more work.
2014-10-16Goal: remove most of the API (make [Goal.goal] concrete).Arnaud Spiwack
We are left with the compatibility layer and a handful of primitives which require some thought to move.
2014-10-16Expose Proofview.Refine.with_type in the API.Arnaud Spiwack
2014-10-16Proofview.Refine: remove the handle type, and simplify the API.Arnaud Spiwack
Now, usual function from Evarutil are used to define evars instead of the variants from Proofview.Refine. The [update] primitive which tried to patch the difference between pretyping functions and the refine primitive is now replaced by the identity function.
2014-10-16Move the handling of the principal evar from refine to evd.Arnaud Spiwack
See previous commit for more discussion. Changed the name from "main" to "principal" because I find "main" overused, and because the name was only introduced yesterday anyway.
2014-10-16Move the handling a new evars from the [Proofview.Refine] module to [Evd].Arnaud Spiwack
That way, everything in the code of pretying is made "refine"-aware. Making the abstraction stonger and integration of pretyping with interactive proof more direct. It might create goals in a slightly different goal order in the (user level) refine tactic. Because now, the [update] primitive which used to infer an order from an [evar_map] now has the order fixed by the successive declaration with [Evarutil.new_evar] (and similar). It probably coincides, though. Following a suggestion by Hugo.
2014-10-16Proofview.Refine: delay the marking of new evars as goals from [new_evar] to ↵Arnaud Spiwack
[refine]. This makes [new_evar] closer to be a mere wrapper around [Evarutil.new_evars]. Will allow restructuring of the refinement interface.
2014-10-16Proofview: small optimisation/simplification.Arnaud Spiwack
2014-10-13Adding a tactic which fails if one of the goals under focus is dependent in ↵Hugo Herbelin
another one.
2014-10-13Naming main goal "Main"Hugo Herbelin
2014-10-09Added support for having one subgoal inheriting the name of its father in ↵Hugo Herbelin
Refine.
2014-10-09A version of convert_concl and convert_hyp in new proof engine.Hugo Herbelin
Not very optimized though (if we apply convert_hyp on any hyp, a new evar will be generated for every different hyp...).
2014-10-06Make tclEFFECTS also update the env in the proof monadEnrico Tassi
2014-10-04A few Global.env removed.Hugo Herbelin
2014-09-29Merging some functions from evarutil.ml/evd.ml.Hugo Herbelin
- Removed collect_evars which does not consider instance (use evars_of_term instead). - Also removed evars_of_evar_info which did not filter context (use evars_of_filterered_evar_info instead). This is consistent with printing goal contexts in the filtered way. Anyway, as of today, afaics goals filters are trivial because (if I interpret evarutil.ml correctly), evars with non-trivial filter necessarily occur in a conv pb. Conversely, conv pbs being solved when tactics are called, there should not be an evar used as a goal with a non-trivial filter.
2014-09-27Removing the last use of tclSENSITIVE in favour of tclNEWGOALS.Pierre-Marie Pédrot
Most of the code from Goal.Refine and related was moved to the one file that was using it, wiz. tactics.ml. Some additional care should be taken to clean up even more the remaining code.
2014-09-26Adding a tclNEWGOALS primitive.Pierre-Marie Pédrot
2014-09-18Fixing strange evarmap leak in goals.Pierre-Marie Pédrot
Goals have to be refreshed when observed, because the evarmap may have changed between the moment where the goal was generated and the moment the goal is used.
2014-09-15Fix timing of evar-normalisation of goals in [Ftactic.nf_enter].Arnaud Spiwack
All goals were normalised up front, rather than normalised after the tactic acting on previous goal had the chance to solve some evars, which then appeared non-instantiated to tactics which do not work up to evar map (most of them).
2014-09-12While we don't have a clean alternative to Clenvtac, add a primitiveMatthieu Sozeau
for tclEVARS which might solve existing goals.
2014-09-12Add syntax [id]: to apply tactic to goal named id.Hugo Herbelin
2014-09-12Uniformisation of the order of arguments env and sigma.Hugo Herbelin
2014-09-12No plural for only one non existing focused goal.Hugo Herbelin
2014-09-12Fix source of initial goal.Hugo Herbelin
2014-09-08Display number of available goals in "incorrect number of goals" error message.Arnaud Spiwack
2014-09-08Add a tactic [revgoals] to reverse the list of focused goals.Arnaud Spiwack
2014-09-06Renaming goal-entering functions.Pierre-Marie Pédrot
1. Proofview.Goal.enter into Proofview.Goal.nf_enter. 2. Proofview.Goal.raw_enter into Proofview.Goal.enter. 3. Proofview.Goal.goals -> Proofview.Goals.nf_goals 4. Proofview.Goal.raw_goals -> Proofview.Goals.goals 5. Ftactic.goals -> Ftactic.nf_goals 6. Ftactic.raw_goals -> Ftactic.goals This is more uniform with the other functions of Coq.
2014-09-05At last a working clearbody!Pierre-Marie Pédrot
This time it should work at least as well as the previous version. The error messages were adapted a little. There is still a buggy behaviour when clearing lets in section, but this is mostly a problem of section handling. The v8.4 version of clearbody did exhibit the same behaviour anyway.
2014-09-04Ensuring the invariant that hypotheses and named context of the environment ofPierre-Marie Pédrot
Proofview goals coincide by always using the named context and discarding the hypotheses.
2014-09-04Proofview refiner is now type-safe by default.Pierre-Marie Pédrot
In order not to be too costly, there is an [unsafe] flag to be set if the tactic does not have to check that the partial proof term is well-typed (to be used with caution though). This patch breaks one [fix]-based example in the refine test-suite, but a huge development like CompCert still goes through.
2014-09-04Adding a tclUPDATE_ENV primitive and using it in in tclABSTRACT.Pierre-Marie Pédrot
Hopefully, this may fix some nasty bugs lying around.
2014-09-04Using goal-tactics to interpret arguments to idtac.Pierre-Marie Pédrot
This allows to write a multigoal idtac without having to resort to the hack of modifying the global environment tactic through tclIN_ENV, which may cause trouble if we want to modify it in a state-passing style.
2014-09-04Revert "Tactics: [tclENV] is now sensitive to [Proofview.Goal.enter]."Pierre-Marie Pédrot
This reverts commit 664b3cba1e8d326382ca981aa49fdf00edd429e6. Conflicts: proofs/proofview.ml
2014-09-03Putting back normalized goals when entering them.Pierre-Marie Pédrot
This should allow tactics after a Goal.enter not to have to renormalize them uselessly.
2014-08-28Simplification of the tclCHECKINTERRUPT tactic.Pierre-Marie Pédrot
2014-08-21Removing unused parts of the Goal.sensitive monad.Pierre-Marie Pédrot
Some legacy code remains to keep the newish refine tactic working, but ultimately it should be removed. I did not manage to do it properly though, i.e. without breaking the test-suite furthermore.
2014-08-19New primitive allowing to modify refine handles.Pierre-Marie Pédrot
2014-08-07Hypotheses in [Proofview.Goal.enter] were not normalised.Arnaud Spiwack
Fixes PTSF (though I have no idea what caused this bug to show up just yesterday).
2014-08-05Tactics: [tclENV] is now sensitive to [Proofview.Goal.enter].Arnaud Spiwack
When "entering" in a goal, the environment observed by [tclENV] is changed (in the scope of the goal) to be that of the goal. I'm not entirely sure it is the right semantics. But it allows to write tactics which are agnostic of whether they are run in a goal or not.
2014-08-04Cleaning of the new implementation of the tactic monad.Arnaud Spiwack
* Add comments in the code (mostly imported from Monad.v) * Inline duplicated module * Clean up some artifacts due to the extracted code. * [NonLogical.new_ref] -> [NonLogical.ref] (I don't even remember why I chose this name originally) * Remove the now superfluous [Proof_errors] module (which was used to define exceptions to be used in the extracted code). * Remove Monad.v
2014-08-01Add primtive [num_goal] to Proofview.Arnaud Spiwack
The [num_goal] tactic counts the number of focused goals.
2014-07-28Adding a tclBREAK primitive to the tactic monad.Pierre-Marie Pédrot