ci: pass --strict when verifying TLAPS proofs - #128
Conversation
tlapm exits 0 even when proof obligations fail, so `|| status=1` never fires and the job reports success over a proof that did not close. The --strict flag (tlaplus/tlapm#278) turns failed obligations, incomplete proofs, and empty targets into distinct non-zero exit codes. All six _proofs.tla modules were run against tlapm 1.6.0-pre both with and without the flag; every module exits 0 either way, so this does not change today's outcome. It makes the job fail if a future change breaks a proof. Signed-off-by: Vasilis Nasopoulos <vasilis_nasopoulos@hotmail.com>
|
I suppose a similar change should be made at tlaplus/examples. ;-) |
|
Happy to. Before sending a patch there I would rather measure it: I will run the full set both ways and report what actually changes. If it is clean, the PR is the same one-word change. If it is not, that seems worth knowing regardless of whether the flag lands. |
|
Reporting back on I ran the same selection the CI makes — modules with a 60 are unaffected. Six change:
Exit 11 is the incomplete-proof case from #278 — steps carrying no proof, which generate no obligation and so do not show up in the count. THEOREM Invariance == Spec => []Inv
THEOREM Spec => C!Spec
<1>1. Inv /\ Init => C!Init
<1>2. Inv /\ [Next]_<<votes, maxBal>> => [C!Next]_chosen
<1>3. QED
BY <1>1, <1>2, Invariance, PTL DEF Spec, C!Spec
I have no opinion on whether these should be closed. Several are teaching material where leaving the interesting steps open is presumably the point, and that is a reasonable thing for a specification to do. The observation is narrower: as things stand the CI cannot distinguish a proof that closed from one that was asserted, so if any of those six is unintentional, nothing will say so. If it is useful, the options I can see are to add One caveat I cannot resolve from here: Full run, including the per-module table: https://github.com/vasilisnasopoulos-stack/vortex-dse-cslot-proofs/actions/runs/30656083825 |
|
Thank you for this analysis. I believe that indeed most of the omitted proofs are left open deliberately, although I agree that this is somewhat inconsistent (for example, I believe that Paxos/Voting.tla has a proof in the examples directory of the PM distribution). Instead of introducing "library" lemmas without proofs in EWD998_proof.tla, one should now be able to use the relevant lemmas about fold from the Community Modules. EWD687a_proof is recent, it passes both locally for me and in the CI. What environment do you use? |
|
Environment was the problem, and it was mine — apologies for the noise. I fetched Your
So On EWD998: agreed, and that seems like the more interesting thread — replacing the unproved local lemmas with the proved fold lemmas from CommunityModules would close the gap rather than just excluding it. Happy to look at that if it would help. |
|
If you want to have a stab at EWD998, that would be very welcome. Happy to help if necessary. Otherwise I may do it when I have some time. |
|
I'll take a stab at it — thanks for the offer of help, I may well take you up on it. Scope as I read it: nine lemmas in Plan is to replace the six with the community versions first and check nothing downstream breaks, then work on the three. I'll open a PR against |
|
There are some lemmas about sums in FiniteSetsExtTheorems, they may help. |
|
The Result on
One thing worth flagging: the module's local copy of
Opening a PR against |
The TLAPS job runs
but
tlapmexits 0 even when obligations fail, so|| status=1never fires and the job reports success over a proof that did not close. Context in tlaplus/tlapm#287;--strictwas added in tlaplus/tlapm#278 and gives distinct non-zero codes for failed obligations (10), incomplete proofs (11), and empty targets (12).This is not a latent failure here. I ran all six
_proofs.tlamodules againsttlapm 1.6.0-pre(096df83), with and without the flag:--strictFiniteSetsExtTheorems_proofs.tlaFoldsTheorems_proofs.tlaFunctionTheorems_proofs.tlaGraphTheorems_proofs.tlaQuorumTheorems_proofs.tlaSequencesExtTheorems_proofs.tlaAggregate status is 0 both with and without
--strict, so this changes nothing today. It makes the job fail if a future change breaks one of those 2,889 obligations, which it currently would not.Run: https://github.com/vasilisnasopoulos-stack/vortex-dse-cslot-proofs/actions/runs/30570917693