Repository navigation
Show one state machine diagram per state set - #163
Merged
Merged
Conversation
CatarinaGamboa
added a commit
that referenced
this pull request
Oct 26, 2026
CatarinaGamboa
force-pushed
the
feat/115-multiple-state-machines
branch
from
October 26, 2026 11:33
7e17de0 to
6ae57ef
Compare
CatarinaGamboa
added a commit
that referenced
this pull request
Oct 26, 2026
A class with several @stateset annotations, such as ImageWriteParam, now has one diagram per state set. liquidjava/fsm returns the list from liquidjava-fsm's parseAll, and a state refinement error carries stateMachines instead of stateMachine. The verifier names each state by its name in every state set, so the error context of each diagram uses that state set's names. A state is marked invalid only if no accepted state has it, so that a call like write(), which needs a state in each state set, does not blame the state set that is already right. The error is only put on the diagrams of the state sets whose transitions have the called method. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The State Machine view stacks the diagram of each state set of a class, such as the tiling and compression states of ImageWriteParam, under the class name, each labelled with its states. A class with one state set looks as before. A state error is drawn on the diagrams of the state sets it involves, which come first, and focusing on it dims the other diagrams. The summary lists the rejected states of every state set and the allowed states each one needs. Copy Mermaid Source copies every diagram. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CatarinaGamboa
force-pushed
the
feat/115-multiple-state-machines
branch
from
October 26, 2026 15:00
6ae57ef to
902f4e8
Compare
CatarinaGamboa
marked this pull request as ready for review
October 26, 2026 15:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #115. Uses liquidjava-fsm 0.2.1 (liquid-java/liquidjava-fsm#13).
Why
A class with several
@StateSets, likeImageWriteParamwith its tiling and compression states, was drawn as one diagram of the first state set. Every compression method ended up on the tiling diagram, and a compression error was marked on a tiling state:setCompressionQuality()instartCompressionshowedstartTilingas rejected.What
liquidjava/fsmandStateRefinementErrorDTOnow return oneStateMachineDTOper state set (stateMachines, with astateSetindex), usingStateMachineParser.parseAllfrom fsm 0.2.1.Arrows between state sets are left for later. A method that needs a state of the other state set keeps it as a condition, e.g.
[compressionSet(this)].Screenshots
Expert
ImageWriteParamspec, in headless VS Code.Tiling error: the tiling diagram comes first.
Focus on error: the compression diagram below it is dimmed.
Compression error, before and after: before, it was drawn on the tiling diagram with
startTilingmarked rejected. Now it is on the compression diagram.Show all:
Tests
StateMachineDTOTest(new) andStateErrorContextDTOTestcover per-state-set marking and not blaming another state set. 34 tests pass.vscode-test): all 10 tests pass.Rebased on main after #165. The screenshots are from the build after #161.
🤖 Generated with Claude Code