aboutsummaryrefslogtreecommitdiff
path: root/stm
AgeCommit message (Collapse)Author
2014-12-07Improving e11854569b8 on when to print goals in coqtop mode.Hugo Herbelin
2014-12-04Trying a new policy for when to automatically print goals (grantingHugo Herbelin
the non-verbose mode which I guess one wants to obey whatever interface is used, and restoring a policy ok for coqtop - maybe would need a change if obeying the local verbose flag is not ok for PG or Jedit).
2014-11-28fix compilation on ocaml 3.12 (Close: 3833)Enrico Tassi
2014-11-28STM: if a-p-always-delegate fetch states from parked worker on edit-atEnrico Tassi
If the async-proofs-always-delegate is passed, workers are killed only when the proof they computed is obsolete. If one jumps back to a state that was computed by the worker (and not the master) instead of (re)computing such state in the master ask the worker to send it back.
2014-11-27STM: hook called whenever a state is unreachableEnrico Tassi
Even indirectly, if it depends on another state that in turn failed.
2014-11-27async_queries_* merged with async_proofs_*Enrico Tassi
2014-11-27AsyncTaskQueue: parsin can also happen in the workers nowEnrico Tassi
2014-11-27STM: new API async_queryEnrico Tassi
When async_proofs_always_delegate is on, park proof workers and dispatch to them queries. This flips the current way of printing goals in PIDE base UIs: it is not the worker that prints all goals while coomputing the states (and the dies), it is the UI that asks for them when they are under the eyes of the user.
2014-11-27AsyncTaskQueue: API to park a workerEnrico Tassi
Generalize the old model by letting one park a worker and by letting the (parked) worker be picky about the tasks it picks up. The use of that is the following: a proof worker, while performing its "main" task (building a proof term) computes all the intermediate states but returns only its main result. One can ask the worker to hang around, and react to special tasks, like printing the goals of an intermediate state.
2014-11-27WorkerPool: API to move a worker from an active pool to a parking oneEnrico Tassi
This lets me have a pool of active workers of a fixed size, plus a parking area where workers that completed their job can stay holding their state (and eventually one can ask them to query such state afterwards).
2014-11-27TQueue: let reader be picky when popping an itemEnrico Tassi
E.g. let a worker pick up only jobs he is able to deal with.
2014-11-27STM: put hooks in key events to let plugins customize the feedbackEnrico Tassi
The default hook value is the one used by CoqIDE
2014-11-27Feedback: API cleaned up, documented and made user extensibleEnrico Tassi
2014-11-09new: Optimize Proof, Optimize HeapEnrico Tassi
- 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?
2014-11-03vernac_classifier: VernacDeclareTacticDefinition does not alter the parserEnrico Tassi
2014-11-03STM: code refactoringEnrico Tassi
This is mainly shuffling code around and removing internal refs that are not needed anymore.
2014-11-03STM: fix printing of goals when on a tty interfaceEnrico Tassi
2014-11-03Fix error reporting id on VtUnknown commandsEnrico Tassi
2014-11-01Add [Info] command.Arnaud Spiwack
Called with [Info n tac], runs [tac] and prints its info trace unfolding [n] level of tactic names ([0] for no unfolding at all).
2014-10-31Feedback message: hold extra info to help routingEnrico Tassi
PIDE based GUIs can take advantage of multiple panels and get some feedback routed there. E.g. query panel
2014-10-31STM: new worker for queriesEnrico Tassi
With the options -async-queries-always-delegate queries are always delegated to a worker process (Eval, Check, ...). Users of PIDE based UIs (in Denmark) reported that the current behavior of processing query synchronously is rather unexpected when one is used to get proofs processed asynchronously. Non instantaneous queries are part of many scripts and are there as "tests" for testing the execution of recursive functions. A standard proof script shape in an ongoing work by Appel and Bengtson is made of blocks like: - recursive function definition, - some tests, - some proofs And one cannot quickly jump over the tests (only the proofs). Enclosing the queries into dummy proofs to recover a reactive UI is just annoying. Hence this patch. Currently CoqIDE is not able to integrate the asynchronous feedback of the query workers into the document, hence if one passes the option to CoqIDE one only gets a boolean out of queries (processed/error).
2014-10-31STM: reorganize code and file namesEnrico Tassi
- proofworkertop to deal with proof tasks - tacworkertop to deal with par: tactics - queryworkertop to deal with queries (next commit)
2014-10-30Fix backtracking issue in Defined (Close 3780)Enrico Tassi
2014-10-27Fixes for PG (Close 3763, 3770)Enrico Tassi
- Show does not print the goal twice - Undo is considered as part of the document when PG mode (bug introduced when Undo was said not to be part of the document in coqtop mode).
2014-10-25This commit introduces changes in induction and destruct.Hugo Herbelin
The main change is that selection of subterm is made similar whether the given term is fully applied or not. - The selection of subterm now works as follows depending on whether the "at" is given, of whether the subterm is fully applied or not, and whether there are incompatible subterms matching the pattern. In particular, we have: "at" given | subterm fully applied | | incompatible subterms | | | Y Y - it works like in 8.4 Y N - this was broken in 8.4 ("at" was ineffective and it was finding all subterms syntactically equal to the first one which matches) N Y Y it now finds all subterms like the first one which matches while in 8.4 it used to fail (I hope it is not a too risky in-draft for a semantics we would regret...) (e.g. "destruct (S _)" on goal "S x = S y + S x" now selects the two occurrences of "S x" while it was failing before) N Y N it works like in 8.4 N N - it works like in 8.4, selecting all subterms like the first one which matches - Note that the "historical" semantics, when looking for a subterm, to select all subterms that syntactically match the first subterm to match the pattern (looking from left to right) is now internally called "like first". - Selection of subterms can now find the type by pattern-matching (useful e.g. for "induction (nat_rect _ _ _ _)") - A version of Unification.w_unify w/o any conversion is used for finding the subterm: it could be easily replaced by an other matching algorithm. In particular, "destruct H" now works on a goal such as "H:True -> x<=y |- P y". Secondary change is in the interpretation of terms with existential variables: - When several arguments are given, interpretation is delayed at the time of execution - Because we aim at eventually accepting "edestruct c" with unresolved holes in c, we need the sigma obtained from c to be an extension of the sigma of the tactics, while before, we just type-checked c independently of the sigma of the tactic - Finishing the resolution of evars (using type classes, candidates, pending conversion problems) is made slightly cleaner: it now takes three states: a term is evaluated in state sigma, leading to state sigma' >= sigma, with evars finally solved in state sigma'' >= sigma'; we solve evars in the diff of sigma' and sigma and report the solution in sigma'' - We however renounce to give now a success semantics to "edestruct c" when "c" has unresolved holes, waiting instead for a decision on what to do in the case of a similar eapply (see mail to coqdev). An auxiliary change is that an "in" clause can be attached to each component of a "destruct t, u, v", etc. Incidentally, make_abstraction does not do evar resolution itself any longer.
2014-10-22Goal printing made uniform: always done in STM (close 3585)Enrico Tassi
Goal printing was partially broken. Some commands in vernacentries were printing, but not all of them. Moreover an unlucky combination of `Flags.verbosely (fun () -> interp "Set Silent")` was making the silent flag not settable anymore. Now STM always print the open goals after a command when run in interactive mode via coqtop or emacs. More modern GUI do ask for the goals.
2014-10-22Lemmas/Pfedit: use full evar_map instead of universe contexts to start proofs.Arnaud Spiwack
As simple as this looks, there's been some quite subtle issues in doing this modification, there may be bugs left.
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-15Fix -async-proofs-always-delegate (close 3740)Enrico Tassi
2014-10-13Stm: more precise representation of nested proofsEnrico Tassi
This fixes the bug reported by Hugo: 2) Goal True. 3-4) Definition a:=0. 5) Goal True True. (* jumped back to 3 (on master) instead of 4 (on the outermost proof) *)
2014-10-13STM: primitives to snapshot a .vi while in interactive modeEnrico Tassi
2014-10-13TQueue: new primitive to take a snapshot of the queueEnrico Tassi
2014-10-13STM: simplify how the term part of a side effect is retrievedEnrico Tassi
Now the seff contains it directly, no need to force the future or to hope that it is a Direct opaque proof.
2014-10-13library/opaqueTables: enable their use in interactive modeEnrico Tassi
Before this patch opaque tables were only growing, making them unusable in interactive mode (leak on Undo). With this patch the opaque tables are functional and part of the env. I.e. a constant_body can point to the proof term in 2 ways: 1) directly (before the constant is discharged) 2) indirectly, via an int, that is mapped by the opaque table to the proof term. This is now consistent in batch/interactive mode This is step 0 to make an interactive coqtop able to dump a .vo/.vi
2014-10-01STM: report the (structured) goals as XMLCarst Tankink
The leafs of the XML trees are still pretty-printed strings, but this could be refined later on.
2014-10-01Add additional location information to AST XMLs.Carst Tankink
2014-09-30Add syntax for naming new goals in refine: writing ?[id] instead of _Hugo Herbelin
will name the goal id; writing ?[?id] will use the first fresh name available based with prefix id. Tactics intro, rename, change, ... from logic.ml now preserve goal name; cut preserves goal name on its main premise.
2014-09-29XML pretty printing for AST (work by François Poulain, project DoCoq)Enrico Tassi
It is not 100% complete, but the main part is there.
2014-09-29Notation: option to attach extra pretty printing rules to notationsEnrico Tassi
so that one can retrieve them and pass them to third party tools (i.e. print the AST with the notations attached to the nodes concerned). Available syntax: - all in one: Notation "a /\ b" := ... (format "...", format "latex" "#1 \wedge #2"). - a posteriori: Format Notation "a /\ b" "latex" "#1 \wedge #2".
2014-09-16Undo prints only if coqtop || emacsEnrico Tassi
2014-09-12Uniformisation of the order of arguments env and sigma.Hugo Herbelin
2014-09-10VernacExtend does not dispatch on type anymore.Pierre-Marie Pédrot
2014-09-09Marshalling errors should be bold and red (should never happen actually)Enrico Tassi
2014-09-09A marshalling failure does not make a worker `OldEnrico Tassi
2014-09-09Back: print subgoals as in 8.4 (Close: 3585)Enrico Tassi
2014-09-09BackTo not part of the doc when used by emacsEnrico Tassi
Used to work "by chance".
2014-09-09Undo: if the ui is coqtop (command line) then Undo is not part of the doc.Enrico Tassi
2014-09-09Dropped proofs (Abort) are evaluated synchronously (Closes: 3550, 3407)Enrico Tassi
2014-09-04Remove [Infer] option of records.Arnaud Spiwack
Dead code formerly used by the now defunct [autoinstances].
2014-09-04Print [Variant] types with the keyword [Variant].Arnaud Spiwack
Involves changing the [mind_finite] field in the kernel from a bool to the trivalued type [Decl_kinds.recursivity_kind]. This is why so many files are (unfortunately) affected. It would not be very surprising if some bug was introduced.