Orthogonal state interpretation
Asked Answered
U

1

6

What is the interpretation of the following quoted sentences from UML Reference Manual?

When an orthogonal state is entered, the number of control threads increases as a direct substate in each orthogonal region becomes active.

When the orthogonal state is exited, the number of control threads decreases.

Uprear answered 25/7, 2013 at 14:26 Comment(0)
S
5

This is a complex part of the UML spec. In the simplest case, when you enter a state containing orthogonal regions, the initial psuedo state in each orthogonal region essentially starts a separate thread of control. There are lots of complicated rules about how events are consumed by these threads and how the threads join back together.

But, according to a methodologist I highly recommend (H. S. Lahman), you really shouldn't use more than plain old Moore state machines. For more information on why one should use Moore state machines (which you can model perfectly well in UML) instead of Mealy or Harel state machines, please see this excerpt from Lahman's book. For more information on the difference between a Moore and a Mealy state machine, please see this StackExchange question.

Shibboleth answered 25/7, 2013 at 20:42 Comment(3)
,Thank you for the recommendation that's very kind of you Could you please clarify why the number of control threads increases when the orthogonal state is entered, while the number of control threads decreases when the orthogonal state is exited?Uprear
because I cant figure it outUprear
I'm not sure what's unclear, as I don't know your background. Each orthogonal region has its own current sub-state. Each sub-state can concurrently execute behavior(s), including those triggered by incoming events. If each state is running a different long-running behavior involving waiting for something like disk I/O, that might allow the CPU to do useful work in the meantime within other orthogonal regions.Shibboleth

© 2022 - 2024 — McMap. All rights reserved.