Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
413 views
in Technique[技术] by (71.8m points)

uml - Execution Order of Hierarchical State Machine (HSM) Actions

Actually, I want validation about execution order about HSM. Are there true on picture, below?

enter image description here

question from:https://stackoverflow.com/questions/65847485/execution-order-of-hierarchical-state-machine-hsm-actions

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I suppose the question is about the unique transition present in the diagrams

self transition

There is no transition to s2 so it is impossible to be in s2 when the transition occurs. The transition is external so s1ExitAction then T1TransAction then s1EnterAction

Supposing there is an additional initial pseudo state and a transition from it to s2 then the execution is the one you indicate.

If we are in s2 because of a hidden transition which is not from an hidden initial pseudo state then the execution is s2ExitAction then s1ExitAction then T1TransAction then s1EnterAction

external transition A

Supposing the transition occurs for at least the second time then the execution is the one you indicate, else the transition occurs when being in s1 and the execution is s1ExitAction then t1TransAction then s1EnterAction then s2EnterAction

local transition A

Supposing the transition occurs for at least the second time or we are in s2 because of a hidden transition then the execution is the one you indicate, else the transition occurs when being in s1 and the execution is t1TransAction then s2EnterAction

external transition B

There is no transition to s2 so it is impossible to be in s2 and then it is impossible to do the transition.

Supposing there is an additional initial pseudo state and a transition from it to s2 then the execution is the one you indicate.

If we are in s2 because of a hidden transition which is not from an hidden initial pseudo state then the execution is s2ExitAction then s1ExitAction then t1TransAction then s1EnterAction

local transition B

There is no transition to s2 so it is impossible to be in s2 and then it is impossible to do the transition.

Supposing there is an additional initial pseudo state and a transition from it to s2 or an hidden transition allowing to be in s2 then the execution is the one you indicate.

internal transition

There is no transition to s2 so it is impossible to be in s2 when the transition occurs, then the execution is t1TransAction

Supposing there is an additional initial pseudo state and a transition from it to s2 then the execution is the one you indicate.

If we are in s2 because of a hidden transition which is not from an hidden initial pseudo state then the execution is s2ExitAction then t1TransAction


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...