Proto commits in fizzbee-io/fizzbee

These 47 commits are when the Protocol Buffers files have changed:

Commit:323c492
Author:Claude

Add block labels and the threads query module Blocks can carry one or more labels, with an optional flow word: `cs:`, `serial txn:`, `atomic cs, txn:`. A label never changes the flow; an unlabeled block inherits the enclosing flow as before. The parser warns when a label is one edit away from a flow word. `import threads` gives PlusCal-style control-state queries without hand-maintained flags such as in_cs: threads.inside(path, role=None) any thread inside a block/action threads.count(path, role=None) exact count (errors under MANY) threads.cardinality(path, role=None) 0, 1 or MANY threads.all() / threads.current() handles with .inside() and .copies Paths are [Role.]ActionOrFunc[.label]. "Inside" is derived from each frame's pc, so it adds no state: the frame's next statement lies within the block, or the frame is in a call made from within it. Tests: tests/specs/labels-{boundaries,structure,shadow,crash,capped, capped-buggy}, modelchecker/labels_test.go, parser/labels_test.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Commit:ea134ec
Author:fizzbee
Committer:GitHub

Add import statements for builtin and .star modules (#475) * Parse import, import-as and from-import statements into File.imports The grammar already accepted Python's import forms, but the visitor had no handler, so 'import math' crashed the parser. Top-level imports now fill File.imports (Import gains a names list for the from form). Star imports, relative imports, dotted imports without an alias, imports sharing a line and imports inside actions, functions or roles are parse errors. parser/import_test.py checks the parser against Python's ast module on 300 generated import blocks, plus the rejected forms. Parsing every reference, regression and lovable spec gives byte-identical JSON before and after this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Bind imported modules and members in the spec's environment import statements now resolve at load time: builtin modules from lib.ImportableModules first (math, itertools, symmetry, cardinality for now; new modules such as threads register there and are import-only), then <path>.star under the spec's directory, with dotted paths as subdirectories. m.fizz is reserved and gives 'not supported yet'. Imported names live in Heap.globals, so actions, functions, roles, assertions and top-level statements all see them, and they stay out of the state. Unlike other globals, a local may shadow an import, as in Python. Errors carry the import's line: unknown module or member, a name imported twice, a top-level variable reusing an imported name. A spec with any import no longer auto-loads every .star file in its directory. Tests: modelchecker/imports_test.go covers resolution, member lookup, frozen user modules, one load per module, a builtin hiding a local file, and each error. examples/references/18-01-imports covers user modules, aliases, from-imports and a local shadowing an import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Make imports strict: local files first, imports first, clashes are errors Changes after design review: - Resolution: <spec dir>/<path>.star first, then a builtin module, so a builtin added in a later release cannot change what an import means. A local file hiding a builtin prints a warning. .fizz files are not looked up. - Imports must come before every other top-level statement, and are resolved eagerly: a broken import fails even when unused. - User modules are cached by canonical path (symlinks resolved), so one file is loaded once; load failures are cached too. Module values are frozen deeply. from-imports of names starting with _ are rejected. - Load-time errors when an import name is also a function, role, action, top-level variable or state variable. Locals, parameters and comprehension variables may still shadow an import in their scope. - A spec with imports that uses a .star file it did not import gets a hint to add the import. Import errors print as FAILED with paths relative to the working directory. Tests: tests/specs/import* cover each clash, an unused missing import, private names, a local file hiding a builtin, the auto-import hint, the namespace in every context (imports-namespace), and that unused imports leave node and state counts unchanged. imports_test.go adds symlink identity, deep freezing, cached load errors and declaration clashes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Reject imports of reserved names; test module immutability and isolation An import may not bind Channel, deepcopy, resolve_role or self (role names were already rejected). Ordinary builtins such as len may still be shadowed. New tests in imports_test.go: nested collections, aliases to the same list, module attribute assignment, and exported functions that mutate module data all fail on frozen modules; module code cannot call load(), reach time, random or the model; and each spec run gets its own module cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Update clash baselines for the reworded import error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test that specs without imports keep legacy .star auto-import tests/specs/legacy-autoimport: an unrelated broken .star file does not stop the spec, and the auto-imported module still wins over a local of the same name (the #438 order, unchanged here). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Document import statements in the fizz-spec skill Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Review fixes for imports - lib.ImportableModules comment: local .star files win over builtins. - The preinit hook sees imports above builtins, as other code does. - Composition leaves imported Starlark functions out of the composed state, like modules and builtins. - Fold a duplicated nil check in PanicOnError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * imports: catch state and top-level clashes at load time, add review tests Address review feedback on the imports PR: - An import that clashes with a top-level variable or an Init state variable is now a load-time error naming both lines, instead of a runtime panic. - Modules load from their canonical path, and a module's name is its import path. - Document the reserved-name policy. Tests: - tests/specs/imports-shadowing: locals, params, loop vars and comprehensions shadowing imports, plus write-back of unchanged values. - tests/specs/import-symmetry-alias and import-symmetry-from: same state counts as 16-05 when symmetry is imported with an alias or by from-import. - TestImportsAreStaticEnvironmentInTheHeap: imports do not change the state hash or JSON, and Clone shares them. - Parser tests for comments between imports and per-module positions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * imports: find variable clashes in nested blocks and legacy init The load-time check for an import that reuses a variable name only looked at statements directly in Init and at the top level. It now walks nested blocks (if, for, any, while, plain blocks), loop variables, call results, multi-line Starlark statements, and the legacy `init:` block. Def bodies and comprehensions are skipped, since their names are local. Also: - Warn once when a local .star file hides a builtin, not once per import. - Run the state codec round trip on a spec with builtin and local imports. - Document that imports-first is a syntax rule, that _names follow the Starlark privacy convention, and that module top-level code runs once at load time. Tests: - TestDeclaredNamesFindsNestedAndLegacyVariables covers each form. - tests/specs/import-clash-nested-init and import-clash-legacy-init. - TestStateCodecProcesses and TestStateCodecForkEquivalence now include testdata/statecodec/Imports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * imports: only direct Init assignments clash with imports The runtime makes state variables only from the direct statements of Init. A name assigned in a nested block (if, for, any, while, atomic:) or as a loop variable stays local to Init and shadows the import there, as a local does in a Python function. The previous commit rejected those as clashes, which turned valid specs into errors. The scan now matches the runtime exactly; the legacy init: block, which runs as one module-scope Starlark chunk, is still scanned in full. Tests: - TestDeclaredNamesMatchesRuntimeVariables: direct, tuple and call assignments in Init clash; nested blocks and loop variables do not; legacy init blocks clash except inside defs and comprehensions. - tests/specs/import-shadow-nested-init: a nested `math = 3` in Init is local there, does not become state, and Step still uses the import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>

Commit:4485025
Author:Claude

Parse import, import-as and from-import statements into File.imports The grammar already accepted Python's import forms, but the visitor had no handler, so 'import math' crashed the parser. Top-level imports now fill File.imports (Import gains a names list for the from form). Star imports, relative imports, dotted imports without an alias, imports sharing a line and imports inside actions, functions or roles are parse errors. parser/import_test.py checks the parser against Python's ast module on 300 generated import blocks, plus the rejected forms. Parsing every reference, regression and lovable spec gives byte-identical JSON before and after this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Commit:a1b6dbc
Author:fizzbee
Committer:GitHub

Add @assume on liveness assertions (#465) * Add @assume on liveness assertions @assume(finite=[...], weak_fair=[...], strong_fair=[...], unfair=[...]) checks one liveness assertion as if the named actions ("Action" or "Role.Action") had those modifiers: finite is fair<fault>, weak_fair is fair<weak>, strong_fair is fair<strong>, and unfair drops the fairness. Other assertions are unaffected. (The argument is weak_fair, not fair, because fair is a keyword.) Every link now records the action its thread belongs to (Link.Action, via Process.Action, like Fairness). For an assertion with assumptions, both liveness engines run with the named actions' link fairness overridden, and the links are restored afterwards; the SCC graph is rebuilt for that assertion. Shadow mode applies the same assumptions to both engines. Names are validated before model checking: unknown actions, Init, an action named twice, and @assume on a safety assertion are errors. Non-strict liveness modes reject @assume, and simulation warns that it ignores it. Assumed-fair actions of symmetric roles join the issue #427 symmetry warning. The grammar allows decorators on assertions; FizzParser.py is regenerated with ANTLR 4.13.2 (the same tool reproduces the previous file byte for byte from the previous grammar). Tests: reference examples 10-14 to 10-16 (in shadow mode), a regression spec for an unknown action name, and a randomized test that an assumption changes exactly the named actions' links and is fully undone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test @assume scoping, nested steps and per-instance fairness From review of the @assume change: - The cycle finder restores assumed fairness with defer, so a panic in one assertion's check can't leave the shared graph overridden. - 10-17: four assertions assume different things about the same action; each sees exactly its own, before and after the others. - 10-18: @assume on a temporal formula, next to the same formula without it. - 10-19: finite reaches every step of actions that loop through a function call, a role call, nested and parallel blocks and a fair choice. - 10-20: weak_fair on a role action is per instance. Making the SCC engine's action identity aggregate flips this example to a failure, so it tells the two apart. - tests/specs/assume-symmetric-warning: assumed fairness on a symmetric role's action shows the issue #427 warning. - parser/assume_test.py covers @assume parsing and every parse error; TestValidateAssumptions adds a name repeated in one list, empty lists and formula assertions. A name repeated in one list now gets its own message. The language reference now spells out that assumed weak/strong fairness on a role action is per instance while finite is aggregate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>

Commit:69f97ef
Author:Claude
Committer:fizzbee

Classify oneof targets in the parser; filter conditions before forking The parser now records what a oneof assigns to (a bare name, an attribute or an index) in AnyStmt.target_kind, replacing the regex the checker used on the target text. The block form `oneof TARGET in ...:` with a non-name target is rejected by the parser. `TARGET = oneof S if C` used to fork one process per candidate and then evaluate C in each fork, discarding the forks C rejects. The checker now evaluates C before forking and forks only the candidates that pass: - For a name target, C reads the candidate through that name, as before. - For an attribute or index target, the parser rewrites every occurrence of the target in C to a synthetic name (`self.z = oneof S if self.z != 2` behaves like `__c = oneof [__c for __c in S if __c != 2]; self.z = __c` in one step). When C still refers to the target's base object some other way (`self.ok()`, `len(d)` for `d[k]`), C could observe the assignment, so it is left alone and evaluated in each fork after the assignment, as before. AnyStmt.choice_var tells the checker which name to bind; it is empty when the condition must run in the fork. An AST without target_kind (from an older parser) runs as a name target, as it always did. Tests: - parser/oneof_target_test.py: target classification, condition rewrite (quotes, spacing, multi-line, unicode), fallbacks, parser output. - tests/specs/oneof-condition-in-parent: name, state-variable, role-valued, field and dict targets, serial action, a fallback whose condition sees the assignment (fails if the fallback is removed), and an all-rejected choice. Same state count as the previous binary. - tests/specs/oneof-assign-field still passes unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Commit:fc3839f
Author:Claude
Committer:fizzbee

Add fair<fault> actions that can happen only finitely often A fault written as an action (a message drop, a partition, a spurious timeout) was just an unfair action, so it could repeat forever inside a liveness counterexample's loop. fair<fault> marks such an action like an injected crash: every step of it, including the steps after its first yield, may appear in the prefix but never in the loop, and it creates no fairness obligation. The continuation of a fault already started keeps its strong fairness, so a run can't leave a fault half done forever. The qualifier is a plain name in the grammar, so this adds no keyword. It is rejected on any/oneof choices for now. Both liveness engines are covered: the SCC engine maps fault links to crash-class edges, and the cycle finder skips them like crash links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Commit:ca9dea0
Author:fizzbee
Committer:GitHub

perf(modelchecker): --experimental_collapse_steps links yield points directly (#415) * perf(modelchecker): cut per-state overhead on the default BFS path Kafka transactions at 3 brokers and 3 clients (15,498 states, the TLC-matching spec): 1 min 45 s and 6.0 GB on main, 1 min 03 s and 4.8 GB after this change. State counts are unchanged on the Kafka spec and on all 113 reference and lovable examples. Memory and GC: - Stop appending every fork to Process.Children. Nothing reads it, and the back-reference kept every fork (dedup'd ones included) alive as long as its parent. - Raise GOGC to 400 with a memory limit at 80% of RAM (env overrides win). The collector was 39% of CPU on the default settings; it is 14% now. Cloning: - Clone records by walking their sorted entries instead of a StringDict round trip and a re-sort. - Clone genericset, genericmap and bag by appending: the source keys are distinct and a permutation renames them bijectively, so the per-insert equality scan (quadratic in the set size) was redundant. Hashing and dedup: - When the spec declares no symmetric roles or values, hash the state in place with roles in canonical order instead of cloning it and running the permutation machinery. 11% of CPU on a spec with no symmetry. - Keep that hash cached so a dedup hit's Node.Duplicate does not recompute it. - Role and record JSON without fmt.Sprintf and without rebuilding and re-sorting the record's field map. Statement execution: - Cache the constant part of the statement environment (builtins, globals, modules and the constructor builtins) per process instead of rebuilding it for every statement. The late-bound names are re-asserted after the state and locals so the shadowing order is unchanged. - Cache GetNextFieldPath per (AST, path); it re-split the path and walked the proto by reflection on every statement. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * perf(modelchecker): --experimental_collapse_steps links yield points directly Mid-action steps that are neither yield points nor fair `any` choices are no longer stored in the graph or the visited set. Once an action's internal steps are explored to the next yield point, that yield point links directly from the previous one; the merged link keeps the action link's name, type, fairness and request id and accumulates labels, messages, returns and failed invariants from the collapsed steps. Liveness reads fairness only on links out of init/yield/crash nodes and fair-choice nodes (isObservationNode, isFairChoiceNode), so those stay as nodes and the cycle finder sees the same fair links. Internal steps are deduplicated per expansion in stepVisited, so a mid-action state reached from another yield point is explored again rather than kept alive. Process.Parent is re-pointed past collapsed steps after the transition invariants have read it, so the collapsed Process objects become collectable once the expansion ends. propagateEnabled walks to the same place either way, since a step is only Enabled after its ancestors were. Off by default and honoured only on the default BFS path: guided traces match link names step by step and refinement reads every stored node, and simulation, the processed queue and no_graph modes have their own loops. Kafka transactions 2x2 (316 states): 888 nodes -> 384, same states and result. The reference suite passes with the flag on and off, with only the Nodes count differing when it is on. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * collapse steps: keep the choices and branching weights on collapsed links A collapsed link stood for several steps but recorded only the action name, so the explorer lost which choices were made inside the action, and the exported graph gave every successor of a yield point an equal share of its probability mass although the original branching was not equal (two intermediate branches, one splitting again, should give the three outcomes 0.25, 0.25 and 0.5, not a third each). Each intermediate fork now records its share of its source node's fan-out (1/number of forks) on the link. mergeCollapsedLink multiplies the shares along the collapsed path and appends each collapsed step's name to Choices; Duplicate and Attach carry both. GenerateProtoOfJson exports Choices as the new `choices` link field and, where a node's links carry weights, normalises them over the node instead of using 1/number of links, so the weights the probabilistic analysis reads are the original branching probabilities. Without the flag nothing changes: intermediate links all carry the same share, which normalises to the same 1/number of links as before. Label-based custom probabilities are per branch at a specific node; the collapsed link carries the union of the labels, so the analysis of a performance model with label probabilities should run without the flag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * collapse steps: note the known gaps at the flag definition Weights and the performance tool, failure traces, and failed-invariant merging, found while validating collapsed runs against uncollapsed ones. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * collapse steps: turn the flag off for dfs, random and simulation They run the same Start loop with a stack or random queue, so the flag was active there although it was only validated on bfs. Print a note and ignore it instead, and say so in the flag help. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>

Commit:569e7b2
Author:fizzbee
Committer:GitHub

Add unless (weak until) to temporal formulas (#411) P unless Q holds when P holds until Q, or forever if Q never happens. It is a new formula op the checker maps onto the existing until, so the automaton and product are unchanged. release is left out: P R Q is Q unless (P and Q). Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 Co-authored-by: Claude <noreply@anthropic.com>

Commit:4586b32
Author:Claude

collapse steps: keep the choices and branching weights on collapsed links A collapsed link stood for several steps but recorded only the action name, so the explorer lost which choices were made inside the action, and the exported graph gave every successor of a yield point an equal share of its probability mass although the original branching was not equal (two intermediate branches, one splitting again, should give the three outcomes 0.25, 0.25 and 0.5, not a third each). Each intermediate fork now records its share of its source node's fan-out (1/number of forks) on the link. mergeCollapsedLink multiplies the shares along the collapsed path and appends each collapsed step's name to Choices; Duplicate and Attach carry both. GenerateProtoOfJson exports Choices as the new `choices` link field and, where a node's links carry weights, normalises them over the node instead of using 1/number of links, so the weights the probabilistic analysis reads are the original branching probabilities. Without the flag nothing changes: intermediate links all carry the same share, which normalises to the same 1/number of links as before. Label-based custom probabilities are per branch at a specific node; the collapsed link carries the union of the labels, so the analysis of a performance model with label probabilities should run without the flag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Commit:736c782
Author:Claude

Add unless (weak until) to temporal formulas P unless Q holds when P holds until Q, or forever if Q never happens. It is a new formula op the checker maps onto the existing until, so the automaton and product are unchanged. release is left out: P R Q is Q unless (P and Q). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4

Commit:320b8d8
Author:fizzbee
Committer:GitHub

Add possibly to temporal formulas (#408) * Add possibly to temporal formulas `possibly P` holds in a state when some path from it, of zero or more steps, reaches a state where P holds (CTL's EF). It can appear anywhere a condition can in a formula assertion, and takes a state condition: atoms, and/or/not/implies and nested possibly. assertion CanCancel: return always (booked implies possibly cancelled) Checker: after the graph is built, each possibly is one backward search from the states where its operand holds, over fair and unfair links but not crashes. The result is one more atom of each state's letter, so the LTL product is unchanged. Nested uses are computed innermost first. A failing formula prints a note naming the first step after which a possibly is false. Parser: possibly and `exists eventually` (another spelling) build a POSSIBLY node. `possibly (always P)` and other temporal operands are errors, as is any other use of exists in a formula. A return that uses `possibly (` parses as a formula, falling back to a plain return outside assertions. Atoms plus uses of possibly are limited to 64 at load time. Docs and examples: a Possibility section in the language reference, and reference examples 09-16 (passing) and 09-17 (a violation). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Keep nested possibly(...) calls plain outside assertions A return that uses `possibly (` parses as a formula. Outside an assertion it fell back to a plain return only when the formula had a possibly node, so `return helper(possibly(1))` in a func, which parses as a single atom, failed with "implies can only be used in the return of an assertion". Fall back whenever the formula has no temporal operator and no implies. Also list a failing formula's possibly notes in source order, and add parser tests: possibly as an operator and as a name, operand and precedence errors, and the 64-atom limit with nested uses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Name the formula flag for linear-time operators Formula.temporal meant "has a linear-time operator", which possibly is not, but possibly is still temporal in the wider sense. Rename it to linear_time. Also state the operator counts in the parser's atom-limit test, cover returns that span lines, and say in the language reference that possibly is the one branching-time operator. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Check that the checker allocates the parser's atom count At the parser's limit, with repeated conditions and a nested possibly, the checker allocates the same 64 bits on the parser's own output. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 --------- Co-authored-by: Claude <noreply@anthropic.com>

Commit:ae9d9cf
Author:fizzbee
Committer:GitHub

Check full LTL formulas in assertions (#405) * Spike: call fizz funcs inside assertion expressions Each call runs synchronously on a fresh clone of the assertion's process, fails on forks, and is bounded by a statement budget. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Allow fizz func calls inside assertion expressions Fizz funcs could only be called as statements (r = f()). Inside assertions and invariants lines, they can now be called anywhere in an expression: not c.is_zero(), total() == MAX, list comprehensions. Each call runs to completion on its own clone of the state and must be deterministic. Also: - bound assertion evaluation to 1M statements, so an endless loop or a failing require in an assertion errors instead of hanging - include the nested cause in ModelError messages - make constants visible on invariants: lines Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Explore past Init in the predicate call tests The tests left MaxConcurrentActions at 0, so no action ran and only the initial state was checked. Allow one action at a time, as the CLI's defaults would, so the assertions are checked in every state. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Check full LTL formulas in assertions An assertion without a prefix can now return a temporal formula built from always, eventually, until, leadsto, implies, and, or and not: assertion Answered for c in range(NUM_CLIENTS): return pending[c] leadsto not pending[c] Parser: a formula return rule with until/leadsto/implies/possibly as soft keywords, an optional prefix on assertiondef, and `for` clauses on the header. Maximal non-temporal subtrees become atoms (implies written out), a prefix operator on the left of a binary needs parentheses, and the body must end with its only return. always P, always eventually P and eventually always P compile to today's prefixed assertions. Checker: the block returns every atom's value once per state. Formulas are checked on the SCC engine through the product with the negation's generalized Büchi automaton; steps inside an action repeat the last state's letter, which LTL without next can't observe. `for` clauses expand into one instance per binding before Init. FIZZ_LIVENESS_ENGINE=formula runs the classic liveness assertions through the product too, for comparison. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Restore set-aside builtins on every path, and test argument binding callFizzFunc moved next_states and other heap builtins aside while cloning and put them back afterwards; a panic inside the clone would have left the calling process without them. Do the restore in a defer. Add table tests for positional, keyword and default arguments and their errors, checking that the caller's heap is unchanged after each call. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Map roles returned by predicate calls back to the caller A func called in an assertion ran on a clone and returned the clone's values as is, so a returned role was a different object from the caller's: it compared unequal, and calling its methods failed with "receiver is not part of the state". Copy the result, mapping the clone's roles back to the caller's. Containers are copies, so changing them can't reach the caller's state. Also print the nested cause in ModelError.SprintStackTrace, which the CLI uses for model errors. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Don't let assertions shift role and channel ids Roles and channels created while evaluating an assertion, including in the funcs it calls, advanced the global id counters, so later real actions got different ids. Snapshot the counters around each round of invariant and transition-assertion checks and restore them on every path, as the next_states() probe already does. Also make the RoleReturns container test use expression-form calls, so it exercises the return-value mapping instead of the statement path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Test that assertion funcs don't shift channel ids Covers the channel half of the global allocation counter restore, the same way TestPredicateCallsDontShiftRoleIds covers role ids. Without the restore, Spawn's channel gets id 3 instead of 1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Add the numbered example header to 09-13 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Add numbered example headers to 09-14 and 09-15 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Bind assertion header values directly, and test fairness on dropped product edges The values a for clause binds are now the ones found at expansion: each is stored under a hidden constant and the instance's binding statement reads it, instead of re-evaluating list(ITER)[i] in every state. Header targets must be names; a nested pattern like (a, b), c is a parse error instead of a wrong result. The atom-list diagnostic no longer calls a method on a nil result. Adds tests for nested clauses whose inner iterable uses an outer name, record values, and a product where a fair action stays enabled but every edge of it is dropped, checked under each fairness. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Bind assertion header values as locals of each instance The values a for clause binds no longer go into the model's constants under generated names, where they could overwrite a constant with the same name. Each instance's values are set in its frame when its body runs, as locals. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Test soft keywords and fairness end to end; unpack only tuples and lists - SoftKeywords: implies, leadsto and until as constants, funcs and fields, in actions, assertions and a formula. - Fairness and Stutter: whether a formula holds depends on weak vs strong fairness (with a two-step action) and on where a run may stop. - A header with several targets unpacks only tuples and lists, as a Starlark assignment does; strings used to unpack. - Document that header names shadow constants within the assertion. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Put the fairness modifiers in section headers in backticks A bare fair<strong> in a heading is read as an HTML tag, which bolds the rest of the rendered page. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Clarify formula precedence and chaining, and show the one-return rule Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Document temporal notation (LTL, TLA+) and common formula patterns Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Name the pattern examples' variable requested instead of sent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Spell out the alternative LTL notations in the operator table Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Drop Formula.text from the AST Nothing read it except one panic message, and no other AST node keeps its source text next to its SourceInfo. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 * Check the classic shapes against the direct check in formula tests Every always-eventually and eventually-always assertion in the formula testdata now runs through both the product and the direct check the default engine uses, and the verdicts must agree. Fairness adds a gate that opens infinitely often but never stays open, so always eventually holds while eventually always doesn't. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4 --------- Co-authored-by: Claude <noreply@anthropic.com>

Commit:ba1cb86
Author:Claude

Check full LTL formulas in assertions An assertion without a prefix can now return a temporal formula built from always, eventually, until, leadsto, implies, and, or and not: assertion Answered for c in range(NUM_CLIENTS): return pending[c] leadsto not pending[c] Parser: a formula return rule with until/leadsto/implies/possibly as soft keywords, an optional prefix on assertiondef, and `for` clauses on the header. Maximal non-temporal subtrees become atoms (implies written out), a prefix operator on the left of a binary needs parentheses, and the body must end with its only return. always P, always eventually P and eventually always P compile to today's prefixed assertions. Checker: the block returns every atom's value once per state. Formulas are checked on the SCC engine through the product with the negation's generalized Büchi automaton; steps inside an action repeat the last state's letter, which LTL without next can't observe. `for` clauses expand into one instance per binding before Init. FIZZ_LIVENESS_ENGINE=formula runs the classic liveness assertions through the product too, for comparison. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xVxzQnXsLw1WWgs6dTrX4

Commit:2e2b9c6
Author:fizzbee
Committer:GitHub

feat(modelchecker): expose action returns on Link + add no-state-returns flag (#355) Builds on the prior CloneWithRefs fix by giving downstream consumers (graph, MBT, explorer) a forward-compatible way to read action return values from the per-transition Link rather than per-state Process.Returns. Producer-side additions: - New Link.Returns starlark.StringDict field, populated in processNode alongside Labels/Messages and propagated by Attach/Duplicate to outbound links. - proto/graph.proto Link gets `repeated NameValue returns = 10` so the per-transition returns are serialized into adjacency-list .pb files. Sorted by name in returnsToNameValues for deterministic output. - GenerateDotFile renders the return value on the edge label as `\n returns: {...}`. Migration flag: - New --experimental_no_state_returns (off by default). When on, suppresses Process.Returns from HashCode, MarshalJSON, and the dot-file state label. Returns remain populated during execution (functions/invariants still read them) and remain visible on Link.Returns. Use this to verify downstream consumers have migrated; planned to become the default once they have. Drive-by reverts unrelated to Returns work: - main.go: dotfile threshold local change 500 -> 250 (local-only bump that caused 11-07 and 13-02-01 reference baselines to drift). - processor.go: printPeakSummary now suppressed under the default queue mode and only prints under --experimental_processed_queue. The metric is only meaningful for old-vs-new dedup comparison; printing it in the default path drifted every reference baseline by one line. Verified: all 94 reference specs + 10 lovable specs pass. Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Commit:546a816
Author:fizzbee
Committer:GitHub

Add comments for some to fields to be removed (#293) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:bf8f21e
Author:fizzbee
Committer:GitHub

Pass the seed to reproduce the same error (#291) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:e8b1c6d
Author:fizzbee
Committer:GitHub

Support tuple and set for constant generation (#290) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:f86245e
Author:fizzbee
Committer:GitHub

Check request to see if it is fuzzing (#289) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:6b189bb
Author:fizzbee
Committer:GitHub

Override provider library (#281) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:ff30d41
Author:fizzbee
Committer:GitHub

A 'Ignore' sential value to ignore comparing the certain fields from state or return values (#274) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:de9f327
Author:fizzbee
Committer:GitHub

Java library for model based testing (#253) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

The documentation is generated from this commit.

Commit:cc4e9b1
Author:fizzbee
Committer:GitHub

Add a grpc for batch execution of concurrent traces (#246) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:0295db6
Author:fizzbee
Committer:GitHub

GetState if role implements them (#241) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:0913e0f
Author:fizzbee
Committer:GitHub

Let role mapper return roles as a map instead of having a lookup by name function (#238) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:d144c72
Author:fizzbee
Committer:GitHub

Temporarily add a role mapper interface and implement the ExecuteAction (#237) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:ec48318
Author:fizzbee
Committer:GitHub

The plugin interface and test gen code. (#235) * The plugin interface and test gen code. --------- Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:b8f857e
Author:fizzbee
Committer:GitHub

Partial implementation of refinement - parser and ast changes. (#223) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:4743eb2
Author:fizzbee
Committer:GitHub

Add grammar and ast changes to support state space composition (#202) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:df063bc
Author:fizzbee
Committer:GitHub

Custom param name for transition assertion (#181) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:14ba2c4
Author:fizzbee
Committer:GitHub

Allow specifying durable and ephemeral states for roles (#138) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:376ac08
Author:fizzbee
Committer:GitHub

Store the thread map and thread id in the exported proto (#127) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:09460e4
Author:fizzbee
Committer:GitHub

Implement fairness marker on any keyword. (#115) * Proto and Parser changes to support fairness for any stmt * Choice fairness * Temporary commit of invariants changes * More intermediate changes * Fix errors with increased cycle length * rename * Scope fairness to the role --------- Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:517a952
Author:fizzbee
Committer:GitHub

Assign a stable request id (#110) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:3925133
Author:fizzbee
Committer:GitHub

Add support to disable for actions and support max_concurrent actions for actions (#86) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:e35bbbf
Author:fizzbee
Committer:GitHub

Add comments to statespace_options.proto (#71)

Commit:7347b6c
Author:fizzbee
Committer:GitHub

Use optional proto so we can enable deadlock_detection by default when it is not set (#70) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:4511fe8
Author:fizzbee
Committer:GitHub

Support state space options as a yaml frontmatter. This simplifies online playground use and easy to share a single file (#69) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:75d0a22
Author:fizzbee
Committer:GitHub

Set error linenumbers in the stacktrace (#52) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:410144a
Author:fizzbee
Committer:GitHub

Support symmetric_values and symmetric role (#48) Symmetry reduction by specifying values and roles as symmetric. For ids and keys, you can specify ``` KEYS = symmetric_values('key', 3) VALUES = symmetric_values('val', 3) ``` For roles, ``` symmetric role Node: # actions and functions pass ``` To access the id of the node to be used at other places, use `role.__id__` Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:53ba3af
Author:fizzbee
Committer:GitHub

Add separate roles and maintain messages (#39) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:0eae88e
Author:fizzbee
Committer:GitHub

Any with condition (#38) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:8280cba
Author:fizzbee
Committer:GitHub

Support require stmt and simplified any stmt (#37) Co-authored-by: jayaprabhakar <jayaprabhakar@gmail.com>

Commit:92c861c
Author:fizzbee
Committer:GitHub

Support for methods within roles (#28)

Commit:bf44d5e
Author:fizzbee
Committer:GitHub

Role AST and parser (#21)

Commit:051bf8b
Author:fizzbee
Committer:GitHub

Support enum and top level statements suitable for constants (#18)

Commit:6e1816c
Author:fizzbee
Committer:GitHub

Handle methods with parameters (#5)

Commit:228338c
Author:fizzbee
Committer:GitHub

Fresh commit from the old repo (#1)