next up previous contents index
Next: 4.2.8 Enter/Exit Actions Up: 4.2 Textual Syntax Previous: 4.2.6 Priority Numbers   Contents   Index

4.2.7 History

A state with history is simply written as a state name followed by an [HS] or [HS*] property. Above this, there must be a means for a transition to choose whether the destination is a state itself or the history of the state. This is accomplished by an additional [HS] attribute after the TRANSITION descriptor. A transition with [HS] after its TRANSITION descriptor goes to the (normal or deep) history of its destination state $DES$; a transition without this attribute goes to $DES$ or the default substates of $DES$.


Table 4.8: An example of the textual representation of histories
\begin{table}\begin{center}
\begin{minipage}{3cm}
\begin{verbatim}
STATECHART:...
...: A.C.E
N: A.C.D
E: e4\end{verbatim}
\end{minipage} \end{center}
\end{table}


As an example, the model in Figure 4.9 is textually written in Table 4.8. The transitions reacting to events e1 and e2 have an [HS] attribute, so they go to the histories of their $DES$ states. Since states A.C.D and A.C.E do not have history, adding [HS] attribute to the transitions reacting to e3 and e4 does not change the behavior of those transitions.


next up previous contents index
Next: 4.2.8 Enter/Exit Actions Up: 4.2 Textual Syntax Previous: 4.2.6 Priority Numbers   Contents   Index
Thomas Huining Feng 2004-04-28