This paper discusses the limitations of UML state diagrams in modeling recursive calls and proposes a solution using two types of state diagrams: Protocol State Machines (PSMs) and Method State Machines (MSMs). UML's run-to-completion semantics for state diagrams can lead to anomalies when modeling recursive calls, where an object receives a second message while still reacting to the first. The authors argue that UML state diagrams are often treated as either executable machines or loose specifications, but the standard semantics suggest they should be executable, leading to inconsistencies in modeling recursive calls.
The paper introduces PSMs, which are used to specify the protocol (sequence of method calls) on an object, and MSMs, which model the execution of actions within a method. PSMs do not include action expressions, while MSMs include actions and are used to model the detailed execution of methods. The authors formalize these diagrams and define a notion of consistency between PSMs and MSMs, ensuring that the behavior of the object as specified by the PSM is reflected in the execution of the MSM.
The paper also discusses the implications of using these diagrams in the context of UML and highlights the need for a more precise semantics for UML state diagrams to handle recursive calls correctly. The authors propose that the use of PSMs and MSMs allows for a clearer distinction between specifications and executable models, enabling more accurate modeling of complex behaviors in object-oriented systems. The paper concludes that further research is needed to develop tools that support the use of these diagrams in practice.This paper discusses the limitations of UML state diagrams in modeling recursive calls and proposes a solution using two types of state diagrams: Protocol State Machines (PSMs) and Method State Machines (MSMs). UML's run-to-completion semantics for state diagrams can lead to anomalies when modeling recursive calls, where an object receives a second message while still reacting to the first. The authors argue that UML state diagrams are often treated as either executable machines or loose specifications, but the standard semantics suggest they should be executable, leading to inconsistencies in modeling recursive calls.
The paper introduces PSMs, which are used to specify the protocol (sequence of method calls) on an object, and MSMs, which model the execution of actions within a method. PSMs do not include action expressions, while MSMs include actions and are used to model the detailed execution of methods. The authors formalize these diagrams and define a notion of consistency between PSMs and MSMs, ensuring that the behavior of the object as specified by the PSM is reflected in the execution of the MSM.
The paper also discusses the implications of using these diagrams in the context of UML and highlights the need for a more precise semantics for UML state diagrams to handle recursive calls correctly. The authors propose that the use of PSMs and MSMs allows for a clearer distinction between specifications and executable models, enabling more accurate modeling of complex behaviors in object-oriented systems. The paper concludes that further research is needed to develop tools that support the use of these diagrams in practice.