next up previous contents index
Next: 4.2.6 Priority Numbers Up: 4.2 Textual Syntax Previous: 4.2.4 Orthogonal Components   Contents   Index

4.2.5 Transitions

Each transitions is written under the TRANSITION descriptor. A transition may have the following 5 properties. Some of them are optional.

The S property, the N property, and either the E property or the T property are obligatory for each transition. The value of the E property is the name of the event that triggers the transition. The value of the T property, which may be a Python expression to be evaluated at run-time, is the time $t$ (in seconds) to be scheduled in advance. It is equivalent to the $after(t)$ event in the abstract syntax. A transition cannot have both E and T properties.

The properties of a transition are specified in separate lines after the TRANSITION descriptor. Their order is not important. For transitions that have multiple output actions, each action is written on a single line, and all those actions are left-aligned with 0 or more leading spaces. Similarly, more than one guard can be written in consecutive lines with left-alignment. Those guards have ``and'' relations. Alternatively, they can also be written in a single line with the and operator in the constraint language (Python) between them.


Table 4.5: An example of the textual representation of transitions
\begin{table}\begin{center}
\begin{minipage}{6cm}
\begin{verbatim}
STATECHART:...
...ired'')]
[EVENT(''e'')]\end{verbatim}
\end{minipage} \end{center}
\end{table}


As an example, the model in Figure 4.7 is textually written as the textual representation in Table 4.5.


Table 4.6: An example of the textual representation of a timed transition
\begin{table}\begin{center}
\begin{minipage}{3.5cm}
\begin{verbatim}
TRANSITIO...
...: 0.5 + i
C: x==1
y==2\end{verbatim}
\end{minipage} \end{center}
\end{table}


Timed transitions are a special kind of transitions that have the T property instead of E. An example of timed transition is shown in Table 4.6. This transition is triggered $0.5+i$ seconds after state A is entered. The transition is enabled after the scheduled time only if $x==1$ and $y==2$.


next up previous contents index
Next: 4.2.6 Priority Numbers Up: 4.2 Textual Syntax Previous: 4.2.4 Orthogonal Components   Contents   Index
Thomas Huining Feng 2004-04-28