Documentation
¶
Overview ¶
Package formal lints the TLA+ models under hack/formal for the mistakes that make a model check pass for the wrong reason.
Every check here exists because that mistake produced a false green while these models were being written:
unassigned-variable A variable no action assigns. TLC reports it as
"Successor state is not completely specified", but only
on the paths it explores, and any rule over such a
variable is vacuously true. An entire gate rule was
silently vacuous this way.
duplicate-assignment The same variable assigned twice in one branch. TLA+
conjoins them, so a contradicting assignment can never
fire. This hid the ordering bug the /goal model exists
to find.
assigned-and-unchanged A variable both assigned and listed in an UNCHANGED
tuple pins it twice. A bulk edit made every action in
the session model unsatisfiable this way, and the run
explored two states while reporting success.
vacuous-rule A rule whose premise needs a literal no action produces.
The lint is branch-aware: THEN/ELSE and a leading \/ start separate branches, so an action that differs per branch is not read as a contradiction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finding ¶
Finding is one structural problem in one spec. String renders it the way the command prints it, so a caller that logs findings and a caller that compares them see the same text.
func Lint ¶
Lint checks one spec's source text and returns its findings. file is used only for messages.