aboutsummaryrefslogtreecommitdiff
path: root/stm/asyncTaskQueue.ml
AgeCommit message (Collapse)Author
2017-12-11[flags] [stm] Reorganize flags.Emilio Jesus Gallego Arias
We move the main async flags to the STM in preparation for more state encapsulation. There is still more work to do, in particular we should make some of the defaults a parameter instead of a flag.
2017-12-11[stm] Move process_id to Spawned.Emilio Jesus Gallego Arias
This brings us one step closer to actually moving all STM flags to `stm`.
2017-12-01Proper nametab handling of global universe namesMatthieu Sozeau
They are now bound at the library + module level and can be qualified and shadowed according to the usual rules of qualified names. Parsing and printing of universes "u+n" done as well. In sections, global universes are discharged as well, checking that they can be defined globally when they are introduced
2017-11-21[stm] [doc] Add some documentation to AsyncTaskQueue APIEmilio Jesus Gallego Arias
As a bonus we remove some trailing whitespace, and implement a couple of hints suggested in the discussion.
2017-11-06[api] Move structures deprecated in the API to the core.Emilio Jesus Gallego Arias
We do up to `Term` which is the main bulk of the changes.
2017-11-01Fix FIXME: use OCaml 4.02 generative functors when available.Gaëtan Gilbert
4.02.3 has been the minimal OCaml version for a while now.
2017-10-03Merge PR #1019: Fix BZ#5655 by avoiding the creation of a cleaner thread for ↵Maxime Dénès
empty queues.
2017-09-11In stm, fixing a typo about flushing debugging messages.Hugo Herbelin
2017-09-07Fix BZ#5655 by avoiding the creation of a cleaner thread for empty queues.Maxime Dénès
While this is a good workaround, Enrico has a minimal example of the underlying issue that we will send to the OCaml team.
2017-07-27[toplevel] Remove long ago deprecated and NOOP options.Emilio Jesus Gallego Arias
Minor clean up, no sense in having these as they do nothing.
2017-07-04Bump year in headers.Pierre-Marie Pédrot
2017-04-13Silence a few OCaml warnings.Guillaume Melquiond
2017-04-12[stm] Remove edit_id.Emilio Jesus Gallego Arias
We remove `edit_id` from the STM. In PIDE they serve a different purpose, however in Coq they were of limited utility and required many special cases all around the code. Indeed, parsing is not an asynchronous operation in Coq, thus having feedback about parsing didn't make much sense. All clients indeed ignore such feedback and handle parsing in a synchronous way. XML protocol clients are unaffected, they rely on the instead on the Fail value. This commit supersedes PR#203.
2017-03-21[pp] [ide] Minor cleanups in pp code.Emilio Jesus Gallego Arias
- We avoid unnecessary use of Pp -> string conversion functions. and the creation of intermediate buffers on logging. - We rename local functions that share the name with the Coq stdlib, this is usually dangerous as if the normal function is removed, code may pick up the one in the stdlib, with different semantics.
2017-03-21[pp] Make feedback the only logging mechanism.Emilio Jesus Gallego Arias
Previously to this patch, Coq featured to distinct logging paths: the console legacy one, based on `Pp.std_ppcmds` and Ocaml's `Format` module, and the `Feedback` one, intended to encapsulate message inside a more general, GUI-based feedback protocol. This patch removes the legacy logging path and makes feedback canonical. Thus, the core of Coq has no dependency on console code anymore. Additionally, this patch resolves the duplication of "document" formats present in the same situation. The original console-based printing code relied on an opaque datatype `std_ppcmds`, (mostly a reification of `Format`'s format strings) that could be then rendered to the console. However, the feedback path couldn't reuse this type due to its opaque nature. The first versions just embedded rending of `std_ppcmds` to a string, however in 8.5 a new "rich printing" type, `Richpp.richpp` was introduced. The idea for this type was to be serializable, however it brought several problems: it didn't have proper document manipulation operations, its format was overly verbose and didn't preserve the full layout, and it still relied on `Format` for generation, making client-side rendering difficult. We thus follow the plan outlined in CEP#9, that is to say, we take a public and refactored version of `std_ppcmds` as the canonical "document type", and move feedback to be over there. The toplevel now is implemented as a feedback listener and has ownership of the console. `richpp` is now IDE-specific, and only used for legacy rendering. It could go away in future versions. `std_ppcmds` carries strictly more information and is friendlier to client-side rendering and display control. Thus, the new panorama is: - `Feedback` has become a very module for event dispatching. - `Pp` contains a target-independent box-based document format. It also contains the `Format`-based renderer. - All console access lives in `toplevel`, with console handlers private to coqtop. _NOTE_: After this patch, many printing parameters such as printing width or depth should be set client-side. This works better IMO, clients don't need to notify Coq about resizing anywmore. Indeed, for box-based capable backends such as HTML or LaTeX, the UI can directly render and let the engine perform the word breaking work. _NOTE_: Many messages could benefit from new features of the output format, however we have chosen not to alter them to preserve output. A Future commits will move console tag handling in `Pp_style` to `toplevel/`, where it logically belongs. The only change with regards to printing is that the "Error:" header was added to console output in several different positions, we have removed some of this duplication, now error messages should be a bit more consistent.
2017-01-30Fix a typo in STM universe communications.Maxime Dénès
2016-09-13AsyncTaskQueue: annotate debug feedback messages with worker idEnrico Tassi
2016-09-05feedback: support multiple feedback listenersEnrico Tassi
So that a module can add his own and look at the traffic
2016-09-02Merge branch 'v8.5' into v8.6Pierre-Marie Pédrot
2016-08-30Fix #4871 - interrupting par:abstract kills coqtopMaxime Dénès
Fix done with Enrico.
2016-07-03errors.ml renamed into cErrors.ml (avoid clash with an OCaml compiler-lib ↵Pierre Letouzey
module) For the moment, there is an Error module in compilers-lib/ocamlbytecomp.cm(x)a
2016-06-01Merge branch 'v8.5'Pierre-Marie Pédrot
2016-05-31Feedback cleanupEmilio Jesus Gallego Arias
This patch splits pretty printing representation from IO operations. - `Pp` is kept in charge of the abstract pretty printing representation. - The `Feedback` module provides interface for doing printing IO. The patch continues work initiated for 8.5 and has the following effects: - The following functions in `Pp`: `pp`, `ppnl`, `pperr`, `pperrnl`, `pperr_flush`, `pp_flush`, `flush_all`, `msg`, `msgnl`, `msgerr`, `msgerrnl`, `message` are removed. `Feedback.msg_*` functions must be used instead. - Feedback provides different backends to handle output, currently, `stdout`, `emacs` and CoqIDE backends are provided. - Clients cannot specify flush policy anymore, thus `pp_flush` et al are gone. - `Feedback.feedback` takes an `edit_or_state_id` instead of the old mix. Lightly tested: Test-suite passes, Proof General and CoqIDE seem to work.
2016-05-27STM: fix argument filtering for slavesEnrico Tassi
Command line options to be dropped got outdated after vi -> vio renaming. This made the par: goal selector do not work in conjunction with -quick.
2016-03-18Merge branch 'v8.5'Pierre-Marie Pédrot
2016-03-15Tentative fix for bug #4614: "Fully check the document" is uninterruptable.Pierre-Marie Pédrot
The SIGINT sent to the master coqtop process was lost in a watchdog thread, so that the STM resulted in an inconsistent state. This patch catches gracefully the exception and kills the task as if it were normally cancelled. Note that it probably won't work on non-POSIX architectures, but it does not really matter because interrupt was already badly handled anyway.
2016-03-05Merge branch 'v8.5'Pierre-Marie Pédrot
2016-03-04Rename Ephemeron -> CEphemeron.Maxime Dénès
Fixes compilation of Coq with OCaml 4.03 beta 1.
2016-01-21Merge branch 'v8.5'Pierre-Marie Pédrot
2016-01-20Update copyright headers.Maxime Dénès
2016-01-05Merge remote-tracking branch 'origin/v8.5' into trunkGuillaume Melquiond
2016-01-04workers: purge short version of -load-vernac too (fix #4458)Enrico Tassi
2016-01-02Remove some unused functions.Guillaume Melquiond
Note: they do not even seem to have a debugging purpose, so better remove them before they bitrot.
2015-09-20Rich printing of messages.Pierre-Marie Pédrot
2015-02-16*Queue: API to wake up all threadsEnrico Tassi
2015-01-12Update headers.Maxime Dénès
2014-12-25Inlining Spawn.kill_if in the one place were it was actually used, thusPierre-Marie Pédrot
removing the need of thread creation in the interface.
2014-12-17CoqIDE: cleanup jobs window on worker deathEnrico Tassi
2014-12-17AsyncTaskQueue: simpler model (no parking area, continuation tasks)Enrico Tassi
2014-12-17CThread: use a different type for thread friendly in_channelsEnrico Tassi
2014-12-16Getting rid of Exninfo hacks.Pierre-Marie Pédrot
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.
2014-11-27AsyncTaskQueue: parsin can also happen in the workers nowEnrico Tassi
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-27Feedback: API cleaned up, documented and made user extensibleEnrico Tassi
2014-11-03STM: code refactoringEnrico Tassi
This is mainly shuffling code around and removing internal refs that are not needed anymore.
2014-10-13STM: primitives to snapshot a .vi while in interactive modeEnrico Tassi
2014-09-09A marshalling failure does not make a worker `OldEnrico Tassi
2014-09-02coqworkmgrEnrico Tassi
2014-08-26Do not pass "-batch" or "-load-vernac-source" to slaves, avoiding errors inMatthieu Sozeau
stm test-suite files.
2014-08-05STM: new "par:" goal selector, like "all:" but in parallelEnrico Tassi
par: distributes the goals among a number of workers given by -async-proofs-tac-j (defaults to 2).