aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
Commit message (Collapse)AuthorAge
* amending last commitGravatar Enrico Tassi2014-02-27
|
* better warningGravatar Enrico Tassi2014-02-27
|
* Tacinterp: more refactoring.Gravatar Arnaud Spiwack2014-02-27
| | | Introducing List.fold_right and List.fold_left in Monad.
* Tacinterp: refactoring using Monad.Gravatar Arnaud Spiwack2014-02-27
| | | Adds a combinator List.map_right which chains effects from right to left.
* Remove unsafe code (Obj.magic) in Tacinterp.Gravatar Arnaud Spiwack2014-02-27
| | | This commit also introduces a module Monad to generate monadic combinators (currently, only List.map).
* remoteCounter: backup/restoreGravatar Enrico Tassi2014-02-26
| | | | | When you resume the compilation of a .vi file, you want to avoid collisions on fresh names.
* New compilation mode -vi2voGravatar Enrico Tassi2014-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To obtain a.vo one can now: 1) coqtop -quick -compile a 2) coqtop -vi2vo a.vi To make that possible the .vo structure has been complicated. It is now made of 5 segments. | vo | vi | vi2vo | contents --------------+------+-----+-------+------------------------------------ lib | Yes | Yes | Yes | libstack (modules, notations,...) opauqe_univs | No | Yes | Yes | constraints coming from opaque proofs discharge | No | Yes | No | data needed to close sections tasks | No | Yes | No | STM tasks to produce proof terms opaque_proofs | Yes | Yes | Yes | proof terms --------------+------+-----+-------+------------------------------------ This means one can load only the strictly necessay parts. Usually one does not load the tasks segment of a .vi nor the opaque_proof segment of a .vo, unless one is turning a .vi into a .vo, in which case he load all the segments. Optional segments are marshalled as None. But for lib, all segments are Array.t of: | type --------------+--------------------------------------------------------- lib | a list of Libobject.obj (n'importe quoi) opauqe_univs | Univ.consraints Future.computation discharge | what Cooking.cook_constr needs tasks | Stm.tasks (a task is system_state * vernacexpr list) opaque_proofs | Term.constr Future.computation --------------+------+-----+-------+------------------------------------ Invariant: all Future.computation in a vo file (obtained by a vi2vo compilation or not) have been terminated with Future.join (or Future.sink). This means they are values (inside a box). This invariant does not hold for vi files. E.g. opauqe_proofs can be dangling Future.computation (i.e. NotHere exception). The vi2vo compilation step will replace them by true values. Rationale for opaque_univs: in the vi2vo transformation we want to reuse the lib segment. Hence the missing pieces have to be put on the side, not inside. Opaque proof terms are already in a separte segment. Universe constraints are not, hence the new opauqe_univs segment. Such segment, if present in a .vo file, is always loaded, and Declare.open_constant will add to the environment the constraints stored there. For regular constants this is not necessay since the constraints are already in their enclosing module (and also in the constant_body). With vi2vo the constraints coming from the proof are not in the constant_body (hence not in the enclosing module) but there and are added to the environment explicitly by Declare.open_constant. Rationale for discharge: vi2vo produces a proof term in its original context (in the middle of a section). Then it has to discharge the object. This segment contains the data that is needed in order to do so. It is morally the input that Lib.close_section passes to Cooking (via the insane rewinding of libstack, GlobalRecipe, etc chain). Checksums: the checksum of .vi and a .vo obtain from it is the same. This means that if if b.vo has been compiled using a.vi, and then a.vi is compiled into a.vo, Require Import b works (and recursively loads a.vo).
* Future: make ~greedy:true the default + new sink commodity APIGravatar Enrico Tassi2014-02-26
|
* Future: each computation has a uuidGravatar Enrico Tassi2014-02-26
|
* IStream: more efficient implementation of concat_map.Gravatar Arnaud Spiwack2014-02-24
|
* IStream: a concat_map primitive.Gravatar Arnaud Spiwack2014-02-24
|
* IStream: change type of thunk, spare allocations.Gravatar Arnaud Spiwack2014-02-24
| | | | | | | Two changes: - 'a Lazy.t becomes unit -> 'a - 'a t becomes 'a u (the view type) This spares two Lazy.force, and leverages Lazy.lazy_from_fun. Considering Lazy.force is fairly slow, in particular because of the write-barrier, this should be beneficial.
* IStream: remove a useless Obj.magic.Gravatar Arnaud Spiwack2014-02-24
| | | Lazy.lazy_from_val does almost the same thing as this Obj.magic. It makes some extra dynamic check, but it's frankly unlikely that it could be observed.
* A view type for IStream.Gravatar Arnaud Spiwack2014-02-24
| | | View types are better practice than option types for pattern-matching. (Plus, they save a minute amount of allocations)
* STM: fix valid_id coming from Qed errorsGravatar Enrico Tassi2014-02-10
|
* Tentative fixup for the previous commit. It seems I have broken somethingGravatar Pierre-Marie Pédrot2014-02-10
| | | | | nasty relating memory management triggering random segfaults. But this seemed really unlikely...
* Small optimizations in Closure:Gravatar Pierre-Marie Pédrot2014-02-09
| | | | | 1. Only apply last Zupdates 2. Better smartmap with state.
* Tracking memory misallocation by trying to improve sharing.Gravatar Pierre-Marie Pédrot2014-02-03
|
* Allocation friendly map-handling functions in Dag.Gravatar Pierre-Marie Pédrot2014-02-03
|
* Relaunch all Unix.waitpid when they ended with EINTRGravatar Pierre Letouzey2014-01-30
| | | | Moreover, cleanup of System.connect (used by the "external" tactic).
* CUnix: enriched (get_extension, sys_command, waitpid_non_intr) + cleanedGravatar Pierre Letouzey2014-01-30
|
* CString: avoid redefining is_subGravatar Pierre Letouzey2014-01-30
|
* Remove useless Xml_utilsGravatar Pierre Letouzey2014-01-30
|
* clib.mllib: remove duplicated Flags entryGravatar Pierre Letouzey2014-01-30
|
* STM + CoqIDE: stop_worker message and UIGravatar Enrico Tassi2014-01-30
|
* Work around for bug in threads + blocking io streamlinedGravatar Enrico Tassi2014-01-30
|
* STM: tell the user if the master is recomputing states validated by workersGravatar Enrico Tassi2014-01-30
| | | | | | When the worker fails, the master may need to recompute some states the worker has already validates. In this case they are colored accordingly.
* Fixing backtrace handling here and there.Gravatar Pierre-Marie Pédrot2014-01-30
|
* Adding a smartmap[i] operator to maps.Gravatar Pierre-Marie Pédrot2014-01-29
|
* CoqIDE: command line for extra coqtop "flags"Gravatar Enrico Tassi2014-01-26
| | | | Like the socket for the OCaml debugger
* Spawn: managed processesGravatar Enrico Tassi2014-01-26
| | | | | | | | | The Spawn and Spawned modules factor the operation of spawning a process. Both synchronous and asynchronous channels are supported. Both threaded and glib like main loop models are supported. Still, not all combinations are truly tested not equipped with a decent API: only async + glib and sync + thread are, since these are the models we use for coqide<->coqtop and coqtop<->worker respectively.
* Adding a default object to generic argument registering mechanism.Gravatar Pierre-Marie Pédrot2014-01-19
|
* fix typoGravatar Enrico Tassi2014-01-06
|
* Paral-ITP: cleanup of command line flags and more conservative defaultGravatar Enrico Tassi2014-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | -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).
* .vi files: .vo files without proofsGravatar Enrico Tassi2014-01-04
| | | | | | | | | | | | | | | | | | | | | | | File format: The .vo file format changed: - after the magic number there are 3 segments. A segment is made of 3 components: bynary int, an ocaml value, a digest. The binary int is the position of the digest, so that one can skip the value without unmarshalling it - the first segment is the library, as before - the second segment is the STM task list - the third segment is the opaque table, as before A .vo file has a complete opaque table (all proof terms are there). A .vi file follows the same format of a .vo file, but some entries in the opaque table are missing. A proof task is stocked instead. Utilities: coqc: option -quick generates a .vi insted of a .vo coq_makefile: target quick to generate all .vi coqdep: generate deps for .vi files too votour: can browse .vi files too, the first question is which segment should be read coqchk: rejects .vi files
* Future: allow custom action when a delegated future is forcedGravatar Enrico Tassi2014-01-04
| | | | | | | | The default action is to raise NotReady, but one may want to make the action "blocking" but successful. Using this device all delayed proofs can be "delegated". If there are slaves, they will eventually pick up the task. If there are no slaves, then the future can behave like a regular, non delegated, lazy computation.
* Aux_file: cache information at compile time for later (re)useGravatar Enrico Tassi2014-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a file dir/a.v the corresponding aux file dir/.a.aux can store arbitrary data. It maps a "Loc.t * string" (key) to a "string" (value). Pretty much anything can fit in this schema, but ATM I see only the following possible uses: 1) record inferred data, like the set of section variable used, so that one can later use this info to process proofs asynchronously (i.e. compute their discharged type without knowing the proof term). 2) record timings (how long it takes to build a proof term or check it), so that one can take smarter scheduling decisions 3) record a bloated proof trace for automatic tactics, so that one can replay it faster (a sort of cache). For that to be useful an Ltac API is required. The .aux file contains the path of the .v and its md5 hash. When loaded it defaults to the empty map is the file is not there or if the .v file changed. Not finding some data in the .aux file cannot be a failure, but finding it may help in many ways. The current file format is very simple but human readable. It is generated/parsed using printf/scanf and in particular the %S formatter for the value string. The file format is private to the Aux_file module: only an abstract interface is provided. The current file format is not robust in face of local changes. Any change invalidates the md5 hash (and the Loc.t is very likely to change too).
* CoqIDE: new feedback "incomplete" to signal partial QedGravatar Enrico Tassi2013-12-24
|
* Future: optional greedy chainingGravatar Enrico Tassi2013-12-24
| | | | | | If a Future.computation is already a value v or an exception and is chained in a greedy way with a function f, then f v is executed immediately (or the exception is raised).
* Removing the useless pattern ident genarg.Gravatar Pierre-Marie Pédrot2013-12-19
|
* Fix CoqIDE on windowsGravatar Enrico Tassi2013-12-10
|
* Removing RefArgType generic argument.Gravatar Pierre-Marie Pédrot2013-12-01
|
* Getting rid of casted_open_constr. It was only used by theGravatar Pierre-Marie Pédrot2013-11-30
| | | | | | | | | | | | | | | | | refine tactic, which now uses plain glob_constr's. Now there is no real need to depend on goal when interpreting genargs. Possible minor incompatibilities: 1. The interpretation of glob_constr to constr is now done by Goal.constr_of_raw, which may be slightly dumbier than the dedicated Tacinterp.interp_open_constr which tries harder. Stdlib and test-suite do go through, though. 2. I had to change the parsing level of wit_glob in Extraargs from lconstr to constr. It may break ML notations using glob, but as they are only used inside Coq code and all well-parenthezised, it should be OK.
* Old message Interp returns the state id so that one can BackTo itGravatar Enrico Tassi2013-11-27
|
* New option --help-XML-protocol to document the XML procol used by -ideslaveGravatar Enrico Tassi2013-11-27
| | | | | | Serialize.ml spits out its own documentation. Not everything is statically checked, so it risks to get outdated. Ideas on how to statically/dynamically check that the doc is in sync are welcome.
* First stab at retrocompatible INTERP messageGravatar Enrico Tassi2013-11-27
|
* Adding a generic Int.Map using persistent arrays.Gravatar Pierre-Marie Pédrot2013-11-26
|
* Adding fold_left / fold_right function to maps.Gravatar Pierre-Marie Pédrot2013-11-24
|
* Hardening the reading function of vo files.Gravatar Pierre-Marie Pédrot2013-11-24
|
* Tweaking arity & allocation of some basic functions.Gravatar Pierre-Marie Pédrot2013-11-24
|