UML 2.0 Sequence Diagram's Semantics
Scenario languages are widely used in software development. Typical usage scenarios, forbidden behaviors,
test cases and many more aspects can be depicted with graphical scenarios. Scenario languages were introduced
into the Unified Modeling Language (UML) under the name of Sequence Diagrams. The 2.0 version of UML changed
Sequence Diagrams significantly, the expressiveness of the language was highly increased.
The following figure depicts some of the elements of Sequence Diagrams:
The OMG specification presents a high-level semantics for Sequence Diagrams,
however, the due to the complexity of the language (parallel executions, choices, infinite loops, use of modalities and negation, etc.) several open questions
remain. Many formal semantics were proposed in the recent years for Sequence Diagrams. But as the language itself contains a number of so called semantic variation points
and as the different formal semantics use Sequence Diagrams for different purposes (describing high-level specifications or test cases, defining a set of valid traces or
verifying actual traces, etc.) there are several choices when interpreting Sequence Diagrams.
The many meanings of UML 2 Sequence Diagrams: a survey
Paper: Z. Micskei and H. Waeselynck: The many meanings of UML 2 Sequence Diagrams: a survey,
Software and Systems Modeling, Vol. 10, Num. 4, pp. 489-514, Springer, 2011. DOI:10.1007/s10270-010-0157-9
This paper collects and categorizes the semantic choices in the language, surveys the formal semantics proposed for Sequence Diagrams,
and presents how these approaches handle the various semantic choices.
The semantic choices are presented on diagrams inspired by feature models, in this way the different options for a given semantic question can be more clearly summarized.
The following figure illustrates the choice whether an interaction represents complete or partial traces.
For each of the choices example diagrams and test traces are given that shows the consequences of each of the choices. For example, the following sequence diagrams exemplifies the difference between semantics using complete or partial traces.
UML 2.0 Sequence Diagram's Semantics -- Technical report
Report: Z. Micskei and H. Waeselynck: A survey of UML 2.0 sequence diagrams' semantics, LAAS Technical Report, August 2008.
This technical report contains an older, slightly different approach for categorizing the choices and issues. However, it contains more information about the syntax and semantics
of UML 2 Sequence Diagrams, and presents several proposed formal semantics in more details with the help of sketching the recommended formal semantics of an example diagram.
A list of papers proposing a formal semantics for UML 2 Sequence Diagrams (see the survey paper for a more detailed list and review):
Last modified: 2013. 10. 02.
- Harald Störrle. Semantics of interactions in UML 2.0, IEEE Symposium on Human Centric Computing Languages and Environments (HCC 2003), pages 129-136, 2003. IEEE Computer Society.
- Harald Störrle. Trace Semantics of Interactions in UML 2.0. Technical report. Institut für Informatik, Ludwig-Maximilians-Universität München, 2004.
- Alessandra Cavarra and Juliana Küster-Filipe. Combining sequence diagrams and OCL for liveness. In Proceedings of the Semantic Foundations of Engineering Design Languages (SFEDL), ETAPS 2004. Barcelona, Spain, Electronic Notes on Theoretical Computer Science (ENTCS). Elsevire Science, 2004.
- Alessandra Cavarra and Juliana Küster Filipe. Formalizing Liveness-Enriched Sequence Diagrams Using ASMs. In Wolf Zimmermann and Bernhard Thalheim, editors, Abstract State Machines, pages 62-77, 2004. Springer.
- Juliana Küster-Filipe. Modelling Concurrent Interactions. Theoretical Computer Science, 351(2):203-220, 2006. doi: http://dx.doi.org/10.1016/j.tcs.2005.09.068
- Juliana Küster Filipe Bowles. Decomposing Interactions, 11th International Conference on Algebraic Methodology and Software Technology (AMAST 2006), pages 189-203, 2006. Springer. doi:10.1007/11784180
- Maria Victoria Cengarle and Alexander Knapp. UML 2.0 Interactions: Semantics and Refinement. In Jürjens, J., Fernandez, E.B., France, R., Rumpe, B., editors, 3rd Int Workshop on Critical Systems Development with UML (CSDUML'04, Proceedings), Technical Report TUM-I0415, pages 85-99, 2004. Institut für Informatik, Technische Universitat Munchen.
- Maria Victoria Cengarle and Alexander Knapp. Operational Semantics of UML 2.0 Interactions. Technical report TUM-I0505. Institut für Informatik, Technische Universitat München, 2005.
- Alexander Knapp and Jochen Wuttke. Model Checking of UML 2.0 Interactions. In Thomas Kühne, editors, Models in Software Engineering, Workshops and Symposia at MoDELS 2006, pages 42-51, 2006. Springer.
- Christoph Eichner, Hans Fleischhack, Roland Meyer, Ulrik Schrimpf and Christian Stehno. Compositional Semantics for UML 2.0 Sequence Diagrams Using Petri Nets, SDL 2005: Model Driven Systems Design, pages 133-148, 2005. Springer.
- Haitao Dan, Robert M. Hierons and Steve Counsell. A Thread-tag Based Semantics for Sequence Diagrams, Software Engineering and Formal Methods (SEFM 2007), pages 173-182, 2007. IEEE Computer Society.
- David Harel and Shahar Maoz. Assert and negate revisited: Modal semantics for UML sequence diagrams. Software and Systems Modeling, 7(2):237-253, May, 2008.
- Joao M. Fernandes, Simon Tjell, Jens Baek Jorgensen and Oscar Ribeiro. Designing Tool Support for Translating Use Cases and UML 2.0 Sequence Diagrams into a Coloured Petri Net, SCESM '07: Proceedings of the Sixth International Workshop on Scenarios and State Machines, pages 2, Washington, DC, USA, 2007. IEEE Computer Society.
- Oystein Haugen, Knut Eilif Husa, Ragnhild Kobro Runde and Ketil Stolen. STAIRS towards formal design with sequence diagrams. Software and System Modeling, 4(4):355-357, 2005.
- Ragnhild K. Runde, Oystein Haugen, and Ketil Stolen. How to transform UML neg into a useful construct. In Norsk Informatikkonferanse (NIK'05), pages 55--66. Tapir, 2005.
- Mass Soldal Lund. Operational analysis of sequence diagram specifications. Ph.D. thesis, Faculty of Mathematics and Natural Sciences, University of Oslo, 2008.
- Radu Grosu and Scott A. Smolka. Safety-Liveness Semantics for UML 2.0 Sequence Diagrams, ACSD '05: Proceedings of the Fifth International Conference on Application of Concurrency to System Design, pages 6-14, Washington, DC, USA, 2005. IEEE Computer Society. doi:http://dx.doi.org/10.1109/ACSD.2005.31
- Youcef Hammal. Branching Time Semantics for UML 2.0 Sequence Diagrams. In Elie Najm, Jean-Francois Pradat-Peyre and Véronique Donzeau-Gouge, editors, Formal Techniques for Networked and Distributed Systems, pages 259-274, 2006. Springer.