<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Oslo, Norway, October</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>From Interaction Overview Diagrams to Temporal Logic</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Luciano Baresi</string-name>
          <email>baresi@elet.polimi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Angelo Morzenti</string-name>
          <email>morzenti@elet.polimi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alfredo Motta</string-name>
          <email>motta@elet.polimi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Matteo Rossi</string-name>
          <email>rossi@elet.polimi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Politecnico di Milano Dipartimento di Elettronica e Informazione, Deep-SE Group Via Golgi</institution>
          <addr-line>42 - 20133 Milano</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2010</year>
      </pub-date>
      <volume>4</volume>
      <issue>2010</issue>
      <fpage>37</fpage>
      <lpage>51</lpage>
      <abstract>
        <p>In this paper, we use UML Interaction Overview Diagrams as the basis for a user-friendly, intuitive, modeling notation that is wellsuited for the design of complex, heterogeneous, embedded systems developed by domain experts with little background on modeling softwarebased systems. To allow designers to precisely analyze models written with this notation, we provide (part of) it with a formal semantics based on temporal logic, upon which a fully automated, tool supported, verification technique is built. The modeling and verification technique is presented and discussed through the aid of an example system.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Complex embedded systems such as those found in the Aerospace and Defense
domains are typically built of several, heterogeneous, components that are often
designed by teams of engineers with different backgrounds (e.g.,
telecommunication, control systems, software engineering, etc.). Careful modeling starting
from the early stages of system development can greatly help increase the
quality of the designed system when it is accompanied and followed by verification
and code generation activities. Modeling-verification-code generation are three
pillars in the model driven development of complex embedded systems; they are
most effective when (i) modeling is based on user-friendly, intuitive, yet precise
notations that can be used with ease by experts of domains other than computer
science; (ii) rigorous, possibly formal, verification can be carried out on the
aforementioned models, though in a way that is hidden from the system developer as
much as possible; (iii) executable code can be seamlessly produced from verified
models, to generate implementations that are correct by construction.</p>
      <p>This work, which is part of a larger research effort carried out in the MADES
European project1 [1], focuses on aspects (i) and (ii) mentioned above. In
particular, it is the first step towards a complete proposal for modeling and validating
embedded systems. The plan is to exploit both “conventional” UML diagrams
2
[15] and a subset of the MARTE (Modeling and Analysis of Real-Time and
Embedded systems) UML profile [14]. We want to use Class Diagrams to define the
key components of the system. State Diagrams to model their internal behaviors,
and Sequence and Interaction Overview Diagrams to model the interactions and
cooperations among the different elements. These diagrams will be augmented
with clocks and resources taken from MARTE. The result is a multi-faceted
model of the system, automatically translated into temporal logic to verify it.
Temporal Logic helps glue the different views, create a single, consistent
representation of the system, discover inconsistencies among the different aspects,
and formally verify some global properties.</p>
      <p>This paper starts from Interaction Overview Diagrams (IODs) since they are
often neglected, but they provide an interesting means to integrate Sequence
Diagrams (SDs) and define coherent and complex evolutions of the system of
interest. IODs are ascribed a formal semantics, based on temporal logic, upon
which a fully automated, tool supported, verification technique is built.</p>
      <p>The choice of IODs as the starting point for a modeling notation that is
accessible to experts of different domains, especially those other than software
engineering, is borne from the observation that, in the industrial practice, SDs
are often the preferred notation of system engineers to describe components’
behaviors [3]. However, SDs taken in isolation are not enough to provide a
complete picture of the interactions among the various components of a complex
system; hence, system designers must be given mechanisms to combine different
SDs into richer descriptions, which is precisely what IODs offer.</p>
      <p>IODs cannot be used to perform the kind of rigorous analysis that is
crucial throughout the development of critical systems such as those typical of the
Aerospace and Defense domains unless they are given a precise semantics. To
this end, in this article we provide a preliminary formal semantics of IODs based
on metric temporal logic. While this semantics is not yet complete, as it does not
cover all possible mechanisms through which SDs can be combined into IODs,
it is nonetheless a significant first step in this direction. The provided semantics
has been implemented into the Zot bounded satisfiability/model checker [16]2,
and has been used to prove some properties of an example system.</p>
      <p>This paper is structured as follows. Section 2 briefly presents IODs; Section 3
gives an overview of the metric temporal logic used to define the formal semantics
of IODs, and of the Zot tool supporting it; Section 4 introduces the formal
semantics of IODs through an example system, and discusses how it has been
used to prove properties of the latter; Section 5 discusses some relevant related
works; finally, Section 6 draws some conclusions and outlines future works.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Interaction Overview Diagrams</title>
      <p>Most UML behavioral diagrams have undergone a significant revision from
