aboutsummaryrefslogtreecommitdiff
path: root/engine/proofview.ml
AgeCommit message (Collapse)Author
2018-03-27Adding informative variant of shelve_unifiable returning set of shelved evars.Hugo Herbelin
2018-03-08A comment in Proofview.with_shelf.Hugo Herbelin
2018-03-08Adding tclPUTGIVENUP/tclPUTSHELF in Proofview.Unsafe.Hugo Herbelin
Adding also tclSETSHELF/tclGETSHELF by consistency with tclSETGOALS/tclGETGOALS. However, I feel that this is too low-level to be exported as a "tcl". Doesn't a "tcl" mean that it is supposed to be used by common tactics? But is it reasonable that a common tactic can change and modify comb and shelf without passing by a level which e.g. checks that no goal is lost in the process. So, I would rather be in favor of removing tclSETGOALS/tclGETGOALS which are anyway aliases for Comb.get/Comb.set. Conversely, what is the right expected level of abstraction for proofview.ml?
2018-03-08Proof engine: using save_future_goal when relevant.Hugo Herbelin
2018-03-08Proof engine: consider the pair principal and future goals as an entity.Hugo Herbelin
2018-03-05Tweak comments to fix ocamldoc errorsmrmr1993
2018-03-05Merge PR #6855: Update headers following #6543.Maxime Dénès
2018-03-04Proofview: V82.tactic option to not normalize evarsEnrico Tassi
2018-03-04proofview: debug API to print a goalEnrico Tassi
2018-02-27Update headers following #6543.Théo Zimmermann
2018-02-20proofview: goals come with a stateEnrico Tassi
2018-02-12[engine] Remove ghost parameter from `Proofview.Goal.t`Emilio Jesus Gallego Arias
In current code, `Proofview.Goal.t` uses a phantom type to indicate whether the goal was properly substituted wrt current `evar_map` or not. After the introduction of `EConstr`, this distinction should have become unnecessary, thus we remove the phantom parameter from `'a Proofview.Goal.t`. This may introduce some minor incompatibilities at the typing level. Code-wise, things should remain the same. We thus deprecate `assume`. In a next commit, we will remove normalization as much as possible from the code.
2018-01-31Proofview: enter_one: add __LOC__ argument to get relevant error msgEnrico Tassi
The type discipline of the tactic monad does not distinguish between mono-goal and multi-goal tactics. Unfortunately enter_one "asserts false" if called on 0 or > 1 goals. The __LOC__:string argument can be used to make the error message more helpful (since the backtrace is pointless inside the monad). The intended usage is "Goal.enter_one ~__LOC__ (fun gl -> ..". The __LOC__ variable is filled in by the OCaml compiler with the current file name and line number.
2017-12-22Merge PR #6222: Share computation of unifiable evarsMaxime Dénès
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-21Experimenting with a fine-grained cache for undefined evars in evinfos.Pierre-Marie Pédrot
2017-11-21Fix #6204: `refine` is exponential in the number of fresh evars that it creates.Pierre-Marie Pédrot
It is actually polynomial with a big exponent, probably quartic. This was due to the Proofview.unifiable algorithm that kept recomputing the free evars of an evar info. We share the computation instead. This does not make the contrived example compile in a reasonable amount of time, but it does make smaller instances compile way quicker than before. Indeed, the example is essentially quadratic in size as all evars refer to the previously defined ones in their signature.
2017-09-27Fixing an old bug in collecting evars with cleared context.Hugo Herbelin
The function Proofview.undefined was collecting twice the evars that had advanced. Consequently, the functions Proofview.unshelve and Proofview.with_shelf were possibly doing the same.
2017-07-27deprecate Pp.std_ppcmds type aliasMatej Košík
2017-07-07Merge PR #816: In enter_one, not having exactly one goal is a fatal error of ↵Maxime Dénès
the monad.
2017-07-04Bump year in headers.Pierre-Marie Pédrot
2017-06-23In enter_one, not having exactly one goal is a fatal error of the monad.Hugo Herbelin
Pointed out by PMP.
2017-06-06Remove the Sigma (monotonous state) API.Maxime Dénès
Reminder of (some of) the reasons for removal: - Despite the claim in sigma.mli, it does *not* prevent evar leaks, something like: fun env evd -> let (evd',ev) = new_evar env evd in (evd,ev) will typecheck even with Sigma-like type annotations (with a proof of reflexivity) - The API stayed embryonic. Even typing functions were not ported to Sigma. - Some unsafe combinators (Unsafe.tclEVARS) were replaced with slightly less unsafe ones (e.g. s_enter), but those ones were not marked unsafe at all (despite still being so). - There was no good story for higher order functions manipulating evar maps. Without higher order, one can most of the time get away with reusing the same name for the updated evar map. - Most of the code doing complex things with evar maps was using unsafe casts to sigma. This code should be fixed, but this is an orthogonal issue. Of course, this was showing a nice and elegant use of GADTs, but the cost/benefit ratio in practice did not seem good.
2017-05-30Support for using type information to infer more precise evar sources.Hugo Herbelin
This allows a better control on the name to give to an evar and, in particular, to address the issue about naming produced by "epose proof" in one of the comment of Zimmi48 at PR #248 (see file names.v). Incidentally updating output of Show output test (evar numbers shifted).
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-24Merge branch 'trunk' into located_switchEmilio Jesus Gallego Arias
2017-04-25Fix an optimization failure in tclPROGRESS.Pierre-Marie Pédrot
Due to code reworking, a fastpath got anihilated because the slow path was computed altogether. We now only compute the slow check whenever the quick one fails.
2017-04-25[location] Remove Loc.ghost.Emilio Jesus Gallego Arias
Now it is a private field, locations are optional.
2017-04-20"tclENV" is sexier, use it instead of "Env.get"Matej Kosik
2017-04-20reduce syntactic noiseMatej Kosik
2017-02-14Merge branch 'master'.Pierre-Marie Pédrot
2017-02-14Do not ask for a normalized goal to get hypotheses and conclusions.Pierre-Marie Pédrot
This is now useless as this returns evar-constrs, so that all functions acting on them should be insensitive to evar-normalization.
2017-02-14Definining EConstr-based contexts.Pierre-Marie Pédrot
This removes quite a few unsafe casts. Unluckily, I had to reintroduce the old non-module based names for these data structures, because I could not reproduce easily the same hierarchy in EConstr.
2017-02-14Evar-normalizing functions now act on EConstrs.Pierre-Marie Pédrot
2017-02-14Proofview.Goal primitive now return EConstrs.Pierre-Marie Pédrot
2017-02-14Tactics API using EConstr.Pierre-Marie Pédrot
2017-02-14Pretyping API using EConstr.Pierre-Marie Pédrot
2017-02-10Proofview: tclINDEPENDENTLEnrico Tassi
2017-01-09Merge remote-tracking branch 'github/pr/350' into trunkMaxime Dénès
Was PR#350: tclDISPATCH: more informative error message
2016-11-18Merge branch 'v8.6'Pierre-Marie Pédrot
2016-11-08tclDISPATCH: more informative error messageArnaud Spiwack
"expected _n_ tactics" -> "exected _n_ tactics, was given _k_". Also affect other similar tacticals from `Proofview`. I used that for debugging once, I thought I might as well propose it for mergeing.
2016-10-26COMMENT: Proofview.entryMatej Kosik
2016-10-24Merge branch 'v8.6'Pierre-Marie Pédrot
2016-10-22Unification constraint handling (#4763, #5149)Matthieu Sozeau
Refine fix for bug #4763, fixing #5149 Tactic [Refine.solve_constraints] and global option Adds a new multi-goal tactic [Refine.solve_constraints] that forces solving of unification constraints and evar candidates to be solved. run_tactic now calls [solve_constraints] at every [.], preserving (mostly) the 8.4/8.5 behavior of tactics. The option allows to unset the forced solving unification constraints at each ".", letting the user control the places where the use of heuristics is done. Fix test-suite files too.
2016-10-21Oops, my bad, didn't expect a merge issue!Matthieu Sozeau
2016-10-21Merge remote-tracking branch 'gforge/v8.5' into v8.6Matthieu Sozeau
2016-10-12Merge branch 'v8.6'Pierre-Marie Pédrot
2016-10-12Merge branch 'v8.5' into v8.6Pierre-Marie Pédrot
2016-10-12Merge branch 'v8.5' into v8.6Pierre-Marie Pédrot
2016-09-23Merge branch 'v8.6'Pierre-Marie Pédrot