Database Reference
In-Depth Information
the fact of whether the state is decomposed into substates or not. This interpretation has led
us to include in the Base Diagram a new class, Decomposition , which represents the existence
of a relationship between a state and a set of substates. The decomposition can be of two
kinds: concurrent or not concurrent. This new proposal solves a latent problem related to
simple and composite states. During the state machine construction process, a state which
initially was considered as simple can now be considered to be compound. According to the
version proposed in OMG (2003), this situation would entail an instance of the SimpleState
class becoming an instance of the CompositeState class, which leads to the problem known
as object reclassifi cation anomaly (Chu & Zhang, 1997; Drossopoulou, Damiani, Dezani-
Ciancaglini & Giannini, 2002). This problem does not arise in our proposed version since a
simple state becomes a composite state by adding an instance of decomposition (without it
being necessary to reclassify any object). Another possible solution for avoiding the object
reclassifi cation problem is based on the consideration of only one class State , in such a way
that the instances (objects) of that class could be either simple or composite. This solution
would entail the introduction of a recursive relationship between the class State and itself,
in order to represent the hierarchy of states inside a state machine. However, as is claimed
in Lee (1999), in the context of the entity-relationship model, “the semantics of recursive
relationships are quite diffi cult to grasp”. We have adopted the solution discussed above
that includes a Decomposition class, since we think this solution can improve understanding
of the metamodel.
The inclusion of the class Decomposition leads to the class State having only two sub-
classes: FinalState and SubmachineState . Two restrictions are stated in the Well-Formedness
Rules in OMG (2003) with regard to the SubmachineState class: (1) only stub states are
allowed as substates of a submachine state and (2) submachine states are never concurrent.
In our proposal, we have substituted the fi rst restriction including an association between
the StubState and SubmachineState classes (representing the relation of substate) and a
restriction which states that 'submachine states must not take part in any decomposition as
parent'. From the restriction we consider it follows that a submachine state is never concur-
rent, so no other restrictions have to be stated.
Another modifi cation we propose is related to the classifi cation of the different types
of state vertices. We have considered it convenient to differentiate between, on the one
hand, the initial, deep history and shallow history state vertices (which remain considered
as Pseudostates ) and, on the other hand, the join, fork and junction vertices (which are
considered as Connectors ). The reason for this lies in the fact that initial, deep history and
shallow history state vertices have to be associated with a state (which will be their parent),
whereas join, fork and junction vertices are not associated with any state, and are strongly
related with the defi nition of compound transitions. Obviously they have to be represented
inside the graphic representation of a state but it does not matter what the state is. In this
sense we share the views of several authors of formalizations of Statecharts, as they do not
associate any parent to these connectors (Harel & Naamad, 1996). It must be assumed that
the inclusion of new classes increases the complexity of the metamodel. In this case, the
distinction between Pseudostates and Connectors has a conceptual nature, and therefore
we have considered it essential in order to get a better understanding of the State Machines
language.
The last change we propose is that we have specialized the Transition class into two
subclasses according to whether a transition is an internal transition associated to a state or
Search WWH ::




Custom Search