version 1.x to version 2.x To model interactions, UML2 offers four kinds of diagrams:
2 Zot is available at http://home.dei.polimi.it/pradella.
3
communication diagrams, sequence diagrams, timing diagrams and interaction
overview diagrams. In this work we focus on Sequence Diagrams (SDs) and
Interaction Overview Diagrams (IODs).</p>
      <p>SDs have been considerably revised and extended in UML2 to improve their
expressiveness and their structure. IODs are new in UML2. They allow a
designer to provide a high-level view of the possible interactions in a system. IODs
constitute a high-level structuring mechanism that is used to compose scenarios
through mechanisms such as sequence, iteration, concurrency or choice. IODs
are a special and restricted kind of UML Activity Diagrams (ADs) where nodes
are interactions or interaction uses, and edges indicate the flow or order in which
these interactions occur. Semantically, however, IODs are more complex
compared to ADs and may have different interpretations. In the following the
fundamental operators of IODs are presented. Figure 2 shows an example of IOD for
the application analyzed in Section 4, which will be used throughout this
Section to provide graphical examples of IOD constructs. IODs include also other
operators whose study is left to future works.</p>
      <sec id="sec-2-1">
        <title>2.1 Initial Node/Final Node/Flow Final Node</title>
        <p>In IODs these operators have exactly the same meaning of the corresponding
operators found in ADs.</p>
        <p>An initial node is a type of control node which initiates flow in a IOD. It has
no incoming flows and one or more outgoing flows. The outgoing flows may be
guarded with conditions that determine if they will accept tokens. When a IOD
starts, tokens are offered to all outgoing flows of the initial node.</p>
        <p>A final node is a node that stops a IOD. When a token arrives at a final node
all flows in the enclosing activity are stopped and the IOD is terminated. The
token arriving at the final node is destroyed.</p>
        <p>Finally, a flow final node is a type of final node that consumes the incoming
token. When a token arrives at a flow final node the token is consumed and
nothing else in the IOD is affected.</p>
        <p>The IOD of Figure 2 has an initial node at the top, but no final or flow final
nodes.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Control Flow</title>
        <p>A control flow is a directed connection (flow) between two SDs (e.g., between
diagrams delegateSMS and downloadSMS in Figure 2). As soon as the SD at
the source of the flow is finished, it presents a token to the SD at the end of the
flow.
2.3</p>
      </sec>
      <sec id="sec-2-3">
        <title>Fork/Join</title>
        <p>A fork node is a control node that has a single incoming flow and two or more
outgoing flows. Incoming tokens are offered to all outgoing flows (edges). The
4
outgoing flows can be guarded, which gives them a mechanism to accept or reject
a token. If one of the outgoing flows accepts the token, the token is duplicated
for that flow. In this work we do not deal with guards, but this is a rather
straightforward extension that we will consider in the future. In the IOD of
Figure 2, there is one fork node at the top of the diagram (between the initial
node and SDs waitingCall and checkingSMS ) modeling two concurrent execution
of the system.</p>
        <p>The dual operator is the join node, which synchronizes a number of incoming
flows into a single outgoing flow. Each (and every) incoming control flow must
present a control token to the join node before the node can offer a single token
to the outgoing flow.
2.4</p>
      </sec>
      <sec id="sec-2-4">
        <title>Decision/Merge</title>
        <p>A decision node is a control node that has one incoming flow and two or more
outgoing flows. When a token arrives at a decision node it is offered to all the
outgoing flows, one (and only one) of which accepts the token. In the IOD of
Figure 2 there are four decision operators (e.g., the one between SDs waitingCall
and delegateCall ) with their corresponding boolean conditions.</p>
        <p>Conversely, the merge node is a type of control node that has two or more
incoming flows and a single outgoing flow. It is used to reunite alternative flows
that originate from one or more decision nodes. The merge node accepts a token
on any one (and only one) of the incoming flows and passes it to the single
outgoing flow.
3</p>
        <p>TRIO and Zot
TRIO [7] is a general-purpose formal specification language suitable for
describing complex real-time systems, including distributed ones. TRIO is a first-order
linear temporal logic that supports a metric on time. TRIO formulae are built
out of the usual first-order connectives, operators, and quantifiers, as well as a
single basic modal operator, called Dist, that relates the current time, which
is left implicit in the formula, to another time instant: given a time-dependent
formula F (i.e., a term representing a mapping from the time domain to truth
values) and a (arithmetic) term t indicating a time distance (either positive or
negative), the formula Dist(F, t) specifies that F holds at a time instant whose
distance is exactly t time units from the current instant. Dist(F, t) is in turn also
a time-dependent formula, as its truth value can be evaluated for any current
time instant, so that temporal formulae can be nested as usual. While TRIO
can exploit both discrete and dense sets as time domains, in this paper we
assume the standard model of the nonnegative integers N as discrete time domain.
For convenience in the writing of specification formulae, TRIO defines a number
of derived temporal operators from the basic Dist, through propositional
composition and first-order logic quantification. Table 1 defines some of the most
significant ones, including those used in this paper.</p>
        <p>Operator</p>
        <p>Definition
