-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
The StateMachineParser currently doesn't properly handle complex state expressions. This results in incomplete transitions in the state machine diagram. This happens because the getStateExpressions() method simply extracts state names from the AST but ignores their logic.
Needed Improvements
The parser needs to correctly interpret the following patterns in @StateRefinement annotations:
Conjunctions
- Pattern:
from="x && state1", wherexcan be any boolean expression - Interpretation: can only transition when
xis true and in statestate1 - Diagram:
method (x) → state1
Disjunctions
- Pattern:
from="x || state1", wherexcan be any boolean expression - Interpretation: can transition when either
xis true or in statestate1 - Diagram:
method → state1x → state1
Conditionals
- Pattern:
from="x ? state1 : state2", wherexcan be any boolean expression - Interpretation: can transition to
state1whenxis true and tostate2whenxis false - Diagram:
method (x) → state1method (!x) → state2