Issue 4110: Semantics of firing compound transitions still appears to be circular (uml2-rtf) Source: (, ) Nature: Clarification Severity: Significant Summary: 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. Resolution: Remove the paragraph explaining the LCA from the “Transition execution sequence” section and add an explanation of LCA to the “Transition ownership” section Revised Text: In the subsection titled “Transition execution sequence” of the section titled “Event Processing for StateMachines” in clause 14.5, remove the following paragraph: The least common ancestor (LCA) of a compound transition is the innermost Region that contains (directly or indirectly) both the source and target States of the compound transition. In the subsection titled “Transition ownership” of the section titled “Transitions” in clause 14.5, replace the sentence: A suggested owner of a Transition is the LCA Least Common Ancestor of the source and target Vertices (see below). with the following text: A suggested owner of a Transition is the innermost Region that contains both its source and target Vertices. This Region is sometimes referred to as the Least Common Ancestor (LCA) of the source and target Vertices. Actions taken: December 7, 2000: received issue February 20, 2015: closed issue Discussion: It is no longer necessary to compute the LCA to determine the main source and main targets of an enabled transition. This was only necessary for the case when transitions that crossed region boundaries. However, this capability was eliminated in an earlier revision of UML. The reference to the LCA in the discussion of transition execution sequence is misleading and should be removed, since it is irrelevant. Reference to LCA only makes sense in the discussion of transition ownership. Note that the utility LCA operation defined for StateMachine is unaffected by this change. End of Annotations:===== From: webmaster@omg.org Message-Id: <200012071743.eB7HhQE02662@emerald.omg.org> Date: 07 Dec 2000 13:44:30 -0500 To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Issue/Bug Report Content-Type: Text/html; charset=windows-1252 X-UIDL: Rn\!!,XZ!!JFHe9j:`!! Name: Albert Langer Company: Directory Designs mailFrom: Albert.Langer@Directory-Designs.org Notification: Yes Specification: UML 1.4 beta Section: 2.12 FormalNumber: Uml_1.4_r1 Version: R1 RevisionDate: Nov/2000 Page: 2-173 Nature: Clarification Severity: Significant HTTP User Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) Description 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. BTW: 1) Link is broken at start for reporting problems to: http://www.omg.org/library/issuerpt.htm. This seems to be a general problem on the web site. Spectacularly bad idea for web site of an OO organization to change large numbers of reference links by renaming when it is not possible to update dependencies. 2) There are numerous references to 1.3 within the text which look as though they should be updated to 1.4.