aboutsummaryrefslogtreecommitdiff
path: root/stm
AgeCommit message (Collapse)Author
2015-11-02Follow-up fix on Enrico's 6e376c8097d75b6e, with Enrico.Maxime Dénès
2015-11-02STM: fix undo into a branch containing side effectsEnrico Tassi
The "master" label used to be reset to the wrong id
2015-11-02STM: never reopen a branch containing side effectsEnrico Tassi
2015-10-30Add a way to get the right fix_exn in external vernacular commandsMatthieu Sozeau
involving Futures.
2015-10-29Handle side-effects of Vernacular commands inside proofs better, so thatMatthieu Sozeau
universes are declared correctly in the enclosing proofs evar_map's.
2015-10-28Avoid type checking private_constants (side_eff) again during Qed (#4357).Enrico Tassi
Side effects are now an opaque data type, called private_constant, you can only obtain from safe_typing. When add_constant is called on a definition_entry that contains private constants, they are either - inlined in the main proof term but not re-checked - declared globally without re-checking them As a safety measure, the opaque data type contains a pointer to the revstruct (an internal field of safe_env that changes every time a new constant is added), and such pointer is compared with the current value store in safe_env when the private_constant is inlined. Only when the comparison is successful the private_constant is not re-checked. Otherwise else it is. In short, we accept into the kernel private constant only when they arrive in the very same order and on top of the very same env they arrived when we fist checked them. Note: private_constants produced by workers never pass the safety measure (the revstruct pointer is an Ephemeron). Sending back the entire revstruct is possible but: 1. we lack a way to quickly compare two revstructs, 2. it can be large.
2015-10-18Miscellaneous typos, spacing, US spelling in comments or variable names.Hugo Herbelin
2015-10-14When typechecking a lemma statement, try to resolve typeclasses beforeMatthieu Sozeau
failing for unresolved evars (regression).
2015-10-09STM: Work around an occasional crash in dot (debug output)Alec Faithfull
The splines=ortho option seems to make dot crash sometimes, so this commit removes it from the STM debugging output
2015-10-09TQueue: Allow some tasks to be saved when clearing a TQueueAlec Faithfull
2015-10-09TQueue: Expose the length of TQueuesAlec Faithfull
2015-10-09STM: Added functions for saving and restoring the internal stateAlec Faithfull
PIDEtop needs these to implement its new transaction mechanism
2015-10-09STM: Pass exception information to unreachable_state_hook functionsAlec Faithfull
This lets hooks treat different exceptions in different ways; in particular, user interrupts can now be safely ignored
2015-10-08Axioms now support the universe binding syntax.Pierre-Marie Pédrot
We artificially restrict the syntax though, because it is unclear of what the semantics of several axioms in a row is, in particular about the resolution of remaining evars.
2015-10-08Proof using: let-in policy, optional auto-clear, forward closure*Enrico Tassi
- "Proof using p*" means: use p and any section var about p. - Simplify the grammar/parser for proof using <expression>. - Section variables with a body (let-in) are pulled in automatically since they are safe to be used (add no extra quantification) - automatic clear of "unused" section variables made optional: Set Proof Using Clear Unused. since clearing section hypotheses does not "always work" (e.g. hint databases are not really cleaned) - term_typing: trigger a "suggest proof using" message also for Let theorems.
2015-10-08Spawn: use each socket exclusively for writing or readingEnrico Tassi
According to http://caml.inria.fr/mantis/view.php?id=5325 you can't use the same socket for both writing and reading. The result is lockups (may be fixed in 4.03).
2015-10-08STM: for PIDE based UIs, edit_at requires no Reach.known_stateEnrico Tassi
2015-10-08STM: fix backtrace handlingEnrico Tassi
2015-10-02Univs: fix semantics of Type in proof mode in universe-polymorphic modeMatthieu Sozeau
Allowing universes to be instantiated if the body of the proof requires it (the levels stay flexible). Not allowed for non-polymorphic cases, to be compatible with the stm's invariant that the type should not change.
2015-10-02Univs: fix handling of side effects/delayed proofsMatthieu Sozeau
- When there are side effects which might enrich the initial universes of a proof, keep the initial and refined universe contexts apart like for delayed proofs, ensuring universes are declared before they are used in the right order. - Fix undefined levels in proof statements so that they can't be lowered to Set by a subsequent, delayed proof.
2015-10-02Univs: fix many evar_map initializations and leaks.Matthieu Sozeau
2015-09-29Remove some uses of Loadpath.get_paths.Guillaume Melquiond
The single remaining use is in library/states.ml. This use should be reviewed, as it is most certainly broken. The other uses of Loadpath.get_paths did not disappear by miracle though. They were replaced by a new function Loadpath.locate_file which factors all the uses of the function. This function should not be used as it is as broken as Loadpath.get_paths, by definition. Vernac.load_vernac now takes a complete path rather than looking up for the file. That is the way it was used most of the time, so the lookup was unnecessary. For instance, Vernac.compile was calling Library.start_library which already expected a complete path. Another consequence is that System.find_file_in_path is almost no longer used (except for Loadpath.locate_file, obviously). The two remaining uses are System.intern_state (used by States.intern_state, cf above) and Mltop.dir_ml_load for dynamically loading compiled .ml files.
2015-09-15STM: Reset takes Ltac <ident> into account (Close #4316)Enrico Tassi
2015-09-14Univs: Add universe binding lists to definitionsMatthieu Sozeau
... lemmas and inductives to control which universes are bound and where in universe polymorphic definitions. Names stay outside the kernel.
2015-09-01STM: save a full state for queries.Enrico Tassi
In PIDE based UIs queries can be delegated too, hence to speed up things I was saving a shallow state. Unfortunately a shallow state breaks section/modules commands, and a query can be the last entry of a section/module. (A shallow state does essentially drop the libstack). The easy solution is to save a complete state. A better one would be to refine the static analysis of the document and decide which kind of saved state one needs.
2015-08-19Removing code duplication in Lemmas.Pierre-Marie Pédrot
2015-08-19Documentation by giving a name to a large type.Pierre-Marie Pédrot
2015-07-30STM: make multiple, admitted, nested proofs work (fix #4314)Enrico Tassi
2015-07-30STM: emit a warning when a QED/Admitted proof contains a nested lemmaEnrico Tassi
2015-07-30STM: fix backtrack in presence of nested, immediate, proofsEnrico Tassi
2015-07-30STM: remove assertion not being true for nested, immediate, proofs (#4313)Enrico Tassi
2015-07-29Fixing what seems to be a typo.Hugo Herbelin
2015-07-28ShowScript: as 8.4 w.r.t. unnamed proofs and non tactic vernacs (fix #4308)Enrico Tassi
2015-07-14STM: fix a "exn with no safe id attached" error on a failing queryEnrico Tassi
It showed up at the CoqCS.
2015-06-26Introduction of a "Undelimit Scope" command, undoing "Delimit Scope"Lionel Rieg
2015-06-24Splitting the library representation on disk in two.Pierre-Marie Pédrot
The first part only contains the summary of the library, while the second one contains the effective content of it.
2015-06-09STM: states coming from workers have no proof terminators (Close #4246)Enrico Tassi
Hence we reuse the ones in master.
2015-06-09STM: silly mistake in jumping back to an old state (Close #4249)Enrico Tassi
2015-06-03Admitted does not drop poly-univ constraints (Fix #4244)Enrico Tassi
2015-05-28STM: preserve branch name on edit (Close: #4245, #4246)Enrico Tassi
2015-05-27Fix bug #4159Matthieu Sozeau
Some asynchronous constraints between initial universes and the ones at the end of a proof were forgotten. Also add a message to print universes indicating if all the constraints are processed already or not.
2015-05-12nice error for Restart outside a proof (Close: #4235)Enrico Tassi
2015-05-04Add a [Redirect] vernacular commandClément Pit--Claudel
The command [Redirect "filename" (...)] redirects all the output of [(...)] to file "filename.out". This is useful for storing the results of an [Eval compute], for redirecting the results of a large search, for automatically generating traces of interesting developments, and so on.
2015-04-21STM: print trace on "anomaly, no safe id attached"Enrico Tassi
2015-04-02Fix some typos.Guillaume Melquiond
2015-04-02CoqIDE: simpler way of reopening/reclosing a proof (Close: 4168)Enrico Tassi
No "read-only" terminator. If no terminator is present the UI complains. If the terminator is different, STM warns but continues. The STM warns that the "check the document" button will not honor the terminator change, and what to do to avoid that. Technically, one cannot turn (a posteriori) an axiom into a theorem and vice versa. Could be done, but not with a small patch.
2015-03-27Putting the From parameter of the Require command into the AST.Pierre-Marie Pédrot
2015-03-27STM: refine the notion of "simply a tactic"Enrico Tassi
When a worker sends back a system state to master, it tries to just send a delta. If the command is a simple tactic, then only the proof state changes. Now, what is a simple tactic? 1. a tactic 2. that does not change the environment Check 1. was surely incomplete. Now it is: VernacSolve _ | VernacFocus _ | VernacUnfocus | VernacBullet _ Is it complete?
2015-03-26STM: change how proof mode switching commands are handled (decl_mode)Enrico Tassi
This is likely to make nested proofs containing proof modes switch broken, but fixes the problems Arnaud has in his branch. It is possible that the classification function we have today is not fine grained enough. If a command that changes the proof mode has as the only global effect changing the proof mode, then the current code is fine. If it has a more global effect that persists after the proof is over but has no impact on the proof itself, then the old code is fine. As far as I can get, the proof mode switching commands have a global effect (changing parser) but also a proof effect (un/focusing). We don't have a classification for these. Today a command having a global effect is played twice: on the proof branch an on master. Of course if such command cannot work on master (where there is no finished proof for example) we need a special treatment for it.
2015-03-25STM: avoid processing asynchronously empty proofs (Close: #4134)Enrico Tassi