Repository navigation
Conversation
A rule could be listed under "Rules that hold" while TLC warned that the model cannot break it, for example when an action sets a variable and also lists it as UNCHANGED. The warning reached tlc.out only. report.md now gives TLC's warnings under "TLC warnings", above "Rules that hold", once each. They come from every verdict run, not only the first: a run that stops at a deadlock or a broken invariant can stop before TLC evaluates the bad action, so only a later run prints the warning. The report leaves out TLC's advice on Java's garbage collector (code 2401), and in a bounded rerun the warning about constraints during liveness checking (code 2284), because statechart adds that constraint itself. The exit code does not change. Refs cursor#1235
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1235 (level 1: carry TLC's warnings into
report.md)Why
statechartcould list a rule under "Rules that hold" when TLC had warned that the model cannot break it. The common cause is an action that sets a variable and also lists it asUNCHANGED, so the action can never fire. TLC prints a warning (code 2143), but it reachedtlc.outat most, andreport.mdgave a clean pass. With the spec from #1235 onmain:The chart has no
BankAcceptsarrow, and nothing else says so.Root cause
report()never read TLC's warning messages. The first fix I tried read them from the first verdict run only (the run thattlc.outprints). Review found that this was not enough. When a deadlock or an invariant breaks first, TLC stops before it evaluates the bad action, so only the bounded rerun that judges the remaining rules prints the warning.judge()inrun.tsthrew that output away; it keeps later runs' messages only for broken rules. So the false pass came back as soon as the config had one more rule that breaks early.What changed
frontends/verdict.ts:readVerdictnow also collects the run's level-3 (warning) messages in the pass it already makes. It leaves out two of them:TLC_ENVIRONMENT_JVM_GC), TLC's advice to run Java with-XX:+UseParallelGC. Every run prints it, and it says nothing about the model.TLC_FEATURE_LIVENESS_CONSTRAINTS), in bounded reruns only. Statechart adds theCONSTRAINT ChartBoundthat causes it there; an unbounded run or the user's ownCONSTRAINTkeeps it.run.ts:judge()gathers the warnings of every verdict run, once each, in first-seen order, and returns them onCheckResult.warnings. The drawing run (ChartRun) is not read.backends/report.ts: when there are warnings, the report gets a## TLC warningssection above## Rules that hold, with each warning in a fenced block. The exit code does not change; a warning is not a failure.SKILL.md: one bullet under the report notes saying where the section comes from and what it leaves out.harness/pstack/withscripts/generate-pstack-harness-trees.mjs.Level 2 of the issue, listing the actions of
Nextthat made no step, is not in this PR.Tests
UnchangedWarning: the spec from pstack statechart: a rule "holds" when the action that could break it can never fire, and the report drops TLC's warning #1235, recorded with TLC 1.7.4. The warning is in the first run.UnchangedAfterDeadlock: one initial state deadlocks, so the warning appears only inverdict-2.out(a bounded rerun).## Rules that hold, and thatUseParallelGCdoes not appear. The second also checks that the deadlock break is still reported. Both failed before the change: the first onmain, the second on the first-run-only version.PickWorker/report.mdnow includes TLC's 2279 warning ("Declaring symmetry during liveness checking is dangerous …"), which comes from that case's ownSYMMETRY+PROPERTYconfig.MediaPlayer's report is unchanged: its only extra warning is the 2284 from statechart's bounded rerun. All other corpus recordings and reports are byte-identical.Verification
Run on this branch, Linux, Node 24.22:
node --disable-warning=ExperimentalWarning --test pstack/skills/*/scripts/test/*.test.tswithoutTLA2TOOLS: 350 tests, 278 pass, 0 fail, 72 skipped (main: 340 / 270 / 0 / 70).TLA2TOOLSset to tla2tools.jar 1.7.4 and a JDK 21: 385 / 385 pass (main: 373 / 373). These include the live TLC runs of every corpus case.node scripts/generate-pstack-harness-trees.mjs --check: up to date.node scripts/validate-plugins.mjs: all plugins validated.git diff --check: clean.mainand this branch. Exit codes andchart.mmdwere identical in every case.SYMMETRYorCONSTRAINTwith aPROPERTYin the user's config.report.mdis byte-identical tomain.## Rules that holdstays inside its fence.Known limits
tlc.outis still the first run only. A warning that only a later run printed is inreport.mdbut not intlc.out. The SKILL.md bullet says why.