coq-tools
Some scripts to help manipulate Coq developments
coq-bug-minimizer
Some scripts to help construct small reproducing examples of bugs.
The script find-bug.py is the main program; run find-bug.py -h to
see the options. The script will ask you two questions: whether or
not it successfully determined the error you're seeking to reproduce,
and whether or not it created a regular expression which captures that
error. After that, it will run without user input until it finishes.
Usage
Standard usage is to invoke with the buggy file name and the output (minimized) file name:
python find-bug.py BUGGY_FILE.v OUTPUT_FILE.v
You can add -v for a more verbose output.
If you are using a non-system version of Coq, you can pass --coqtop /path/to/coqtop and --coqc /path/to/coqc. If you pass -R . Foo
to, say, coq_makefile, you can inform find-bug.py of this fact
using -R . Foo.
Examples
There is an example in the examples directory. You can run
run-example-01.sh to see how the program works. You can pass this
script the arguments -v, -vv, or -vvv for different levels of
verbosity. Look at the contents of run-example-01.sh to see how to
invoke the program.
Known Bugs
Note that this program can fail in mysterious ways when run using Windows Python 2.7 under cygwin; it seems that buffering and stdin and stderr and Popen are screwed up. To work around this, there is a coqtop.bat file which is chosen as the default coqtop program. Somehow running via a .bat file makes things work. You will probably have to use a similar wrapper if you use a custom coqtop executable.
Additionally, quirks in module name resolution can result in inlining
failures (see https://github.com/JasonGross/coq-tools/issues/16), and
global side effects of Require can also result in failures (see
https://github.com/JasonGross/coq-tools/issues/41).
Publications
- Jason Gross, Théo Zimmermann, Miraya Poddar-Agrawal, and Adam Chlipala. Automatic test-case reduction in proof assistants: A case study in Coq. ITP 2022
- Jason Gross. Coq Bug Minimizer, CoqPL 2015
minimize-requires
The script minimize-requires.py can be used to remove unneeded Require
statements. Run minimize-requires.py -h to see the options.
Usage
Standard usage is to run
minimize-requires.py some-file1.v some-file2.v ... --in-place .bak
or, if you want to minimize an entire project,
minimize-requires.py --all -f _CoqProject
(you can add --in-place .bak if you want to save backup files)
proof-using-helper
The script proof-using-helper.py is the main program; run
proof-using-helper.py -h to see the options.
Usage
Standard usage is to invoke with the any -R arguments passed to Coq,
and either pipe the output of make quick with Global Set Suggest Proof Using
on, to this script, or to give it a file containing said output.
make quick -j -k | tee -a proof_using.log
python /path/to/proof-using-helper.py proof_using.log
You can add -v for a more verbose output.
Metadata
Release files for coq-tools 0.0.44
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| coq_tools-0.0.44.tar.gz | 131.5 kB | With provenance | Details for coq_tools-0.0.44.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| coq_tools-0.0.44-py3-none-any.whl | Python 3 | none | any | Details for coq_tools-0.0.44-py3-none-any.whl |
Total release size: 274.9 kB
Release files / coq_tools-0.0.44.tar.gz
| Download URL | coq_tools-0.0.44.tar.gz |
|---|---|
| Size | 131.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9fc1a4d6f0c1ae4903e078058462d582b71d44471b31f45fda2f30fd5cbed11
|
|
BLAKE2b-256 checksum How to use checksums |
170d6e556329db692b8d9e5f5a3c6265cd19189720003f2853d4de7adca318b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logRelease files / coq_tools-0.0.44-py3-none-any.whl
| Download URL | coq_tools-0.0.44-py3-none-any.whl |
|---|---|
| Size | 143.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6258f8ee70b8b27923afc09fcae4b70634094e72e35d35ac5b01821087a84bcf
|
|
BLAKE2b-256 checksum How to use checksums |
c1929bcf64f2a67139931e76d7c1015e9e0b98694df80017ff3efc71ca0037f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logSecurity for coq-tools 0.0.44
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for coq_tools-0.0.44.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.