aboutsummaryrefslogtreecommitdiff
path: root/ide/coq.ml
AgeCommit message (Collapse)Author
2020-06-02Move CoqIDE to its own folderMaxime Dénès
The will make it possible to put a VsCoq toplevel in `ide/vscoq`.
2020-03-18Update headers in the whole code base.Théo Zimmermann
Add headers to a few files which were missing them.
2020-02-23Adding a Display Parentheses menu in CoqIDE.Hugo Herbelin
2020-02-16CoqIDE: allow opening multiple files at onceErika
2019-11-21[coq] Untabify the whole ML codebase.Emilio Jesus Gallego Arias
We also remove trailing whitespace. Script used: ```bash for i in `find . -name '*.ml' -or -name '*.mli' -or -name '*.mlg'`; do expand -i "$i" | sponge "$i"; sed -e's/[[:space:]]*$//' -i.bak "$i"; done ```
2019-07-08Adding methods help and parse_extra to custom toplevels data.Hugo Herbelin
In particular, method init does not do parsing any more. This allows for instance to let coqidetop treats itself the "-filteropts" option.
2019-06-17Update ml-style headers to new year.Théo Zimmermann
2019-03-19CoqIDE: Moving last use of gtk2-only FileSelection to FileChooserDialog.Hugo Herbelin
2019-02-27[ide] coqtop -> coqidetop in user messagesEnrico Tassi
2018-12-09[doc] Enable Warning 50 [incorrect doc comment] and fix comments.Emilio Jesus Gallego Arias
This is a pre-requisite to use automated formatting tools such as `ocamlformat`, also, there were quite a few places where the comments had basically no effect, thus it was confusing for the developer. p.s: Reading some comments was a lot of fun :)
2018-10-01[config] Remove unused ML variables.Emilio Jesus Gallego Arias
These are unused and not likely to come back.
2018-07-26Expose the diff printing option as an UI entry in CoqIDE.Pierre-Marie Pédrot
2018-05-21[ide] Remove special option `-ideslave`Emilio Jesus Gallego Arias
This has no effect anymore, verbose printing is controlled now by the regular, common `quiet` flag.
2018-02-27Update headers following #6543.Théo Zimmermann
2018-02-15[ide] Localize a IDE-specific flag.Emilio Jesus Gallego Arias
2017-08-23Fix BZ#5687: Coqtop died badly modal message box from CoqIDE.Pierre-Marie Pédrot
We let the user choose the most appropriate action to do if coqtop decides to go berserk.
2017-07-28Merge PR #823: Async off in Windows by default in CoqIDEMaxime Dénès
2017-07-04Bump year in headers.Pierre-Marie Pédrot
2017-06-26disable async on Windows by defaultPaul Steckler
2017-05-04Adding an option "Printing Unfocused".Pierre Courtieu
Off by default. + small refactoring of emacs hacks in printer.ml.
2017-03-21[xml] Restore protocol compatibility with 8.6.Emilio Jesus Gallego Arias
By default, we serialize messages to the "rich printing representation" as it was done in 8.6, this ways clients don't have to adapt unless they specifically request the new format using option `--xml_format=Ppcmds`
2017-03-21[ide] Dynamic printing width.Emilio Jesus Gallego Arias
The IDE now gets core Coq's `std_ppcmds` document format which is width-independent. Thus, we follow [1] and make the `{proof,message}_view` object refresh their contents when the container widget changes size (by listening to GTK's `size_allocated` signal). The practical advantage is that now CoqIDE always renders terms with the proper printing width set and without a roundtrip to Coq. This patch dispenses the need for the `printing width` option, which could be removed altogether. [1] http://stackoverflow.com/questions/40854571/change-gtksourceview-contents-on-resize/
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-03-21[ide] Use "log via feedback".Emilio Jesus Gallego Arias
We remove the custom logger handler in ide_slave, and handle everything via feedback. This is an experimental patch but it seems to bring quite a bit of cleanup and a more uniform handling to messaging.
2016-06-27Merge branch 'v8.5'Pierre-Marie Pédrot
2016-06-27Fix bug #4698: CoqIDE error dialogs piling up when coqtop dies.Pierre-Marie Pédrot
Instead of relaunching the coqtop process and then open the warning window, we rather fire the warning and wait for the user to press the OK button before doing anything.
2016-06-25[feedback] Remove unused tag on `Debug` level.Emilio Jesus Gallego Arias
IMO level indicators are not the proper place to store this information.
2016-06-06xmlprotocol: Marshal_error carries the reasonEnrico Tassi
2016-06-02Encapsulate xml serialization in xmlprotocol.mliEmilio Jesus Gallego Arias
This eases the task of replacing/improving the serializer, as well as making it more resistant. See pitfalls below: Main changes are: - fold `message` type into `feedback` type - make messages of type `Richpp.richpp` so we are explicit about the content being a rich document. - moved serialization functions for messages and stateid to `Xmlprotocol` - improved a couple of internal API points (`is_message`). Tested.
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-02-21Merge branch 'v8.5'Pierre-Marie Pédrot
2016-02-19CoqIDE: STOP button also stops workers (fix #4542)Enrico Tassi
2016-01-21Merge branch 'v8.5'Pierre-Marie Pédrot
2016-01-20Update copyright headers.Maxime Dénès
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-09-20Do not canonicalize messages received by CoqIDE.Pierre-Marie Pédrot
2015-08-16Turning CoqIDE preferences into new style.Pierre-Marie Pédrot
Some old style references remain because all type converters are not implemented yet.
2015-01-12Update headers.Maxime Dénès
2014-08-05Coqide: check_connection now also checks correct loading of coqide plugin +Hugo Herbelin
reports errors also from stderr.
2014-06-30Little coqide bug, when coqtop outputs empty lines, as e.g. when calling ↵Hugo Herbelin
coqide --help.
2014-06-25all coqide specific files moved into ide/Enrico Tassi
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/
2014-04-10CoqIDE: removing a timer may raise an exceptionEnrico Tassi
2014-03-12Stm: smarter delegation policyEnrico Tassi
Stm used to delegate every proof when it was possible, but this may be a bad idea. Small proofs may take less time than the overhead delegation implies (marshalling, etc...). Now it delegates only proofs that take >= 1 second. By default a proof takes 1 second (that may be wrong). If the file was compiled before, it reuses the data stored in the .aux file and assumes the timings are still valid. After a proof is checked, Coq knows how long it takes for real, so it wont predict it wrong again (when the user goes up and down in the file for example). CoqIDE now sends to Coq, as part of the init message, the file name so that Coq can load the .aux file.
2014-03-06remove trailing '\r' from file names returned by coqtopVirgile Prevosto
2014-02-17CoqIDE: when coqtop misbehaves kill it properly (no zombie)Enrico Tassi
2014-01-30STM + CoqIDE: stop_worker message and UIEnrico Tassi
2014-01-26CoqIDE: command line for extra coqtop "flags"Enrico Tassi
Like the socket for the OCaml debugger
2014-01-26CoqIDE: ported to spawnEnrico Tassi
2014-01-05Paral-ITP: cleanup of command line flags and more conservative defaultEnrico Tassi
-async-proofs off the system behaves as in 8.4 -async-proofs lazy proofs are delayed (when possible) but never processed in parallel -async-proofs on proofs are processed in parallel (when possible). The number of workers is 1, can be changed with -async-proofs-j. Extra options to the worker process can be given with -async-proofs-worker-flags. The default for batch compilation used to be "lazy", now it is "off". The "lazy" default was there to test the machinery, but it makes very little sense in a batch scenario. If you process things sequentially, you'd better do them immediately instead of accumulating everything in memory until the end of the file and only then force all lazy computations. The default for -ideslave was and still is "on". It becomes dynamically "lazy" on a per task (proof) basis if the worker dies badly. Note that by passing "-async-proofs on" to coqc one can produce a .vo exploiting multiple workers. But this is rarely profitable given that master-to-worker communication is inefficient (i.e. it really depends on the size of proofs v.s. size of system state).