Past(F, t) t ≥ 0 ∧ Dist(F, −t)
Futr(F, t) t ≥ 0 ∧ Dist(F, t)
Alw(F ) ∀d : Dist(F, d)
AlwP(F ) ∀d &gt; 0 : Past(F, d)
AlwF(F ) ∀d &gt; 0 : Futr(F, d)
SomF(F ) ∃d &gt; 0 : Futr(F, d)
SomP(F ) ∃d &gt; 0 : Past(F, d)
Lasted(F, t) ∀d ∈ (0, t] : Past(F, d)</p>
        <p>Lasts(F, t) ∀d ∈ (0, t] : Futr(F, d)
WithinP(F, t) ∃d ∈ (0, t] : Past(F, d)
WithinF(F, t) ∃d ∈ (0, t] : Futr(F, d)
Since(F, G) ∃d &gt; 0 : Lasted(F, d) ∧ Past(G, d)
Until(F, G) ∃d &gt; 0 : Lasts(F, d) ∧ Futr(G, d)</p>
        <p>The TRIO specification of a system consists of a set of basic items, which
are primitive elements, such as predicates, time-dependent values, and functions,
representing the elementary phenomena of the system. The behavior of a system
over time is formally described by a set of TRIO formulae, which state how the
items are constrained and how they vary, in a purely descriptive (or declarative)
fashion.</p>
        <p>The goal of the verification phase is to ensure that the system S satisfies
some desired property R, that is, that S |= R. In the TRIO approach S and R
are both expressed as logic formulae Σ and ρ, respectively; then, showing that
S |= R amounts to proving that Σ ⇒ ρ is valid.</p>
        <p>TRIO is supported by a variety of verification techniques implemented in
prototype tools. In this paper we use Zot [16], a bounded satisfiability checker
which supports verification of discrete-time TRIO models. Zot encodes
satisfiability (and validity) problems for discrete-time TRIO formulae as propositional
satisfiability (SAT) problems, which are then checked with off-the-shelf SAT
solvers. More recently, we developed a more efficient encoding that exploits the
features of Satisfiability Modulo Theories (SMT) solvers [2]. Through Zot one
can verify whether stated properties hold for the system being analyzed (or parts
thereof) or not; if a property does not hold, Zot produces a counterexample that
violates it.
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Formal Semantics of Interaction Overview Diagrams</title>
      <p>This section introduces the formal semantics of IODs defined in terms of the
TRIO temporal logic. The semantics is presented by way of an example system,
whose behavior modeled through a IOD is described in Section 4.1. Then,
Section 4.2 discusses the TRIO formalization of different constructs of IODs, and
illustrates how this is used to create a formal model for the example system.
Finally, Section 4.3 briefly discusses some properties that were checked for the
modeled system by feeding its TRIO representation to the Zot verification tool.
4.1</p>
      <sec id="sec-3-1">
        <title>Example telephone system</title>
        <p>The example system used throughout this section is a telephone system
composed of three units, a TransmissionUnit, a ConnectionUnit and a Server,
depicted in the class diagram of Figure 1. The ConnectionUnit is in charge of
checking for the arrival of new SMSs on the Server (operation checkSMS of class
Server ) and to handle new calls coming from the Server (operation IncomingCall
of class ConnectionUnit ). The TransmissionUnit is used by the ConnectionUnit
to download the SMSs (operation downloadSMS ) and to handle the call’s data
(operation beginCall ). The TransmissionUnit receives the data concerning SMSs
and calls from the Server (operations receiveSMSToken and receiveCallData).</p>
        <p>The behavior of the telephone system is modeled by the IOD of Figure 2.
The fork operator specifies that the two main paths executed by the system are
in parallel; for example the checkingSMS and receiveCall sequence diagrams run
in parallel. Branch conditions are used in order to distinguish between different
possible executions; for example after checking for a new SMS on the Server the
system will continue with downloading the SMSs if one is present, otherwise it
will loop back to the same diagram. It can be assumed that the Server allocates
a dedicated thread to each connected telephone, this is why the sequence
diagrams of Figure 2 report the interaction between only one ConnectionUnit, one
TransmissionUnit and one Server.
4.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>TRIO Formalization</title>
        <p>The formalization presented here was derived from the diagram of Figure 2 by
