Statecharts are used to describe the behavior part of the model. From a methodological point of view, they should be used to depict system states and transitions between them. As it is quite easy to translate Statecharts into code, some users apply them as graphical representations of what will later become their software code. By using Statecharts as a means for graphical programming, “system state aspects” usually are neglected. Statecharts of this kind are referred to as “Procedural Statecharts” and not used in functional system modeling.
Statecharts can be simulated. Because of the step-semantic of the Rational Statemate simulation some users tend to add artificial states either to initialize a step needed to perform an action (see the following figure) or to synchronize with concurrent processes. Statecharts should be free of such not system-related “pseudo-states.”
In the following a system state will be referred to as a time consuming mode of operation (e.g. WAIT_FOR_CMD or FCT_X_ACTIVE), needing a compelling event to initialize a transition to another mode of operation.
All states within a Statechart should have the same size in height and width. If a larger size is needed, the respective size should be a multiple of a pre-defined “basic” size.
State Names should describe the respective system mode of operation. Dummy names like IDLE or WAIT should be avoided. If a state is connected to a function, its name should reflect this (e.g. INTERPOLATION_ACTIVE in the Capturing Simulation Steps in Statecharts figure). Long names should be broken into two or more lines.