Verdicts
tanny check emits one verdict per checked model:
text
PASS examples/bank_account.py::small_account_model 884 states; deposit.amount ∈ 1..3, withdraw.amount ∈ 1..3; bounded by state_constraint
FAIL examples/die_hard.py::impl_model invariant not_solved
1. init: small=0, big=0
2. fill_big(): small=0, big=5
3. pour_big_to_small(): small=3, big=2
4. empty_small(): small=0, big=2
5. pour_big_to_small(): small=2, big=0
6. fill_big(): small=2, big=5
7. pour_big_to_small(): small=3, big=4
PASS#
Every obligation in the model held across all reachable states. The detail line summarizes:
- Distinct states explored (e.g.,
884 states). - Quantified action parameter domains (contiguous integer ranges of length > 2 are formatted as
lo..hi, e.g.,deposit.amount ∈ 1..3; other domains are formatted as sets). bounded by state_constraintif the model declares astate_constraint.symmetry of <constants>if symmetry reduction was applied.
If non-fatal warnings were attached to the model, (warns code1, code2) is appended.
FAIL#
A specification obligation was violated. The output shows FAIL <file>::<model> <kind> <name>[: <detail>], followed by a counterexample trace formatted in Python syntax:
- Step
1is alwaysinit: var1=val1, var2=val2, .... - Subsequent steps show the Python action name and bound argument values (
deposit(amount=2): ...) and the resulting state variables. - For temporal property (
liveness) violations, a lasso loop ends withback to state <N>. - TLA⁺ values are decoded back into Python representations (
True/False,None,'str', tuples/lists,frozenset(...),{k: v}, andSort('name')forModelValueinstances).
Failure kinds#
| Kind | Trigger |
|---|---|
invariant |
An Invariant clause or a variable's Where(...) type refinement was violated in a reachable state. |
action-invariant |
An ActionInvariant clause was violated on a transition. |
property |
A temporal Property clause was violated (e.g., always, eventually, leads_to). |
assumption |
An Assume clause evaluated to false for the model's constants. |
refinement |
A Refines[AbstractSpec] obligation failed; <name> identifies which part failed (init, step, or the abstract clause name) and <detail> names the abstract spec (of <Target>). |
contract |
A function's Ensures or return-type Where failed for some input in the model's domains satisfying Requires. |
deadlock |
A reachable state has no enabled action and check_deadlock=True. |
conformance |
A method body disagreed with its Action predicate (predicate), Ensures postcondition (ensures), Modifies frame (frame <var>), or return-type Where (result). |
assertion |
A Python assert statement inside a method body evaluated to false (assert at line <N>). |
runtime |
A Python runtime error occurred while evaluating a method body or expression (e.g., division/modulo by zero, index out of range, KeyError, popping an empty list). |
ERROR#
The model could not be checked. The output shows ERROR <file>::<model> <kind>: <file>:<line>: <message>.