hand. The availability of a tool, which we are building, will allow us to analyze
more complex models and assess the actual scalability of the proposed technique.
The formalization is organized into sets of formulae, each of them corresponding
to one of the SDs appearing in the IOD. Every set can be further decomposed
into three subsets modeling different aspects of the SDs:
– diagram-related formulae, which concern the beginning and the end of
the execution of each SD, and the transition between a SD and the next
one(s);
– message-related formulae, which concern the ordering of the events within
a single SD;
– component-related formulae, which describe constraints on the
execution of operations within single components.</p>
        <p>These subsets are presented in the rest of this section.</p>
        <p>
          Diagram-related Formulae In this first version of the semantics of IODs we
impose that, within each SD of an IOD, messages are totally ordered. This is to
clearly identify a begin message and an ending message. This assumption can
be removed using the fork/join operators to split diagrams into totally ordered
ones. Then, for each SD Dx, it is possible to identify two messages, ms and me,
which correspond to the beginning and to the end of the diagram. For each SD
Dx we introduce predicates DxST ART and DxEN D that are true, respectively,
at the beginning and the end of the diagram. We also introduce, for each message
m appearing in diagram Dx, a predicate m that holds in all instants in which
the message occurs in the system (this entails that components synchronize on
messages: send and receive of a message occur at the same time). Then, the
correspondence between DxST ART (resp. DxEN D) and the starting (resp.
ending) message ms (resp. me) is formalized by formulae (
          <xref ref-type="bibr" rid="ref1 ref2">1-2</xref>
          )3. In addition,
we introduce a predicate Dx that holds in all instants in which diagram Dx
is executing; hence, predicate Dx holds between DxST ART and DxEN D, as
stated by formula (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ).
(
          <xref ref-type="bibr" rid="ref1">1</xref>
          )
(
          <xref ref-type="bibr" rid="ref2">2</xref>
          )
(
          <xref ref-type="bibr" rid="ref3">3</xref>
          )
(
          <xref ref-type="bibr" rid="ref4">4</xref>
          )
(
          <xref ref-type="bibr" rid="ref5">5</xref>
          )
(
          <xref ref-type="bibr" rid="ref6">6</xref>
          )
        </p>
        <sec id="sec-3-2-1">
          <title>DxST ART ⇔ ms</title>
        </sec>
        <sec id="sec-3-2-2">
          <title>DxEN D ⇔ me</title>
        </sec>
        <sec id="sec-3-2-3">
          <title>Dx ⇔ DxST ART ∨ Since(¬DxEN D, DxST ART )</title>
          <p>
            For example, the instances of formulae (
            <xref ref-type="bibr" rid="ref1 ref2 ref3">1-3</xref>
            ) for diagram delegateSMS
correspond to formulae (
            <xref ref-type="bibr" rid="ref4 ref5 ref6">4-6</xref>
            ).
          </p>
          <p>delegateSM SST ART ⇔ downloadSM S
delegateSM SEN D ⇔ reply3
delegateSM S ⇔ delegateSM SST ART ∨</p>
          <p>Since(¬delegateSM SEN D, delegateSM SST ART )
3 Note that TRIO formulae are implicitly temporally closed with the Alw operator;
hence, DxST ART ⇔ ms is actually an abbreviation for Alw(DxST ART ⇔ ms) .</p>
          <p>
            Notice that if the IOD contains k different occurrences of the same message
m, k different predicates m0...mk are introduced. For this reason in formula (
            <xref ref-type="bibr" rid="ref5">5</xref>
            )
reply3 appears instead of reply.
          </p>
          <p>
            A diagram Dx is followed by a diagram Dy for either of two reasons: (
            <xref ref-type="bibr" rid="ref1">1</xref>
            ) Dx
is directly connected to Dy, in this case the end of Dx is the necessary condition
to start Dy; (
            <xref ref-type="bibr" rid="ref2">2</xref>
            ) Dx is connected to Dy through some decision operator, in this
case the necessary condition to start Dy is given by the end of Dx, provided
the condition on the decision operator is met. If a diagram Dx is preceded by
p sequence diagrams, we introduce p predicates DxACT Ci (i ∈ {1...p}), where
DxACT Ci holds if the i-th necessary condition to start diagram Dx holds. We
also introduce predicate DxACT , which holds the instant after any of the p
necessary conditions holds, as defined by formula (
            <xref ref-type="bibr" rid="ref7">7</xref>
            ). This is done to avoid that
DxST ART and DyEN D are true at the same time instant, with Dy ∈ {1...p}. In
fact a condition DxACT Ci holds when the ending predicate of the i-th diagram
that precedes Dx hold. After the necessary condition to start a diagram is met,
the diagram will start at some point in the future (not necessarily immediately),
as stated by formula (
            <xref ref-type="bibr" rid="ref8">8</xref>
            ). Finally, after a diagram starts, it cannot start again
until the necessary condition to start it is met anew, as defined by formula (
            <xref ref-type="bibr" rid="ref9">9</xref>
            ).
          </p>
        </sec>
        <sec id="sec-3-2-4">
          <title>DxACT ⇔ Past(DxACT C0 ∨ ... ∨ DxACT Cm, 1)</title>
        </sec>
        <sec id="sec-3-2-5">
          <title>DxACT ⇒ SomF(DxST ART ) ∨ DxST ART</title>
        </sec>
        <sec id="sec-3-2-6">
          <title>DxST ART ⇒ ¬SomF(DxST ART ) ∨ Until(¬DxST ART , DxACT )</title>
          <p>
            In the case of SD downloadSMS of Figure 2, the instances of formulae (
            <xref ref-type="bibr" rid="ref7 ref8 ref9">7-9</xref>
            )
are given by (
            <xref ref-type="bibr" rid="ref12 ref13 ref14">12-14</xref>
            ). In addition, formulae (
            <xref ref-type="bibr" rid="ref10 ref11">10-11</xref>
            ) define the necessary conditions
to start diagram downloadSMS : either diagram delegateSMS ends, or diagram
downloadSMS ends and condition moredata holds. Currently, we can only deal
with atomic boolean conditions. The representation of more complex data, and
conditions upon them, is already in our research agenda.
          </p>
          <p>downloadSM SACT C1 ⇔ delegateSM SEN D
downloadSM SACT C2 ⇔ downloadSM SEN D ∧ moredata
downloadSM SACT ⇔ Past
downloadSM SACT C1
∨ downloadSM SACT C2
downloadSM SACT ⇒</p>
        </sec>
        <sec id="sec-3-2-7">
          <title>SomFe(downloadSM SST ART ) ∨ downloadSM SST ART (13) downloadSM SST ART ⇒ ¬SomFe(downloadSM SST ART ) ∨</title>
        </sec>
        <sec id="sec-3-2-8">
          <title>Until(¬downloadSM SST ART , downloadSM SACT )</title>
          <p>
            (
            <xref ref-type="bibr" rid="ref14">14</xref>
            )
Message-related Formulae Suppose that, in a SD, a message mi is followed
by another message mj. Then the occurrence of mi entails that mj will also
occur in the future; conversely, the occurrence of mj entails that mi must have
occurred in the past. This is formally defined by formulae (
            <xref ref-type="bibr" rid="ref15">15-16</xref>
            ). In addition,
after an instance of mj, there can be a new instance of the same message only
after a new occurrence of mi; this is stated by formula (17), which defines that,
after mj, there will not be a new occurrence of mj until there is an occurrence
of mi.
          </p>
          <p>mi ⇒ SomF(mj) ∧ ¬mj
mj ⇒ SomP(mi) ∧ ¬mi
mj ⇒ ¬SomF(mj) ∨ Until(¬mj, mi)</p>
          <p>
            If, for example, formulae (
            <xref ref-type="bibr" rid="ref15">15-17</xref>
            ) are instantiated for SD checkingSMS of
Figure 2, one obtains formulae (18-20).
          </p>
          <p>checkSM S ⇒ SomF(reply1) ∧ ¬reply1</p>
          <p>reply1 ⇒ SomP(checkSM S) ∧ ¬checkSM S
checkSM S ⇒ ¬SomF(checkSM S) ∨ Until(¬checkSM S, reply1)
Component-related Formulae This set of formulae describes the conditions
under which the entities of the system are busy, hence cannot perform further
operations until they become free again. For example, in the telephone system
of Figure 2, when the execution is inside the checkingSMS diagram, the
ConnectionUnit cannot perform any other operations during the time interval between
the invocation of operation ckechSMS and its corresponding reply message, since
the invocation is synchronous (as highlighted by the full arrow).</p>
          <p>In general, a synchronous invocation between objects A and B that starts
with message mi and ends with message mj blocks both components from the
moment of the invocation until its end; this is formalized by formulae (21-22),
in which h and k are indexes identifying the occurrences of objects A and B in
the IOD. In case of an asynchronous message m between A and B (such as, for
example, incomingCall in SD waitingCall, as denoted by the wire-like arrow),
the semantics is the one defined by formulae (23-24), which state that the objects
are blocked only in the instant in which the message occurs.</p>
          <p>mi ∨ Since(¬mj, mi) ⇔ ABLOCKEDh
