aboutsummaryrefslogtreecommitdiffhomepage
path: root/stm/stm.mli
Commit message (Collapse)AuthorAge
* [stm] Remove unused legacy stm interface.Gravatar Emilio Jesus Gallego Arias2017-02-15
|
* [stm] Reenable Show Script command.Gravatar Emilio Jesus Gallego Arias2017-02-15
| | | | | | | | | | We extend `Stm.vernac_interp` so it can handle the commands it should by level. This reenables `Show Script` handling, and this interpretation function should handle more commands in the future such as Load. However note that we must first refactor the parsing state handling a bit and remove the legacy `Stm.interp` before that.
* [stm] Break stm/toplevel dependency loop.Gravatar Emilio Jesus Gallego Arias2017-02-15
| | | | | | | | | | | | | | | | | | Currently, the STM, vernac interpretation, and the toplevel are intertwined in a mutual dependency that needs to be resolved using imperative callbacks. This is problematic for a few reasons, in particular it makes the interpretation of commands that affect the document quite intricate. As a first step, we split the `toplevel/` directory into two: "pure" vernac interpretation is moved to the `vernac/` directory, on which the STM relies. Test suite passes, and only one command seems to be disabled with this approach, "Show Script" which is to my understanding obsolete. Subsequent commits will fix this and refine some of the invariants that are not needed anymore.
* [stm] Fix record field name clash.Gravatar Emilio Jesus Gallego Arias2016-10-18
| | | | | | | | | | PR#173 introduced a record field name clash in `stm.mli`, with duplicate fields `start/stop` for the types `focus` and `static_block_declaration`. We fix by renaming the younger ones (as to minimize code incompatibilities), but other options are possible/could be preferred, however they would be quite more invasive so I think they should be postponed for the day the Stm API is cleaned up.
* STM: proof block detection made optional + simple testGravatar Enrico Tassi2016-06-06
|
* STM: proof block detection/error resilience APIGravatar Enrico Tassi2016-06-06
| | | | | | | | | | | | This commit introduces the concept of proof blocks that are resilient to errors. They are represented as ErrorBound boxes in the STM document with the topological invariant that they never overlap. The detection and error recovery of ErrorBound boxes is defined outside the STM. One can define a box by providing a function to detect it statically by crawling the parsed document and a function to recover from an error at run time.
* STM: invalid states are first class citizensGravatar Enrico Tassi2016-06-06
| | | | | | | | | | | | | | | A state in the cache (document node) is now one of "Empty | Error | Valid". This paves the way to commands/blocks-of-commands resilient-to/confining errors: one can catch and "ignore" the exception obtained by reaching the previous state and do something sensible, like running anyway the command or skipping until the end of an error-confining block is reached. Invalid states carry an enriched exception with the safe_id attached, so that if one edits_at or observe them gets a safe place to land (CoqIDE needs such piece of info). Little API change in Stm.state_of_id now returning a `Error variant for the new kind of state.
* Move serialization functions out of StmGravatar Emilio Jesus Gallego Arias2016-06-02
| | | | | | | | | Serialization should be specific to each particular backend, so we let the Stm clients choose how the send the nodes. This should be quite safe to pull in. Test suite passes. Related to #180
* typosGravatar Enrico Tassi2016-05-23
|
* Merge branch 'v8.5'Gravatar Pierre-Marie Pédrot2016-01-21
|\
| * Hooks for a third-party XML plugin. Contributed by Claudio Sacerdoti Coen.Gravatar Maxime Dénès2016-01-15
| |
* | CLEANUP: removing unnecessary wrapperGravatar Matej Kosik2016-01-11
|/
* Add a way to get the right fix_exn in external vernacular commandsGravatar Matthieu Sozeau2015-10-30
| | | | involving Futures.
* STM: Added functions for saving and restoring the internal stateGravatar Alec Faithfull2015-10-09
| | | | PIDEtop needs these to implement its new transaction mechanism
* STM: Pass exception information to unreachable_state_hook functionsGravatar Alec Faithfull2015-10-09
| | | | | This lets hooks treat different exceptions in different ways; in particular, user interrupts can now be safely ignored
* STM: for PIDE based UIs, edit_at requires no Reach.known_stateGravatar Enrico Tassi2015-10-08
|
* Hook when state arrives on master.Gravatar Enrico Tassi2015-01-07
|
* rename: vi -> vioGravatar Enrico Tassi2015-01-06
|
* STM: simplify state managementGravatar Enrico Tassi2014-12-17
| | | | | | | Thanks the the previous patchset a worker can be asked to send back "light" version of the system states. This is reasonably efficient hence the idea of letting a worker hang around just to hold system states for retrieval on demand is dropped.
* 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.
* STM: hook called whenever a state is unreachableGravatar Enrico Tassi2014-11-27
| | | | Even indirectly, if it depends on another state that in turn failed.
* AsyncTaskQueue: parsin can also happen in the workers nowGravatar Enrico Tassi2014-11-27
|
* STM: new API async_queryGravatar Enrico Tassi2014-11-27
| | | | | | | | 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.
* STM: put hooks in key events to let plugins customize the feedbackGravatar Enrico Tassi2014-11-27
| | | | The default hook value is the one used by CoqIDE
* STM: code refactoringGravatar Enrico Tassi2014-11-03
| | | | | This is mainly shuffling code around and removing internal refs that are not needed anymore.
* Feedback message: hold extra info to help routingGravatar Enrico Tassi2014-10-31
| | | | | PIDE based GUIs can take advantage of multiple panels and get some feedback routed there. E.g. query panel
* STM: new worker for queriesGravatar Enrico Tassi2014-10-31
| | | | | | | | | | | | | | | | | | | | | | | | 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).
* STM: primitives to snapshot a .vi while in interactive modeGravatar Enrico Tassi2014-10-13
|
* library/opaqueTables: enable their use in interactive modeGravatar Enrico Tassi2014-10-13
| | | | | | | | | | | | | | 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
* XML pretty printing for AST (work by François Poulain, project DoCoq)Gravatar Enrico Tassi2014-09-29
| | | | It is not 100% complete, but the main part is there.
* STM: new "par:" goal selector, like "all:" but in parallelGravatar Enrico Tassi2014-08-05
| | | | | par: distributes the goals among a number of workers given by -async-proofs-tac-j (defaults to 2).
* STM: code restructured to reuse task queue for tacticsGravatar Enrico Tassi2014-08-05
|
* STM: VtQuery holds the id of the state it refers toGravatar Carst Tankink2014-08-04
|
* STM: add optionally takes the id of the new tipGravatar Enrico Tassi2014-07-11
|
* STM: export the observe function (useful for pide)Gravatar Enrico Tassi2014-07-11
|
* all coqide specific files moved into ide/Gravatar Enrico Tassi2014-06-25
| | | | | | | | | | | | | | | | | | | | lib/interface split into: - lib/feedback subscribe-based feedback bus (also used by coqidetop) - ide/interface definition of coqide protocol messages lib/pp structured info/err/warn messages lib/serialize split into: - lib/serialize generic xml serialization (list, pairs, int, loc, ...) used by coqide but potentially useful to other interfaces - ide/xmlprotocol serialization of protocol messages as in ide/interface the only drawback is that coqidetop needs -thread and I had to pass that option to all files in ide/
* Adding a stm/ folder, as asked during last workgroup. It was essentially movingGravatar Pierre-Marie Pédrot2014-04-25
files around. A bunch of files from lib/ that were only used in the STM were moved, as well as part of toplevel/ related to the STM.