1
votes

I'm trying to collect informations to be able to program a correct transition selection algorithm for an UML State Machine.

The UML Superstructure Specification (15.3.12 StateMachine) states

Only transitions that occur in mutually orthogonal regions may be fired simultaneously.

Does "mutually orthogonal" imply that the regions are on the same nesting level?

For each state at a given level, all originating transitions are evaluated to determine if they are enabled.

This sounds to me like they have to be on the same nesting level. Right? Because if a transition is found on a certain nesting level, the search ends...

The seciton "Transition selection algorithm" once again is not totally clear to me:

The only non-trivial issue is resolving transition conflicts across orthogonal states on all levels. This is resolved by terminating the search in each orthogonal state once a transition inside any one of its components is fired.

To make this a little more haptic I created 2 models:

Model 1

Model 1

Model 2

Model 2

Active state configuration:

State1, State3, State4, State7

Example 1a

In case of an event Event1 which transitions fire?

a. Does only the one from State7 to State 5 fire?

b. Or also then one from State3 to State8?

Both variations would yield in a legal active state configuration. But my understanding is, that a is correct

Example 1b

Same for model 2.

Example 2a

In case of an event Event2 which transitions fire?

a. Does only the one from State7 to State 5 fire?

b. Or also then one from State3 to State2?

In this case I would say that b would lead to an illegal active state configuration.

Does this mean the model is ill-formed or would only one of the transitions be fired?

Example 2b

Same for model 2. Any difference?

1

1 Answers

1
votes

I'd interpret mutually orthogonal to mean that the side effects of the transitions have no impact on each other.

So in either of your diagrams, the transitions triggered by Event1 can be deemed to be mutually orthogonal as the transitions are both contained within [A] and [B] and may be fired simultaneously. Event2 cannot as the transition from within [A] leaves A and State1 (and therefore also [B]).