Legacy Issue Number: 4110
In UML 1.4 beta R1, the semantics of firing compound transitions still appears to be circular and therefore incorrect. At any rate I am confused by the text so it may be confusing to others.
As far as I can see the "Least Common Ancestor" is needed to determine the "main source", but actions following exit from the "main source" must be performed before the targets following a choice point are known, so without known targets there is no known LCA and therefore no specified "main source".
On page 2-173 of 2.12:
- The least common ancestor (LCA) state of a transition is the lowest composite state that contains all the explicit source states and explicit target states of the compound transition. In case of junction segments, only the states related to the dynamically selected path are considered explicit targets (bypassed branches are not considered).
If the LCA is not a concurrent state, the main source is a direct substate of the least common ancestor that contains the explicit source states, and the main target is a substate of the least common ancestor that contains the explicit target states. In case where the LCA is a concurrent state, the main source and main target are the concurrent state itself. The reason is that if a concurrent region is exited, it forces exit of the entire concurrent state.
Once a transition is enabled and is selected to fire, the following steps are carried out in order:
The main source state is properly exited.
Actions are executed in sequence following their linear order along the segments of the transition: The closer the action to the source state, the earlier it is executed.
If a choice point is encountered, the guards following that choice point are evaluated dynamically and a path whose guards are true is selected.
The main target state is properly entered. ***
This is certainly much better than 1.3. But I still find it difficult to follow:
Since guards following a choice point are evaluated dynamically, the targets are still unknown when the "main source" is exited. Therefore the LCA is still unknown. How then does one determine the "main source" as a "direct substate" of the (unknown) LCA?
The (target) "states related to the dynamically selected path" referred to above for determining the LCA cannot be determined in the case of choice points, without having first determined which branches will be taken from the choice points. That requires performing exit actions for the "main source", then additional actions along the path to the choice point, in order to determine which branch will be taken. So the "main source" must be already known in order to determine the targets.
If one defined the "initial source" as the LCA of the source states then the "main source" might be any superstate of that "initial source".
With different targets, there might be additional actions to "properly exit" from enclosing superstates of the "initial source" before actions along the transition to a choice point. These could affect which branch is taken and therefore which enclosing superstate of the "initial source" must be "properly exited", which would affect which actions are performed before reaching the choice, and therefore affect the branch taken from the choice.
Reported: UML 1.3 — Thu, 7 Dec 2000 05:00 GMT
Disposition: Resolved — UML 2.2
Remove the paragraph explaining the LCA from the “Transition execution sequence” section and add an
explanation of LCA to the “Transition ownership” section
Updated: Fri, 6 Mar 2015 20:58 GMT