mi ∨ Since(¬mj, mi) ⇔ BBLOCKEDk
m ⇔ ABLOCKEDh
m ⇔ BBLOCKEDk</p>
          <p>
            Finally, if n is the number of occurrences of object A in the IOD, formula
(25) states that all executions involving A are mutually exclusive.
(
            <xref ref-type="bibr" rid="ref15">15</xref>
            )
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)
∀1 ≤ i, j ≤ n(i = j ∧ ABLOCKEDi ⇒ ¬ABLOCKEDj )
          </p>
          <p>The following formulae are instances of (21-25) for object ConnectionUnit,
which appears in four separate SDs in the IOD of Figure 2:
11
(25)</p>
        </sec>
        <sec id="sec-3-2-9">
          <title>ConnectionU nitBLOCKED1 ⇔ checkSM S∨</title>
        </sec>
        <sec id="sec-3-2-10">
          <title>Since(¬reply1, checkSM S)</title>
        </sec>
        <sec id="sec-3-2-11">
          <title>ConnectionU nitBLOCKED2 ⇔ incomingCall</title>
        </sec>
        <sec id="sec-3-2-12">
          <title>ConnectionU nitBLOCKED3 ⇔ downloadSM S∨</title>
        </sec>
        <sec id="sec-3-2-13">
          <title>Since(¬reply2, donwloadSM S)</title>
        </sec>
        <sec id="sec-3-2-14">
          <title>ConnectionU nitBLOCKED4 ⇔ beginCall∨</title>
        </sec>
        <sec id="sec-3-2-15">
          <title>Since(¬reply3, beginCall) ∀1 ≤ i, j ≤ 4(i = j ∧ ConnectionU nitBLOCKEDi ⇒ ¬ConnectionU nitBLOCKEDj )</title>
          <p>4.3</p>
        </sec>
      </sec>
      <sec id="sec-3-3">
        <title>Properties</title>
        <p>Using the formalization presented above, we can check whether the modeled
system satisfies some user-defined properties or not, by feeding it as input to the
Zot verification tool.4</p>
        <p>We start by asking whether it is true that, if no SMS is received in the
future, then nothing will ever be downloaded. This property is formalized by the
following formula:
¬SomF(SM S) ⇒ ¬SomF(downloadSM S)
(26)</p>
        <p>After feeding it the system and the property to be verified, the Zot tool
determines that the latter does not hold for the telephone system of Figure 2. In
fact, between the check for a new SMS and its download there can be an arbitrary
delay; hence, the situation in which the last SMS has been received, but it has
not yet been downloaded, violates the property. Zot returns this counterexample
in around 8.5 seconds.5</p>
        <p>The following variation of the property above, instead, holds for the system:
