UML 2 Sequence Diagrams to State Machines by Graph Transformation

This article explores how you can specify graph transformation-based rules for a classical problem of transforming from UML sequence diagrams to state machines. The specification of the transformation rules is based on the concrete syntax of sequence diagrams and state machines. It introduces tailored transformation support for sequence diagrams and a novel graphical operator to match and transform combined fragments.

It is a great advantage that the user can specify rules in the well known concrete syntax of sequence diagrams instead of the complicated and less intuitive abstract syntax version. On the other hand, in our approach we need to implement a translation from concrete syntax to abstract syntax-based rules. The extent to which there is a need for sequence diagram transformations in general decides if the implementation effort pays off in practice. We introduced a novel fragment operator that allows us to graphically specify the matching and transformation of a combined fragment with an arbitrary number of operands. Furthermore, we formalized a suitable way to handle the order of occurrences on a lifeline, which is crucial when specifying transformations of sequence diagrams.