Thus, the designer may use Block, State Machine
and Activity Diagrams to model the overall behaviour
of the system. We call this set of models the sys-
tem design. Sequence Diagrams are used to model
correct flows of events in the system, and we can
call them valid traces. Once we have the CML pro-
cesses from both the system design (SYS) and valid
traces (TRC), we can verify that both are deadlock
free using the CML model checker. After deadlock
freedom is verified separately for SYS and TRC, we
can combine both SYS and TRC in parallel and syn-
chronise them in the visible channel events of the Se-
quence Diagram: SYS [|α(TRC)|] TRC. We can now
run a deadlock-freedom verification in order to check
the consistency of the system design with respect to
its traces. If a deadlock happens, a trace of the se-
quence diagram cannot be reproduced by the system
design. Moreover, the counter-example produced by
the model checker can be presented as a Sequence Di-
agram by simply transforming a trace into a diagram.
This series of verifications can uncover many design
problems earlier in the development life cycle.
5 RELATED WORK
In this section, we describe some previous works con-
cerning the formal semantics of Sequence Diagrams.
Storrle (Storrle, 2004) presents an exhaustive
work on formalising Sequence Diagrams using trace
semantics. Many constructs used in UML 2, includ-
ing combined fragments, are covered. Storrle’s se-
mantics allows one to reason about refinement, con-
currency and time restrictions. Haugen et al. (Haugen
et al., 2005) propose an approach based on a trace
semantics in which refinement is used as a founda-
tion for compositional analysis. Lund (Lund, 2007)
gives an operational semantics for the Haugen’s de-
notational semantics. In both semantics, loop with
constraint and the BREAK fragment are not covered.
Cavarra (Cavarra and K
¨
uster-Filipe, 2005) proposed
a technique using templates to express liveness prop-
erties in UML Sequence Diagrams and showed that
some of them cannot be expressed with assert or
negate combined fragments. Abstract state machines
are used to enrich the sequence diagram in order to
express such properties. Dan and Danning (Dan and
Danning, 2010) present an approach to semantic map-
ping specified using QVT (OMG, 2005) relations to
CSP (Hoare, 1985). In their work, very few con-
structs of UML 2 are covered. Cengarle (Cengarle
and Knapp, 2005) gives an operational semantics for
Sequence Diagrams focusing on negative and positive
fragments. Rules are given for each of the operators
specifying whether a trace positively or negatively
satisfies a fragment with that operator. Knapp and
Wuttke (Knapp and Wuttke, 2007) provide an oper-
ational semantics based on automata, while Eicher et
al. (Eichner et al., 2005) use multivalued nets, which
are a specific kind of Petri nets that allow parametri-
sation of messages and Interactions. Most of their for-
malisations are described textually.
Most of these works differ among themselves with
respect to the number of constructions covered, the
semantics of constructions whose official meaning is
vaguely defined, and the semantic domain used in
the formalisations. Micksei and Waeselynck (Micskei
and Waeselynck, 2011) have provided an excellent
survey on existing semantics and their decisions. Ta-
ble 1 presents a comparison of the coverage of our
formalisation with related work in the available liter-
ature. The top row contains all the features that we
cover: InteractionUse (IU), Guards (GD), the Com-
binedFragments for parallel (PA), strict sequencing
(ST), alternatives (AL), option (OP), loop (LP), break
(BK), critical region (CR), state invariant (SI), asyn-
chronous message (As) and gates (Gt). The X indi-
cates that the feature is covered by the work, and ×
indicates it is not.
None of the related works aim to perform consis-
tency verification among SysML structural and be-
havioural diagrams. Some approaches try to check
consistency of a maximum of two types of UML dia-
grams (Gongzheng and Guangquan, 2010; Rasch and
Wehrheim, 2003).
6 CONCLUSIONS
We proposed a formal semantics for SysML Sequence
Diagrams. This semantics is built on translation rules
from Sequence Diagrams to the Compass Modelling
Language (CML). It covers sophisticated elements of
Sequence Diagrams like parallel composition, break,
and loop, which are not completely addressed by most
existing approaches. We have actually defined the se-
mantics of a larger set of constructions, described in
more detail elsewhere (Miyazawa et al., 2013).
The main aim of our semantics is the verification
of traces of the whole system modelled by a repre-
sentative set of diagrams. The semantics of these di-
agrams is currently under development. This cross-
diagram verification provides a consistency check of
a model from the structural and the behavioural per-
spectives simultaneously.
We presented a case study that uses elaborated
constructions like loops, breaks and parallel compo-
sition and that captures the interaction among differ-
AFormalSemanticsforSequenceDiagramsandaStrategyforSystemAnalysis
323