¬(SomP(SM S) ∨ SM S) ⇒ ¬WithinF(downloadSM S, 3)
(27)
4 The complete Zot model can be downloaded from
http://home.dei.polimi.it/rossi/telephone.lisp.
5 All tests have been performed with a time bound of 50 time units (see [16] for
the role of time bounds in Bounded Model/Satisfiabliity Checking), using the
Common Lisp compiler SBCL 1.0.29.11 on a 2.80GHz Core2 Duo laptop with
Linux and 4 GB RAM. The verification engine used was the SMT-based Zot
plugin introduced in [2], with Microsoft Z3 2.8
(http://research.microsoft.com/enus/um/redmond/projects/z3/) as the SMT solver.</p>
        <p>Formula (27) states that, if no SMS has yet been received, for the next 3
instants there will not be an SMS download. Zot determines that formula (27)
holds in around 7 seconds.</p>
        <p>The following formula states that after a nextSMSToken request from
TransmissionUnit to Server, no data concerning an incoming call can be received by
the TransmissionUnit until a new SMS is received.</p>
        <p>nextSM ST oken ⇒ Until(¬receiveCallData, receiveSM ST oken)
(28)</p>
        <p>Zot verifies that property (28) does not hold in around 8 seconds. As
witnessed by the counterexample produced by Zot, the reason why (28) does not
hold is that the downloadSMS diagram and the receiveCall diagram can run in
parallel, and after sending a nextSMSToken message the TransmissionUnit and
the Server are free to exchange a receiveCallData message.
5</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Related Work</title>
      <p>Scenario-based specifications such as UML sequence diagrams, UML interaction
diagrams, and Message Sequence Charts (MSCs) are classified as semi-formal,
meaning that their syntax is formal but not their interpretation. As a
consequence, the research community has devoted a significant effort to studying
ways to give these diagrams a formal semantics.</p>
      <p>Many works focus on the separate formalization of sequence diagrams and
activity diagrams. St¨orrle analyzes the semantics of these diagrams and
proposes an approach to their formalization [18]. More recently, Staines formalizes
UML2 activity diagrams using Petri nets and proposes a technique to achieve
this transformation [17]. Also, Lam formalizes the execution of activity diagrams
using the π − Calculus, thus providing them with a sound theoretical
foundation [13]. Finally, Eshuis focuses on activity diagrams, and defines a technique
to translate them into finite state machines that can be automatically verified
[9][8].</p>
      <p>Other works investigate UML2 interaction diagrams. Cengarle and Knapp in
[6] provide an operational semantics to UML 2 interactions, and in [5] they
address the lack of UML interactions to explicitly describe variability and propose
extensions equipped with a denotational semantics. Knapp and Wuttke
translate UML2 interactions into automata and then verify that the proposed design
meets the requirements stated in the scenarios by using model checking [12].</p>
      <p>When multiple scenarios come into play, like in IODs, there is the problem
of finding a common semantics. Uchitel and Kramer in [19] propose an
MSCbased language with a semantics defined in terms of labeled transition systems
and parallel composition, which is translated into Finite Sequential Processes
that can be model-checked and animated. Harel and Kugler in [10] use Live
Sequence Charts (LCSs) to model multiple scenarios, and to analyze the problem
of knowing if there exists a satisfying object system and, if so, to synthesize one
automatically.</p>
      <p>In spite of the extensive research on the diagrams mentioned above, to the
best of our knowledge very little attention has been paid to IODs. Kloul and
Ku¨ster-Filipe [11] show how to model mobility using IODs and propose a formal
semantics to the latter by translating them into the stochastic process algebra
PEPA nets. Tebibel uses hierarchical colored Petri nets to define a formal
semantics for IODs [4]. Our work is quite different, because it uses metric temporal
logic to define the semantics of IODs; as briefly discussed in Sections 1 and 6, this
opens many possibilities as far as the range of properties that can be expressed
and analyzed for the system is concerned.
6</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions and Future Works</title>
      <p>In this paper we presented the first steps towards a technique to precisely model
and analyze complex, heterogeneous, embedded systems using an intuitive
UMLbased notation. To this end, we started by focusing our attention on Interaction
Overview Diagrams, which allow users to describe rich behaviors by combining
together simple Sequence Diagrams. To allow designers to rigorously analyze
modeled systems, the basic constructs of IODs have been given a formal
semantics based on metric temporal logic. This semantics has been implemented in a
fully automated verification tool, which has been used to prove some properties
of an example system.</p>
      <p>The work presented in this paper is part of a longer term research, and it
will be extended in several ways.</p>
      <p>As mentioned in Section 3, the TRIO temporal logic on which the
semantics of IODs presented here is based has a metric notion of time. As such, it
allows users to express real-time properties (e.g., ”a message will be sent within
3 seconds”). Nonetheless, in the present paper we only formalize qualitative
temporal properties, like (partial) ordering among events and eventualities. The
metric features of TRIO will be used to extend the formalization of SDs and
IODs to real-time features that will be introduced in the modeling language by
providing support for the MARTE UML profile.</p>
      <p>Furthermore, we will provide semantics to constructs of IODs that are not yet
covered. This semantics will be used to create tools to automatically translate
IODs into the input language of the Zot tool, and to show designers the
feedback from the verification tool (e.g., counterexamples) in a user-friendly way. In
particular, we will define mechanisms to show counterexamples provided by Zot
as SDs. These tools will allow domain experts who have little or no background
in formal verification techniques to take advantage of these techniques in the
analysis of complex systems.</p>
      <p>A longer term goal of the present research is to include in the formalization
not only Sequence Diagrams, but also other, related, notations that are
customarily used to specify the behavior of the modeled systems, most typically
State Diagrams. TRIO, and its related verification engine Zot, will become the
common underlying semantic ground on which to build an integrated, coherent
verification environment for real-time critical systems.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>This research was supported by the European Community’s Seventh Framework
Program (FP7/2007-2013) under grant agreement n. 248864 (MADES), and by
the Programme IDEAS-ERC, Project 227977-SMScom.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>A.</given-names>
            <surname>Bagnato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sadovykh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. F.</given-names>
            <surname>Paige</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Kolovos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Baresi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Morzenti</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Rossi</surname>
          </string-name>
          . MADES:
          <article-title>Embedded systems engineering approach in the avionics domain</article-title>
          .
          <source>In Proccedings of the First Workshop on Hands-on Platforms and tools for model-based engineering of Embedded Systems (HoPES)</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>M. M. Bersani</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Frigeri</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Pradella</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Rossi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Morzenti</surname>
          </string-name>
          , and P. San Pietro.
          <article-title>Bounded reachability for temporal logic over constraint systems</article-title>
          .
          <source>In Proceedings of TIME</source>
          <year>2010</year>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>G.</given-names>
            <surname>Blohm</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Bagnato</surname>
          </string-name>
          .
          <source>D1</source>
          .
          <article-title>1 requirements specification</article-title>
          .
          <source>Technical report, MADES Consortium</source>
          ,
          <year>2010</year>
          . Draft.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>T.</surname>
          </string-name>
          Bouabana-Tebibel.
          <article-title>Semantics of the interaction overview diagram</article-title>
          .
          <source>In Proc. of the IEEE International Conference on Information Reuse Integration (IRI)</source>
          , pages
          <fpage>278</fpage>
          -
          <lpage>283</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>M. V.</given-names>
            <surname>Cengarle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Graubmann</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Wagner</surname>
          </string-name>
          .
          <source>Semantics of UML 2</source>
          .
          <article-title>0 interactions with variabilities</article-title>
          .
          <source>Electronic Notes in Theoretical Computer Science</source>
          ,
          <volume>160</volume>
          :
          <fpage>141</fpage>
          -
          <lpage>155</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>M. V.</given-names>
            <surname>Cengarle</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Knapp</surname>
          </string-name>
          .
          <article-title>Operational semantics of UML 2.0 interactions</article-title>
          .
          <source>Technical Report TUM-I0505</source>
          , Technische Universit¨at Mnchen,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>E.</given-names>
            <surname>Ciapessoni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Coen-Porisini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Crivelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Mandrioli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Mirandola</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Morzenti</surname>
          </string-name>
          .
          <article-title>From formal models to formally-based methods: an industrial experience</article-title>
          .
          <source>ACM TOSEM</source>
          ,
          <volume>8</volume>
          (
          <issue>1</issue>
          ):
          <fpage>79</fpage>
          -
          <lpage>113</lpage>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>R.</given-names>
            <surname>Eshuis</surname>
          </string-name>
          .
          <article-title>Symbolic model checking of UML activity diagrams</article-title>
          .
          <source>ACM Trans. Softw</source>
          . Eng. Methodol.,
          <volume>15</volume>
          (
          <issue>1</issue>
          ):
          <fpage>1</fpage>
          -
          <lpage>38</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>R.</given-names>
            <surname>Eshuis</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Wieringa</surname>
          </string-name>
          .
          <article-title>Tool support for verifying UML activity diagrams</article-title>
          .
          <source>IEEE Trans. Software Eng.</source>
          ,
          <volume>30</volume>
          (
          <issue>7</issue>
          ):
          <fpage>437</fpage>
          -
          <lpage>447</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>D.</given-names>
            <surname>Harel</surname>
          </string-name>
          and
          <string-name>
            <given-names>H.</given-names>
            <surname>Kugler</surname>
          </string-name>
          .
          <article-title>Synthesizing state-based object systems from LSC specifications</article-title>
          .
          <source>In Proceedings of the International Conference on the Implementation and Application of Automata</source>
          , volume
          <volume>2088</volume>
          <source>of Lecture Notes in Computer Science</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>33</lpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>L.</given-names>
            <surname>Kloul</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Ku</surname>
          </string-name>
          <article-title>¨ster-Filipe. From intraction overview diagrams to PEPA nets</article-title>
          .
          <source>In In proc. of the Workshop on Process Algebra and Stochastically Timed Activities</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>A.</given-names>
            <surname>Knapp</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Wuttke</surname>
          </string-name>
          .
          <article-title>Model checking of UML 2.0 interactions</article-title>
          .
          <source>In Models in Software Engineering</source>
          , volume
          <volume>4634</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>42</fpage>
          -
          <lpage>51</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>V. S. W.</given-names>
            <surname>Lam</surname>
          </string-name>
          .
          <article-title>On -calculus semantics as a formal basis for uml activity diagrams</article-title>
          .
          <source>International Journal of Software Engineering and Knowledge Engineering</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. Object Management Group.
          <article-title>UML Profile for Modeling and Analysis of Real-Time Embedded Systems</article-title>
          .
          <source>Technical report, OMG</source>
          ,
          <year>2009</year>
          . formal/2009-11-02.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. Object Management Group.
          <article-title>OMG Unified Modeling Language (OMG UML), Superstructure</article-title>
          .
          <source>Technical report, OMG</source>
          ,
          <year>2010</year>
          . formal/2010-05-05.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>