Skip to content

fix(tla): report a reached Assert(FALSE) in simulation/swarm mode too - #195

Merged
zoratu merged 1 commit into
mainfrom
fix/simulation-reached-assertion
Jul 30, 2026
Merged

fix(tla): report a reached Assert(FALSE) in simulation/swarm mode too#195
zoratu merged 1 commit into
mainfrom
fix/simulation-reached-assertion

Conversation

@zoratu

@zoratu zoratu commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Problem

The reached-assertion side channel from #194 (a reached Assert(FALSE) in a Next action is a safety violation) was only drained by the exhaustive BFS worker. Simulation mode (--simulate) uses a separate next-state path — next_states_swarm for swarm traces, next_states otherwise — and never drained the channel, so a reached Assert(FALSE) during simulation was silently missed.

Change

  • next_states_swarm now enters committed next-state generation (matching next_states / next_states_labeled), so a reached Assert(FALSE) is recorded, and returns cleanly (no panic) when an assertion is pending.
  • The simulation loop drains the side channel immediately after each next-state generation and records the assertion as a Safety violation, exactly as the BFS worker does.

Closes the item-3 follow-up gap (simulation/swarm did not report reached assertions).

Gate

  • cargo test --release 1490 passed, 0 failed — adds simulation coverage to tests/reached_assertion_violation.rs: both the plain path and the swarm path (next_states_swarm) report a reached Assert(FALSE).
  • scripts/diff_tlc.sh 23/23 unchanged.

The reached-assertion side channel (a reached Assert(FALSE) in a Next action is
a safety violation) was only drained by the exhaustive BFS worker. Simulation
mode (`--simulate`) uses a separate path — `next_states_swarm` for swarm traces,
`next_states` otherwise — and never drained the channel, so a reached
Assert(FALSE) during simulation was silently missed.

- `next_states_swarm` now enters committed next-state generation (matching
  `next_states`/`next_states_labeled`) so a reached Assert(FALSE) is recorded,
  and returns cleanly (no panic) when an assertion is pending.
- The simulation loop drains the channel immediately after each next-state
  generation and records the assertion as a Safety violation, exactly as the
  BFS worker does.

Gate: cargo test --release 1490 passed, 0 failed — adds simulation (plain +
swarm) coverage to tests/reached_assertion_violation.rs. diff_tlc 23/23
unchanged.
@zoratu
zoratu merged commit 2375e0c into main Jul 30, 2026
6 checks passed
@zoratu
zoratu deleted the fix/simulation-reached-assertion branch July 30, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant