On modelling recursive calls and callbacks with two variants of Unified Modelling Language state diagrams
An important use of the Unified Modelling Language (UML) is modelling synchronous object-oriented software systems. State diagrams are used to model interesting object behaviour, including method invocation. However, almost all previous work formalising state diagrams has assumed asynchronous communication. We show that UML's "run to completion" semantics leads to anomalous behaviour in the synchronous case, and in particular that it is not possible to model recursive calls, in which an object receives a second synchronous message whilst still in the process of reacting to the first. We propose a solution using state diagrams in two complementary ways.
recursion callbacks uml object-oriented modelling protocol state machines state machines