3

I am reading through Wikipedia's page on UML state machines. I don't understand where it says:

A nested state is called a direct substate when it is not contained by any other state; otherwise, it is referred to as a transitively nested substate.

I want to understand the difference between a "direct substate" and a "transitively nested substate". The quoted sentence says one is contained by another state, and the other is not. But if both are nested, then surely both are contained by another state?

9
  • Direct substate is a one level substate of a state
  • Transitively nested substate is a substate of a substate (any levels down)

Consider this diagram:

StateNesting

For active state direct substates are

  • filing
  • warming up
  • washing
  • emptying

while transitively nested substate are

  • rotating left
  • rotating right
  • inceasing speed (substate of rotating left)
  • full speed rotation (substate of rotating left)
  • inceasing speed (substate of rotating right)
  • full speed rotation (substate of rotating right)

For washing state direct substates are

  • rotating left
  • rotating right

while transitively nested substate are

  • inceasing speed (substate of rotating left)
  • full speed rotation (substate of rotating left)
  • inceasing speed (substate of rotating right)
  • full speed rotation (substate of rotating right)

etc.

idle has neither direct nor transitively added substates.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.