next up previous contents index
Next: 2.2.3 Transitions Up: 2.2 Overview of Abstract Previous: 2.2.1 Overview   Contents   Index

2.2.2 State Set $S$

State set $S=\{s_1,s_2,...,s_m\}$ defines all the states in a model, regardless of their parent-children relationship.

The choice of $SN$, the GUID of a state, is a decision of the model designer. According to the definition of sets, there should not be two identical elements in a single set. Two states in the same state set differ from each other at least in their GUIDs.

$DS$ defines whether the state is a default state of its parent. If the state is at the top level (i.e., it has no parent) $DS$ defines whether it is a default state of the model. If $CS$ is $true$ for a state, it is an orthogonal component of its parent, and as a result, all its siblings are orthogonal components. Due to the nature of orthogonal components (also known as ``and states''), all orthogonal components must be active simultaneously, and are in some sense default states. Hence, $CS=true$ always implies $DS=true$.

When started, the model is always in its top-level default state(s), and the default substate(s) of the top-level default state(s). At any given time during a simulation or execution, the model is in its current leaf state (a leaf state is defined as a state at the lowest level, which does not contain any substate), or current state for short. A model is in state $s$ if and only if its current state is $s$ or a substate of $s$. Hence, a model in state $s'$ is also in $s''$ provided that:

\begin{displaymath}
\exists k\in N^{+},s_1,s_2,...,s_k\in S\ \cdot\ s'\in C(s_1...
... C(s_2)\wedge ... \wedge s_{k-1}\in C(s_k)\wedge s_k\in C(s'')
\end{displaymath}

Here, $C(s)$ is the children set of state $s$. $<s'',s_k,s_{k-1},...,s_1,s'>$ is called the path from superstate $s''$ to substate $s'$. Such a relation between $s'$ and $s''$ is formally written as $s'\in Substate(s'')$.

Each orthogonal component has a default state defined in it. At any time in a simulation or execution, all orthogonal components in an active state have a current state. All the transition from those current states (or superstates of the current states) with their guards evaluated to $true$ are enabled and can be triggered by an event. However, at any time there is at most one triggered transition, and the execution of a transition must be finished without any interleaving operation. Usually, a transition is implemented as a critical section. In this interpretation, orthogonal components are not concurrent threads. The Cartesian product of all the orthogonal components gives a unique current state of a model. This model can be transformed to an ordinary FSA, which has no orthogonal components.

$HS$ specifies the history of a state. History is regarded as a property of a state. If a state has a normal history or deep history, a transition with that state as destination can be either to its default substate or to its history. The transition specifies this choice by means of its $HS_T$ property. As a special case, if a transition with $HS_T=true$ goes to a state without history, $HS_T$ is automatically ignored or changed to $false$.

The difference between normal history and deep history, as they were first introduced in statecharts [4], is that normal history only records the last visited child of a state, while deep history records all the last visited substates of a state so that when the model goes back to this history, those substates are restored.

$TP$ defines the priority of transitions within the scope of a state. The $TP$ definition of a substate always overrides the $TP$ definition of its superstates. Transition priorities are discussed in section 2.2.5.

$EN$ and $EX$ actions are implementation-dependent. However, they are restricted to sequences of single actions. Hence, loops and if-else conditions are not allowed. These structures must be explicitly modeled.


next up previous contents index
Next: 2.2.3 Transitions Up: 2.2 Overview of Abstract Previous: 2.2.1 Overview   Contents   Index
Thomas Huining Feng 2004-04-28