You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A minimal working example modifying the -vok option of coqc/rocqc such that
compilation does not fail on the first error inside proof, but discards all
commands to the end of that proof, which is admitted. Subsequent lemmas can
then be proved, and they can raise more errors. This makes it possible to have
several errors in the same file, but not in the same proof.
At the end of compilation, a report is generated, indicating how many proofs
failed, the name of each proof, and the error message. In the current
version, no location information is provided.
This version is a request for comments. One big unsatisfaction is the need
to change a line in stm.ml, because we need to use a command that is usually
reserved for interactive mode, while the compiler is a batch process.
An alternative choice would be to execute all commands, so that there could
be more than one error for each lemma and focusing information could be used
to guide the recovery process, but this would require more heavyweight
programming.
The example file on which this has been tested is:
Lemma L1 : False.
Proof.
exact I.
fail "any failure".
Qed.
Lemma L2 : True.
Proof.
exact I.
Qed.
Lemma L3 : True /\ False.
Proof.
split.
exact L2.
exact L1.
Qed.
Lemma L4 : True /\ False.
Proof.
split.
exact L2.
exact L2.
Qed.
Lemma L5 : False.
Proof.
Admitted.
Lemma L6 : False.
Proof.
exact L5.
Qed.
====
For this file, compilation with -vok reports 2 errors.
Error:
proofs failed in file ./trials/toto.v, number of failures: 2
L1
The term "I" has type "True" while it is expected to have type "False".
L4
The term "L2" has type "True" while it is expected to have type "False".
0 commit comments