You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 26506ff
Browse filesBrowse the repository at this point in the historyBrowse files
Name only the state sets a suggested call sequence changes (#484)
Closes#482.
## What
With more than one `@StateSet`, the call-sequence hint named every state
set, including the ones the suggested calls leave as they are. It now
names only the sets whose states differ before and after the calls. Only
the displayed hint changes; no solver query changes.
Reproducer from the issue:
```
before: Call s.mark() before this call to move s from open and unmarked to open and marked
after: Call s.mark() before this call to move s from unmarked to marked
```
Existing fixture `ErrorStateHintMultipleSets`:
```
before: Call d.unlock() before this call to move d from closed and locked to closed and unlocked
after: Call d.unlock() before this call to move d from locked to unlocked
```
## How
- `StateMachine.stateSetsChanged(before, after)`: the sets whose states
differ. If the sets it would leave out, taken together, differ too (how
states of different sets are combined changed), every set is named, as
before.
- `StateMachine.describeOnly(subset, sets)`: names `subset` only in the
given sets, reusing `StateCover` (the naming from #474/#475) on the
states that agree with `subset` in those sets.
- `StateHints.callSequence` names both sides with these. `from any
state` is unchanged.
## Not changed, on purpose
- **`In state open and unmarked, s can call: mark()`** still names the
full state: which calls are allowed depends on every set, so dropping
`open` would make the hint less accurate.
- **Found/expected** (`found open(s) && unmarked(s) but expected
marked(s) && open(s)`) is left as it is. These are the verifier's real
predicates (the simplified premise chain and the `from` disjunction,
with arguments, ghosts and aliases). The IDE reads them too. Dropping or
reordering conjuncts that hold on both sides would need a semantic check
on arbitrary predicates. Doing that only for display is riskier than
this PR should be. It could be a follow-up if the study needs it.
## Tests
- `TestStateHints.callSequenceNamesOnlyTheStateSetsItChanges` (the
renamed multi-set test; fails on main).
- `StateMachineTest`: `statesAreNamedOnlyInTheSetsShown`,
`setsChangedAreThoseWhoseStatesDiffer` (including the cases where how
the sets are combined changes).
- `mvn test`: 692 tests, 0 failures. No other expectation changed. The
dcm4che hint (`from startCompression to compressionExplicit`) already
named a single set.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
0 commit comments