Using State Diagrams to Describe Concurrent Behaviour
Jim Davies and Charles Crichton
The state diagram notation, a derivative of Harel's StateCharts, is an important component of the Unified Modeling Language (UML). It is the primary means of describing object behaviour: by associating a state diagram with a particular class, a designer may specify how objects of that class should perform sequences of actions in response to incoming events. This paper explains that, under the default interpretation, state diagrams are adequate only for designs in which: each object may admit at most one thread of execution; different threads of execution could never interfere; and it is impossible for an object to invoke an operation upon itself. The paper argues that these limitations are unsatisfactory. An alternative interpretation is then presented, in which separate diagrams are used to describe the object state and the transient, operation state. The resulting separation of concerns between control flow and state abstraction produces a simpler, more scalable approach to specification, and one that is adequate for the precise description of concurrent behaviour.