Skip to content

Commit b89ecd8

Browse files
committed
PG manual: add documentation for proof-check-proofs
1 parent 4b02000 commit b89ecd8

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

doc/ProofGeneral.texi

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,6 +1916,7 @@ General covered in this chapter.
19161916
* View of processed files ::
19171917
* Retracting across files::
19181918
* Asserting across files::
1919+
* Proof status statistic::
19191920
* Automatic multiple file handling::
19201921
* Escaping script management::
19211922
* Editing features::
@@ -2256,6 +2257,80 @@ unmodified buffers. This is particularly useful as assertion may cause
22562257
the proof assistant to automatically process other files.
22572258

22582259

2260+
@node Proof status statistic
2261+
@section Proof status statistic
2262+
@cindex Proof status statistic
2263+
2264+
The command @code{proof-check-proofs} generates the proof status of
2265+
all opaque proofs in the current buffer, i.e., it generates an
2266+
overview that shows which of the opaque proofs in the current buffer
2267+
are currently valid and which are failing. When used interactively,
2268+
the proof status is shown in the buffer @code{*proof-check-report*}
2269+
(as long as @code{proof-check-report-buffer} is not changed).
2270+
2271+
Currently @code{proof-check-proofs} does only work for Coq.
2272+
2273+
@c TEXI DOCSTRING MAGIC: proof-check-proofs
2274+
@deffn Command proof-check-proofs tap &optional batch
2275+
Generate an overview about valid and invalid proofs.@*
2276+
This command completely processes the current buffer and
2277+
generates an overview about all the opaque proofs in it and
2278+
whether their proof scripts are valid or invalid.
2279+
2280+
This command makes sense for a development process where invalid
2281+
proofs are permitted and vos compilation and the omit proofs
2282+
feature (see @samp{@code{proof-omit-proofs-configured}}) are used to work at
2283+
the most interesting or challenging point instead of on the first
2284+
invalid proof.
2285+
2286+
Argument @var{tap}, which can be set by a prefix argument, controls the
2287+
form of the generated overview. Nil, without prefix, gives an
2288+
human readable overview, otherwise it's test anything
2289+
protocol (@var{tap}). Argument @var{batch} controls where the overview goes
2290+
to. If nil, or in an interactive call, the overview appears in
2291+
@samp{@code{proof-check-report-buffer}}. If @var{batch} is a string, it should be a
2292+
filename and the overview is appended there. Otherwise the
2293+
overview is output via @samp{message} such that it appears on stdout
2294+
when this command runs in batch mode.
2295+
2296+
In the same way as the omit-proofs feature, this command only
2297+
tolerates errors inside scripts of opaque proofs. Any other error
2298+
is reported to the user without generating an overview. The
2299+
overview only contains those names of theorems whose proofs
2300+
scripts are classified as opaque by the omit-proofs feature. For
2301+
Coq for instance, among others, proof scripts terminated with
2302+
@code{'Defined'} are not opaque and do not appear in the generated
2303+
overview.
2304+
2305+
Note that this command does not (re-)compile required files.
2306+
Files must be required before running this commands, for instance
2307+
by asserting all require commands beforehand.
2308+
@end deffn
2309+
2310+
@xref{Quick and inconsistent compilation} for enabling vos compilation
2311+
inside Proof General and see @xref{Omitting proofs for speed} for the
2312+
omit-proofs feature.
2313+
2314+
The interactive use of this commands is limited because it only works
2315+
on the current buffer. However, this commands can also be run in batch
2316+
mode in a script, for instance in a continuous integration
2317+
environment. To run this command on a buffer in batch mode, use
2318+
2319+
@verbatim
2320+
emacs -batch -l <your-pg-dir>/generic/proof-site.el <file> \
2321+
--eval '(proof-check-proofs <tap> <output>)'
2322+
@end verbatim
2323+
2324+
where @code{<tap>} should be @code{nil} for human readable output and
2325+
@code{t} for test anything protocol. If @code{<output>} is @code{t}
2326+
the proof status appears in the standard output of the Emacs process.
2327+
Otherwise @code{<output>} should be a filename as string in double
2328+
quotes. Then the proof status is appended to this file. (If
2329+
@code{output} is @code{nil} or omitted, the proof status is only put
2330+
into the @code{*proof-check-report*} buffer, which does not make much
2331+
sense in a batch command as the one above.)
2332+
2333+
22592334
@node Automatic multiple file handling
22602335
@section Automatic multiple file handling
22612336

@@ -4228,6 +4303,7 @@ assistant. It supports most of the generic features of Proof General.
42284303
* Proof using annotations::
42294304
* Multiple File Support::
42304305
* Omitting proofs for speed::
4306+
* Proof status statistic for Coq::
42314307
* Editing multiple proofs::
42324308
* User-loaded tactics::
42334309
* Indentation tweaking::
@@ -5169,6 +5245,20 @@ non-opaque, even if they have proof-local effect only, such as
51695245
@end itemize
51705246

51715247

5248+
@node Proof status statistic for Coq
5249+
@section Proof status statistic for Coq
5250+
5251+
The command @code{proof-check-proofs} generates the proof status of
5252+
all opaque proofs in the current buffer, i.e., it generates an
5253+
overview that shows which of the opaque proofs in the current buffer
5254+
are currently valid and which are failing. This command is useful for
5255+
a development process where invalid proofs are permitted and vos
5256+
compilation (@xref{Quick and inconsistent compilation}) and the omit
5257+
proofs feature (@xref{Omitting proofs for speed}) are used to work at
5258+
the most interesting or challenging point instead of on the first
5259+
invalid proof. See @xref{Proof status statistic} for more details.
5260+
5261+
51725262
@node Editing multiple proofs
51735263
@section Editing multiple proofs
51745264

0 commit comments

Comments
 (0)