When tlapm --line <n> is given a line that does not select any proof obligation, TLAPM exits successfully and reports that all
zero obligations were proved. This can make an off-by-one line number look like a successful proof.
Reproducer
---- MODULE true_test ----
EXTENDS TLAPS
THEOREM TRUE
OBVIOUS
====
$ tlapm --line 1 true_test.tla
@!!BEGIN
@!!type:obligationsnumber
@!!count:0
@!!END
File "./true_test.tla", line 1, character 1 to line 8, character 4:
[INFO]: All 0 obligation proved.
$ echo $?
0
Proposed behavior
For an explicit target such as --line, selecting zero obligations should return a nonzero exit code,
e.g.
[WARNING]: No proof obligation found at line 1.
A full-module run with genuinely zero obligations can still succeed. The proposed change is only for explicit proof targets
(--line, and possibly targeted Toolbox ranges).
Environment
$ tlapm --version
fd3988f
Potentially related: #245
When
tlapm --line <n>is given a line that does not select any proof obligation, TLAPM exits successfully and reports that allzero obligations were proved. This can make an off-by-one line number look like a successful proof.
Reproducer
Proposed behavior
For an explicit target such as
--line, selecting zero obligations should return a nonzero exit code,e.g.
A full-module run with genuinely zero obligations can still succeed. The proposed change is only for explicit proof targets
(
--line, and possibly targeted Toolbox ranges).Environment
Potentially related: #245