CoqCS1 - coq/coq GitHub Wiki
This page collects useful infos for the participants to the first Coq Coding Sprint
A coding sprint is an event that brings together the core developers of Coq and people willing to understand, improve or extend the system.
The coding sprint will take place at the Inria Center in Sophia-Antipolis (how to reach the Inria center, accommodation infos).
Tentative schedule, Slides for the introduction
For organization purposes we require the participants to register (free of charge) by following these two steps:
- subscribe to the coordination mailing list
- post a message with subject REGISTER. In case you already have an project in mind, please include a short description of it in the registration email.
The mailing list is also the preferred channel to contact the organizers. Subscription is required in order to post.
Meeting point 17:00 in front of Inria or 18:00 at the beach.
Meeting point 20:00 if you want to join the group for dinner.
(pick what you prefer and build your dinner group around you)
- Le Brulot (grill) or le Burlot Pasta (mediterran cuisine) https://goo.gl/maps/vidtd,
- Le Safranier (local cuisine) https://goo.gl/maps/YAg0O,
- L'Altro (italian) https://goo.gl/maps/AtQWL,
- Hong Yun (chinese) https://goo.gl/maps/sYwbH
- Sushi shop (sushi) https://goo.gl/maps/fnF3E
- Yves Bertot
- Pierre Boutillier
- Maxime Dénès
- Hugo Herbelin
- Matthieu Sozeau
- Enrico Tassi
- Bruno Barras
- Benjamin Gregoire
- Pierre Letouzey
- Jaap Boender
- Arthur Charguéraud
- Nicolas Magaud
- Gabriel Scherer
- Jason Gross
- Assia Mahboubi
- Arnaud Spiwack
- Pierre-Marie Pédrot
- Laurence Rideau
- Jacques-Henri Jourdan
- Reynald Affeldt
- Guilhem Jaber
- Jasmin Blanchette
- Cyril Cohen
- Nico Lehmann
- Emilio J. Gallego Arias
- Thomas Sibut-Pinote
- Amin Timany
- Thibault Gauthier
- Théo Zimmermann (+)
- Lionel Rieg (+)
- Cyprien Mangin (+)
- Abhishek Anand (+)
- Matej Kosik (+)
- Anders Mörtberg (+)
- Alexander Faithfull (+)
- Jesper Bengtson (+)
- Guillaume Cano (+)
- Frederic Chyzak
- Qingguo Xu
(+) Late subscription (tradition says you pay a round at the pub...)
A list of relatively simple bugs, to kill the time 😄
Also, bug triaging is very welcome (check if a bug is still valid, add extra info, close solved bugs...).
- coqide:
- Make the goal window display all goals, not only the focused one. Consider using a notebook widget to let the user look at any goal by changing page. Think about creative uses for the notebook page labels. Requires GTK skills.
- Add a "quick compile" button, as in coqc -quick. The STM can also "dump" the current state as a .vio file, but there is no protocol message for requiring such service.
- Make coqide silently kill coqtop and save the current buffer position when too many tabs are opened and restart coqtop when the user re-opens an old tab. (see 4074)
- Remove use of threads in the coqide back end: use CPS+Unix.select to code a cooperative threads library (in the LWT style), see tentative patch by PMP.
- tooling:
- coqobjinfo (like ocamlobjinfo) reusing some code from votour/coqchk to get infos about a .vo or .vio file: modules/lemmas included, axioms, ... This is turn could be used to build other tools to: extract the set of assumptions associated with a final theorems, locate the places of uses of a given definition, (in the future) optimize the recompilation process by knowing which parts need to be recompiled following a change in one given definition.
- make it possible to hide all support files (e.g. .glob files) to make directory listing and file selection/auto-completion operation simpler. (comment: very much in the spirit of what .coq-native/ does for native_compute files). One could also say that a .vo file is a directory, that the segments in which the .vo file are organized are files with standard names in these directories and that all extra metadata are again files in such directory. E.g. foo.vo/{lib,opaque,glob}. This is also compatible with Makefiles, since it is possible to target a single components.
- tactics
- CUPS like syntax for selecting a set of goals for tactic application. I.e. generalize "all:" to "1,2-5:", see also 1805.
- ci.inria.fr
- Prepare a job (to be copied, a sort of template) that one can easily use to compile a personal Coq branch (take from github) and a list of other git repos (like some entries from the coq-contribs).
- Win
- test the Win64 installer on a Win64 machine
- OSX
- try to make the procedure of building the .app reproducible (an SDK, or a scipt)
- see if an opam root (compressed, to be unpacked in
/opt/coq$V/opam/
on the fly) can be integrated in the .app bundle and have the bundled CoqIDE use that coqtop
- opam
- test coq:shell especially under OSX
-
improving Search:
- finding theorems that fit a pattern thanks to type classes, canonical structures, or modulo iota-reduction, or delta steps of a set of registered constants (see also #3904)
- Invent a "search" that works for tactics: search the patterns used in the tactic, or use patterns given by the user. (related work)
- Sort search result according to a priority heuristic to display more relevant results first.
-
tools:
- coq_makefile: use a real template engine to generate the Makefile, instead of playing with OCaml strings; alternatively make coq_makefile just generate a Makefile.conf snippet with the user setting and copy in the current directory a standard Makefile that uses conditionals at run time (not at generation time as it is done now). In both cases the Makefile should be easier to read from the sources of coq_makefile, now it is really hard to do so.
-
type inference, unification:
- Print canonical structures inference failures in error messages. E.g. "typing error... + during type inference this CS inference failed"
- Add proper categories to unification variables (goals, typeclass constraints, implicits that should be solved...)
- Reimplement and merge typeclasses eauto, auto and eauto using the new tactic engine.
- Let the user tell TI when the expected type should be propagated down via an Argument directive. E.g. with
Arguments cons {A} | x xs
type inference should unify A (probably an implicit) with the A in the expected type before processing x and xs. If the expected type islist Q
andx
is anat
, thenN->Q
coercion could be inserted. If we wait, we may infer that the list islist nat
and there is not coercion tolist Q
.
-
bench system:
- plug decent graphs into ci.inria.fr/coq
- fix
coqc -quick -time
Bug 3934
-
developers manual:
- Enrich the document started by Wojciech Jedynak https://github.com/wjzz/Coq-Developers-Manual/releases/download/0.1/devman.pdf, github.
- Write down the policies (a real document): how to submit code to Coq, how to submit a contrib, how opam packages should be written...
-
kernel
- Make it possible for the kernel to accept an a priori unsound definition (not guarded, not universe consistent, not strictly positive) when the definition is prefixed by some command. This must be taken account by
Print Assumptions
with assumptions likefoo is total
. - Harden the kernel interface: move from arrays to an abstract type at least.
- Make it possible for the kernel to accept an a priori unsound definition (not guarded, not universe consistent, not strictly positive) when the definition is prefixed by some command. This must be taken account by
-
tactics:
- decouple the prelude from the tactics
- Coding the tactics of the
logic.ml
file in the new proof engine. These were the primitive tactics of the old proof engine and are currently implemented using a compatibility layer which, in particular, makes theInfo
command unaware of their semantics. - Implement a "debug" trace for tactics. The
Info
command gives a trace of the tactics which were effectively applied. In order to debug scripts, it may be useful to also have a trace of all the tactics which were attempted. - Port LtacProf to Coq 8.5, possibly hooking into the
Info
infrastructure.
-
declarative proof mode
- More robust implementation of the declarative proof mode. The declarative mode, because it's older, doesn't really take advantage of the disciplined focus API of the new proof engine and re-implements its features in a fragile way. To move forward, the code must be cleaned up and use the modern API.
-
Notation:
- control notation/implicits/coercions display on a sub term
-
stdlib:
- uniform names/notations see Bug 4110
- document the axiom used in each file/file-group
-
Evar instantiation failure explanation: given an evar defined in some context, and given a term with which the evar fails to unify, report to the user the list of variables that occur in the term but that do not belong to the context in which the evar was defined.
-
Computation of the dependency graph
The goal is to build an OCaml data structure representing the global dependency graph (given a set of compiled files):
- each node is labelled with the fully qualified path of a definition; the node carries a flag indicating whether the proof is transparent (i.e. Defined vs Qed).
- the node associated with "foo" has two sets of outgoing edges: one for describing the definitions that are required for typechecking the type of "foo", and one for describing the definitions that are required for typechecking the body of "foo" (body of the definition, or the proof term).
-
A lightweight abstraction mechanism
Currently, the only way to have a real abstraction layer is to use module signatures, which are very heavy in practice, as they require copy-pasting statements. It would be nice if the same result could be achieve through a simple top-level command, "Abstract foo bar." which would ensure that all the definitions mentioned have their definition made really opaque, as if the definitions/proofs where enclosed in a module signature.
-
Environments: a powerful replacement for sections
The idea is to introduce environments, which solve the problem of closing/reopening a section with similar variables and implicit types, and which generalizes the notion of notation scope and hint database. An "environment" consists of a set of declaration, among: context variables declaration, implicit types declaration, eauto hint declaration, local notation declaration, coercion declaration, instance declaration. (Note that dependencies are possible, i.e. an implicit type or a hint or a notation can be associated with a context variable.) An "environment" can be named, and can be opened in a section. It can be built as the union of existing environments (or by removing declarations from existing environments). Environments are functional (i.e. they are not extended in place), even though a convenient syntax can be provided for extending an environment and immediately rebinding it with the same name, so as to locally give the illusion that it is augmented in place. Having functional environments solves the modularity issue that is currently associated with scopes / hint / instances being global.
-
Speeding up recompilation in a project
The idea is to make it possible to recompile the definitions located in all the dependencies of a given file as fast as possible, by skipping all proofs in the dependencies, and avoiding the space blow-up currently affecting vio files.
-
"The command "coqlighten foo.v" generates "foo.light.v", which is the same as foo.v except that all lemmas whose proof ends on a Qed are replaced with a corresponding axiom. (coqlighten can probably be implemented using sed with the right regular expression). This file is typically compiled using "coqc" as "foo.light.vo".
-
"coqc -light bar.v" treats "Require Import foo" exactly as if it were "Require Import foo.light", and it produces as output the file "bar.vo.light" (instead of "bar.vo").
-
"coqdep foo.v" (where "foo.v" depends on "bar.v") produces dependencies using an extra level of indirection that is useful for the end-user (read further), as follows:
- foo.vo: foo.vo.requires
- foo.vo.requires: bar.vo
- foo.vo.light: foo.vo.light.requires
- foo.vo.light.requires: bar.light.vo
Note that we have "foo.light.vo: foo.light.v" following the standard compilation rule based on "coqc", and we also have "foo.light.v: foo.v" following the build rule based on "coqlighten".
-
In CoqIDE, add a shortcut that, when the current file is "foo.v", runs the command "make foo.vo.light.requires", and then (optionnaly) reloads the current file up to current location in this file. This allows making a change in another file "bar.v", and getting back to an up-to-date state in "foo.v" with minimal recompilation effort.
-
If parsing takes significant time, it is possible to dump the content of the parsed tree in binary format, in e.g. "foo.light.ast". This assumes, though, that the user will be responsible for doing a clean of those files if he changes the scopes or the set of notation being used.
-
-
(bonus) HTML5 interface for Coq developments The idea is to make sure that all the tools are ready to allow for the development of an alternative to CoqIDE, which would allow for:
- customizable display for domain-specific uses of Coq (e.g. CFML).
- display of latex-style mathematical formula using mathjax.
- working with Coq online without any local installation, in case a remote server is used for compiling scripts.
- integration in the display of links for looking up definitions.
What's needed:
- a basic http server that runs coqtop, and (preferably) that is able to do a little bit of caching to avoid the transmition of fule files on every change.
- a way for the server to obtain from coqtop structured AST (instead of plain strings), so as to be able to render structured display.
- a Coq plugin to be able to register latex notation with term constructs (such a plugin would also be useful to generate readable versions of formal definitions, e.g. for documentation purposes)."
-
(bonus) Development benchmark for Coq developers
The idea is to gather a few real, modern Coq developments, and use them for the during-the-day testing of changes to the code base of Coq.
- Select a number of developments provided by volunteers Coq power users, who are available to help in case the developers of Coq cannot easily figure out why a proof has been broken by their changes.
- For each, ask the authors to maintain a little script to describe which lemmas should be turned into axioms (to save compilation time), keeping only a representative subset of the lemmas in the developments. Typically, it would suffice to provide a list of lemmas to keep, e.g. in JSON format:
[ { file : "foo.v", keep : [ "lemma_x", "lemma_y" \], keep_sections : [ "Part1" ] }, { file : "bar.v", keep_all : "true" } ] // keep_all could be implicit.
The goal is to test a maximal number of aspects in less than 1 minute of compilation time per development. (If needed, it is also possible to exclude some files entirely.)
- The code can be pulled (on carefully-chosen commit points) form the git repository of the authors, then the filter on proofs is applied. Optionnaly, these generated files can be commited in a git used by coq developers, but this might not be necessary if the process is fast enough.
- It might be useful to also keep track of little patches that may need to be applied to the development, in order to cope with non-backward compatible changes. Such patches could be commited in the git of the Coq developers.