<!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 />
    <article-meta>
      <title-group>
        <article-title>Integrating Veri able Assume/Guarantee Contracts in UML/SysML</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Iulia Dragomir</string-name>
          <email>iulia.dragomir@irit.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Iulian Ober</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christian Percebois</string-name>
          <email>christian.percebois@irit.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Universite de Toulouse - IRIT 118 Route de Narbonne</institution>
          ,
          <addr-line>31062 Toulouse</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The compositional approach based on components and driven by requirements is a common method used in the development of critical realtime embedded systems. Since the satisfaction of a requirement is subject to the composition of several components, de ning abstract and partial behaviors for components with respect to the point of view of the requirement allows for a manageable design of systems. In this paper we consider such speci cations in the form of contracts. A contract for a component is a pair (assumption, guarantee) where the assumption is an abstraction of the component's environment behavior and the guarantee is an abstraction of the component's behavior given that the environment behaves like the assumption. In previous work we have de ned a formal contract-based theory for Timed Input/Output Automata with the aim of using it to express the semantics of UML/SysML models. In this paper we propose an extension of the UML/SysML language with a syntax and semantics for contracts and for the relations they must satisfy. Besides the important role that contracts have in design, they can also be used for the veri cation of requirement satisfaction and for their traceability.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Nowadays critical real-time embedded systems grow larger in size and more complex.
Their development is a challenging task and is often error-prone. A way for system
designers to tackle this issue is to use a compositional approach driven by
requirements. For example, process-oriented standards such as DO-178C [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] highlight the
need to model requirements at di erent levels of abstractions during development
and to ensure their traceability at each design iteration step.
      </p>
      <p>However, requirements are often di cult to be mapped to components: several
components combine together to satisfy a requirement and a component may be
involved in the satisfaction of several requirements. In order to achieve provably
correct compositional design, one needs a way to abstractly specify how a particular
component K participates in ful lling a requirement '. Such a speci cation can take
the form of a contract : a pair (assumption, guarantee) where the assumption is an
abstraction of K's environment behavior and the guarantee is an abstraction of K's
behavior given that the environment behaves according to the assumption. Such a
contract can then be used to model the point of view of the component with respect
to the requirement '. Contracts for reactive and real-time components have received
a lot of attention from the research community recently, as discussed in x5.</p>
      <p>
        Besides the important role contracts can play in system design, they can also be
used as basic blocks for compositional veri cation of requirement satisfaction. In [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]
we have introduced a contract-based theory for compositional veri cation of systems
of communicating Timed Input/Output Automata (TIOA) with the intention to use
it as underlying semantics for contract-based UML/SysML [
        <xref ref-type="bibr" rid="ref18 ref19">19, 18</xref>
        ] modeling and
veri cation.
      </p>
      <p>
        This paper complements the theory from [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] by extending UML/SysML with
the language elements needed for modeling contracts and their relations. The paper
is structured as follows: in x2 we summarize the contract-based reasoning theory we
have de ned and we present the OMEGA UML/SysML pro le [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] on which we want
to apply the formal theory. In x3 we propose a meta-model for the contract theory
and a set of constraints and well-formedness rules needed to make the system model
veri able with contracts. Then, an instantiation of the meta-model for the OMEGA
UML/SysML pro le is discussed. x4 presents the application of our approach to an
industry-grade system model, the ATV SGS case study previously described without
contracts in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], before concluding.
2
2.1
      </p>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <sec id="sec-2-1">
        <title>Timed Input/Output Automata</title>
        <p>
          Many mathematical formalisms have been proposed in the literature for modeling
communicating timed reactive components. Our work is based on a variant of Timed
Input/Output Automata of [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] since it is one of the most general formalisms,
thoroughly de ned and for which several interesting compositionality results are already
available. A TIOA speci es a state space and a set of admitted timed behaviors for a
component. The parallel composition of TIOAs (denoted k in the following) is based
on synchronization of corresponding inputs/outputs and the interleaving of other
actions. The main di erences between our variant and that of [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] are that (1) matched
input-outputs resulting from a composition of two automata result in a visible I/O
action which is not involved in synchronizations thereafter (in [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] the result is an
output, which is not consistent with the semantics of signals in UML or SysML) and
(2) continuous variables are restricted to Alur-Dill-style linear clocks [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] in order to
allow the use of known symbolic simulation and veri cation methods (unavailable
for the more general model of [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]). For the full de nition of the formal model, the
reader is referred to [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ].
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>A UML/SysML Pro le Based on Timed Input/Output Automata</title>
        <p>
          In previous work [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] we have considered the high-level modeling of embedded
realtime systems in UML/SysML with a semantics provided in terms of TIOA. The result
of this work is a semantic pro le for UML and SysML called OMEGA and a set of
tools for simulation and model-checking, the IFx-OMEGA toolset1.
        </p>
        <p>In OMEGA, the architecture of a system is expressed in the usual way in UML
(class diagrams) and in SysML (block de nition diagrams and internal block
diagrams). Classes/blocks may use most of their features: properties (attributes and
parts), signals receptions, interconnection elements (port, connector, interface) and
relations (association, composition and generalization). The hierarchical architecture
of components (and systems) is speci ed through composite structures.</p>
        <p>The behavior of atomic components is modeled by state machines with standard
UML actions on transitions. The operational semantics of each component instance
is a timed input/output automaton. The TIOAs corresponding to components are
composed in parallel and communicate by asynchronous signal exchanges. This
imposes that all communications between objects/block instances are de ned as signal
outputs and receptions that are transferred via ports and connectors. Ports need to
be typed with interfaces that contain the list of signals transferred to or from the
component's environment. With respect to the actions described on transitions, the
semantics supports a signi cant part of the UML action meta-model, including
signal output, assignment, expression valuation and control ow structuring statements.
The translation between OMEGA modeling concepts and the underlying TIOA
semantics is automatic in IFx-OMEGA.</p>
        <p>1 http://www.irit.fr/ifx
⪯
C-1</p>
        <p>G</p>
        <p>A</p>
        <p>φ
A</p>
        <p>G</p>
        <p>Conformance :</p>
        <p>A || G ⪯ φ
C1</p>
        <p>S</p>
        <p>A1</p>
        <p>G1
K1</p>
        <p>C
C3</p>
        <p>A3</p>
        <p>G3
K3</p>
        <p>A2
K2</p>
        <p>Dominance :
{C1, C2, C3} dominates C
G2</p>
        <p>C2
Satisfaction :</p>
        <p>Ki ⊧ Ci , ∀i
bidirectional
communication
satisfaction</p>
        <p>E</p>
        <p>
          The temporal elements of TIOA, such as clocks, clock actions and timed guards
actions have corresponding language constructs in the OMEGA pro le. The elapsing
of time is constrained by transition urgency stereotypes inspired from timed automata
with urgency [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]: time delay is blocked if one of the active transitions in the current
state is stereotyped &lt;eager &gt;, it is upper-bounded if an active transition is stereotyped
&lt;delayable&gt; and is unbounded otherwise (i.e., if all active transitions are stereotyped
&lt;lazy &gt;, which is by default).
        </p>
        <p>The pro le also proposes mechanisms for formalizing requirements, in particular
in the form of real-time safety properties described by observer classes (identi ed by a
stereotype &lt;observer &gt;). The state machine of these classes uses special primitives for
monitoring the system state and events and gives verdicts about the (non-)satisfaction
of a property by using labels (e.g., stereotype &lt;error &gt;) on states.</p>
        <p>
          For a more complete description of the UML/SysML component model used in
OMEGA and of the mapping of notions, the reader is referred to [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ].
2.3
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>A Theory of Contracts for Timed Input/Output Automata</title>
        <p>
          In [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] we de ned a theory for modeling and reasoning with contracts for TIOA. The
theory is an extension of a meta-theory de ned in [
          <xref ref-type="bibr" rid="ref21 ref22">22, 21</xref>
          ]. A contract for a TIOA
component K is a pair of TIOAs that model the assumption (A) and the guarantee
(G). The satisfaction of the contract is de ned formally by a relation based on trace
inclusion between K k A and G k A modulo the set of actions that are of interest for
the contract. The theory also provides the necessary mechanisms for compositional
reasoning with contracts, explained in the following.
        </p>
        <p>
          Consider that the objective is to prove that a system S composed of several
components K1; K2; ; Kn satis es a property ' (see Fig. 1) under a certain hypothesis
A on the behavior of its environment. The method consists in de ning a more
abstract speci cation G of the system such that A k G satis es ' (conformance step
in Fig. 1). Once this step performed, one will be inclined to verify that the
system S satis es the contract C = (A; G). However, it is often impossible to verify
directly (i.e. by checking trace set inclusion) that the composite system S satis es
the contract because of the combinatorial explosion of the state space. To avoid this
problem, the method de ned in [
          <xref ref-type="bibr" rid="ref11 ref21">11, 21</xref>
          ] uses a decomposition of the proof in
independent steps based on the de nition of a set of individual contracts C1; C2::: for
the components K1; K2:::, which, when put together, ensure the global contract C.
We say that fC1; C2; g dominates C (dominance step in Fig. 1). The theory in
[
          <xref ref-type="bibr" rid="ref11 ref21">11, 21</xref>
          ] provides a set of su cient conditions for dominance which can be checked
independently with lesser combinatorial complexity. In addition to the conditions for
dominance, one also has to check that each component Ki satis es the contract Ci
(satisfaction step in Fig. 1).
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Extending UML and SysML for Modeling Contracts</title>
      <p>
        In this section we present the UML and SysML extensions that we propose in
order to support modeling and reasoning with contracts. In x3.1 we describe a domain
meta-model of the contract-related concepts which extends the UML meta-model.
The adaptation for SysML is discussed brie y at the end, as is relatively
straightforward. We then discuss in x3.2 the constraints and well-formedness rules imposed on
the key notions in order to make models with contracts compliant with the theory
from [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] and thus veri able. Finally, in x3.3 we discuss the mapping of the
metamodel concepts as a UML/SysML pro le, using the standard extension mechanisms
(stereotypes).
3.1
      </p>
      <sec id="sec-3-1">
        <title>A Meta-Model for Contracts in UML</title>
        <p>Within the contract theory we have presented there are two categories of concepts:
(1) those related to contract modeling represented in the upper part of the
metamodel given in Fig. 2 and (2) those related to modeling relations between contracts,
used for example in veri cation, represented in the lower part of Fig. 2.</p>
        <p>The requirement ' that the component model has to satisfy is represented by
the meta-class SafetyProperty. This meta-class is left unspeci ed at this point since
di erent formalisms could be used to model a requirement, such as temporal logics,
automata-based languages, etc. In x3.3 we instantiate the meta-model in the OMEGA
pro le, which uses an observer for modeling a SafetyProperty.</p>
        <p>The assumption/guarantee of a contract is modeled by the corresponding
metaclass Assumption/Guarantee type of Class. Each of these two elements is modeled by
a class that has a behavior expressed by a state machine and communicates (only)
through ports. Assumptions/guarantees are thus described in the same language
as the system components. In order to have a clear semantics in terms of TIOA,
they are subject to few restrictions: they should not be involved in associations,
generalizations, realizations (except the interface realizations demanded by ports)
and dependencies. An assumption or guarantee may de ne a composite sub-structure.
Such an example is provided in the case study of x4.</p>
        <p>A contract is represented by the meta-class Contract as a composite structure,
containing exactly one assumption and one guarantee (i.e. any other properties are
forbidden) and does not exhibit any behavior. The only relations a contract may be
involved in are those that represent the veri cation relations used in our theory, as
described below.</p>
        <p>If a contract serves in the conformance step in the methodology depicted in Fig. 1,
this is modeled using a Conformance relation (a kind of Dependency ) between the
Contract and the corresponding SafetyProperty. One can use the same contract for
several safety properties.</p>
        <p>The dominance relation is represented by the meta-class Re nement type of
Dependency. One contract is re ned by a set of contracts. Note that this is possible since
UML de nes Dependency from n clients to n suppliers. To ensure that no cycles may
be modeled, the following constraint is imposed: the target of a Re nement is not a
member of the source set.</p>
        <p>Finally, the relation between a component and the contract that it must satisfy
is represented by two relations: one at the level of the type of the component and
one at the level of the instance (the part which participates in a composite structure
where the contract is relevant and which is modeled by the meta-class Property ). On
the level of the type, an Implementation relation (a kind of Dependency ) between
a class and a contract models the fact that the class satis es the contract. One
class can satisfy several distinct contracts. On the level of instances, a ContractUse
relation (also a kind of Dependency ) between a Property, which is part of a composite
structure, and a Contract models the fact that the contract is used for veri cation
within the context of that composite structure. A Property may use a contract if and
only if its class implements that contract.</p>
        <p>
          All constraints have been formalized with OCL [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ]. Their code can be found in
an extended version of this paper [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]. This meta-model can be easily adapted for the
SysML language by de ning the meta-classes Contract, Assumption and Guarantee as
extensions of the stereotype block applied on the meta-class Class from UML4SysML
package. Similarly, the meta-class Dependency belongs to the same package.
3.2
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Well-Formedness Rules for Veri able Contracts</title>
        <p>
          In order to be able to apply the contract-based veri cation theory from [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] we need
to make sure that the hypotheses and constraints imposed by the formal framework
are satis ed by the system model. In the following we formalize these constraints at
the meta-model level by a set of well-formedness rules.
        </p>
        <p>Within the formal framework, a contract is modeled by a pair (A; G) of TIOA
such that the set of inputs/outputs of G is a subset of the set of inputs/outputs
of the component implementing the contract and the composition of A and G is a
closed system. To ensure this, the set of ports of a Guarantee must correspond to
a subset of the set of ports of the component for which the guarantee is de ned.
The correspondence is based on the port name and the port type and direction
must coincide. We consider that when a port is present in the guarantee, all the
corresponding signal receptions de ned by the port type are handled in the guarantee.
Moreover, as the composition between an Assumption and a Guarantee must be
closed, every port of the Guarantee must have a corresponding conjugated port on
the side of the Assumption, with the same type and reversed direction.</p>
        <p>The dominance relation is also subject to the re nement of provided/required
requests. This rule is also expressed with respect to ports: a port of the guarantee which
is the target of the re nement must be matched (by name and type) by a port of one
of the re ning guarantees and must not be matched by a corresponding conjugated
port (i.e. with reversed directionality) of another from the re ning guarantees.</p>
        <p>
          The theory from [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] also induces some constraints on the state machines of
assumptions and guarantees. In particular, the behavior of an assumption or guarantee
should not impose constraints on time progress. This is realized on the UML/SysML
level ensuring that all transitions in these state machines are stereotyped &lt;lazy &gt; and
that there is at most one output action on any transition.
        </p>
        <p>
          Furthermore, for a model with contracts to be used in compositional veri cation
according to the methodology described in x2, the model must describe a unique and
complete proof tree: all implemented contracts are used within a context and for all
SafetyProperty there is a contract conforming to it. The rules described above have
been formalized in OCL and can be found in [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
3.3
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>Instantiating the Meta-Model in the OMEGA Pro le</title>
        <p>In order to use contracts in a standard UML or SysML model, one needs to
capture the information from the meta-model described in the previous section in the
form of standard extensions, namely using stereotypes. Since all the new concepts
introduced in the meta-model inherit from an existing meta-class (either Class or
Dependency ), we choose to represent them as stereotypes of these base meta-classes.
Thus, we use for the meta-class Class the stereotypes &lt;contract &gt;, &lt;assumption&gt;,
&lt;guarantee&gt;, and &lt;observer &gt; (which already exists in OMEGA and is reused for
representing SafetyProperty ). For contract relations, the stereotypes of Dependency
that correspond to the meta-model elements are &lt;contractImplementation&gt;,
&lt;contractUse&gt;, &lt;contractRe nement &gt; and &lt;contractConformance&gt;.</p>
        <p>As explained before, from the semantic point of view, Contracts are not handled in
the same way as usual classes/blocks as they are not considered executable elements
of the system. Contracts are only used by the veri cation tools to check the validity
of the conformance, dominance and satisfaction relations. The choice to describe
contracts as classes is due to the fact that the syntax of contracts reuses much of
the standard syntax of classes: we need to represent a contract as a closed composite
structure with ports and links for the communication between the assumption and the
guarantee and between the assumption and the component which uses the contract,
interfaces to statically type the sets of inputs and outputs of each sub-component
and behavior in the form of state machines.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>The ATV Solar Generation System Case Study</title>
      <p>
        The concepts and the reasoning method previously described have been applied on
a case study, an industrial-grade system model of a subsystem of the Automated
Transfer Vehicle (ATV). The ATV, developed by Astrium Space Transportation for
the European Space Agency, is a spacecraft put into orbit by the European heavy
launcher Ariane-5 with the aim of supplying the International Space Station. This
case study consists of the Solar Wing Generation System (SGS) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] responsible for
the deployment and management of the solar wings of the vehicle. The SysML model
used in the following, provided by Astrium Space Transportation, was obtained by
reverse engineering the actual SGS system for the purpose of this study.
      </p>
      <p>The SGS system model2 illustrated in Fig. 3 summarizes the three main
components involved in the case study: the mission and vehicle management (MVM ) part
that initiates SGS wing deployment, the SOFTWARE part of the SGS that based on
requests received from the MVM executes the corresponding automated procedures
and the HARDWARE part that models the four physical wings. The
communication between components is realized via asynchronous signals transported through
ports and connectors. Due to the large number of ports (661) and connectors (504),
Fig. 3 presents a simpli ed architectural view of SGS and only shows a link between
two parts where several connectors and ports are involved in the actual model. Let
us mention that the veri cation steps presented below have been performed on the
initial system model.</p>
      <p>Under the hypothesis that at most one hardware failure may occur during a run,
which is embedded in the HARDWARE model, the main goal of the case study is to
verify the following property ': after 10 minutes from system start-up, all four wings
are deployed.</p>
      <p>Due to the size and the complexity of the model, applying model-checking
directly leads to combinatorial explosion and the veri cation of ' does not nish. We
explain in the following how the property ' was veri ed using the contract-based
reasoning methodology. We start by modeling the property '. This implies
identifying what the observer corresponding to the safety property ' must monitor. In our
case, the block phi must observe the answer that each wing provides with respect
to its status (deployed or not deployed) when interrogated by the software. So, the
property ' expressed with respect to wing behavior must be satis ed by the
HARDWARE block instance that contains them. With regard to Fig. 1, the HARDWARE
is the subsystem S and WINGi, i = 1; 4, are the components Ki. The environment of
the subsystem is given by the parts with which it communicates: bidirectional
communication is directly established between SOFTWARE and HARDWARE, while
SOFTWARE depends on the behavior of MVM. Thus, the environment E of Fig. 1
is represented here by the composition of MVM and SOFTWARE.</p>
      <p>Next, we provide a contract C = (A; G) such that it conforms to '. In order to
comply to the contract methodology, C is implemented by HARDWARE 's type and
it is used by this part within the proof tree. We use as assumption A the concrete
environment of HARDWARE, the composition between MVM and SOFTWARE
itself, which thus satis es by construction the mirror contract C 1 = (G; A). Keeping
this composition as assumption is not problematic since its state space has a
manageable size. As guarantee G we use the following abstraction derived (manually)
from the individual behavior of wings: for each wing status interrogation, the target
wing answers either as not deployed for at most 400 seconds or as deployed after
at least 130 seconds. In order to ensure that the contract de nes a closed system,
since MVM kSOFTWARE sends all possible requests to HARDWARE, we equip G
with all ports de ned by HARDWARE and we enrich the behavior of G to ignore all
other requests. Then G and HARDWARE have the same set of ports: no re nement
of requests is performed and the corresponding rule is satis ed.</p>
      <p>The third step consists in modeling a set of contracts fC1; C2; C3; C4g that re ne
C and proving that each contract Ci = (Ai; Gi) is implemented by WINGi 's type,
i = 1; 4. The environment for WINGi is given by the environment of the subsystem
HARDWARE and all WINGj, j 6= i. We use the following abstraction WAj for
WINGj : the wing is either not deployed for at most 400 seconds or deployed from at
least 130 seconds while all other received requests are consumed. The assumption Ai
is the parallel composition of MVM, SOFTWARE and WAj, j 6= i. The guarantee Gi
2 The case study is represented using the notation conventions of IBM Rhapsody: http:
//www-03.ibm.com/software/products/us/en/ratirhap/.
1 MVM:MVM
1 SOFTWARE:SOFTWARE</p>
      <p>1 WING2:WING
1 HARDWARE:HARDWARE
1 WING1:WING
«contractUse»
«contractUse»
1 WING3:WING «contractUse»
1 WING4:WING
«contractUse»
«block,contract»</p>
      <p>C1
«block,contract»</p>
      <p>C2
«block,contract»</p>
      <p>C3
«block,contract»</p>
      <p>C4
«contractConformance»
«block,observer»</p>
      <p>phi
«block,contract»</p>
      <p>C
«contractRefinement»
«contractUse»
is the projection of G on WINGi. Again the re nement of requests is not considered
and since the ports of HARDWARE with respect to WINGi are identical to the ports
of WINGi, both rules on port set inclusion for implementation and re nement are
satis ed. Moreover, each Ci de nes a closed system.</p>
      <p>
        After this step the proof obligation tree is complete. The veri cation involves
10 intermediate steps: 4 for verifying that each wing satis es its contract, 5 su
cient conditions for dominance between fC1; C2; C3; C4g and C and one for proving
that A k G '. Each veri cation step is performed by the OMEGA-IFx model
checker in a few hours. The overall e ort of the building the contracts and
performing the veri cation steps was of about 5 person*days. Even though the translation
and veri cation algorithm are automated, two intermediate modeling steps -
connecting assumptions to components via links and transforming the state machine of
guarantees into observer (timed trace inclusion is veri ed using observers) - remain
manual. The automation of these steps is currently under development. For further
details on contract-based veri cation of the SGS case study, the reader is referred to
[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Related Work</title>
      <p>
        Modeling and verifying contracts for components is a long line of research, whose
origins date back to Hoare logic [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Syntactical and behavioral contracts, as
classi ed in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], have been explored for specifying composition constraints and pre/post
conditions for operations and also for modeling transformation of models and
execution semantics. Contracts as a language construct have emerged with the Ei el
programming language [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] and have since been explored for various programming
and speci cation models. In this section we concentrate on work aiming to introduce
contracts in high-level modeling languages. For a discussion of more theoretical works
on contracts and contract-based veri cation the reader is referred to [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>
        Weis et al. [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] propose to model a contract for a component in UML by an
interPage f1aocf1e and to specify its role: it can be either a required contract on which the component
depends or a provided contract that is realized by the component. Syntactically, this
representation of contracts is similar to ours: we also make the distinction between
the required behavior of the environment and the provided behavior of the component
by taking into account the assumption over the environment. However, our contracts
are richer since they model a behavior that can be used for component validation,
while the contracts of [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] can be used only for composability checking during the
development phases.
      </p>
      <p>
        The Kmelia component model [
        <xref ref-type="bibr" rid="ref15 ref2">15, 2</xref>
        ], based on the work described above,
provides means to verify the functional correctness of behavioral contracts for services:
the behavior of an operation is modeled as a Labeled Transition System and formal
veri cation can be realized within di erent tools via model transformation. Their
meta-model de nes for a contract the source implementing it as an aggregated
element (operation or interface) and models explicitly the contract satisfaction results.
But this formalism does not describe how the order in which services are called by
and from a component can be veri ed, order that can be seen similar to our state
machines from components. Furthermore, it does not provide a connection to high-level
modeling languages as UML/SysML.
      </p>
      <p>
        Contracts modeled as pre/post conditions are used in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] for the veri cation of
model transformation: the assumption is represented by an OCL constraint on the
source model and the guarantee is an OCL constraint on the target model. Moreover,
with respect to the syntax of contracts the two approaches are di erent: while the
one we describe considers contracts only for components, [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] models contracts for all
model elements. The same contracts are used in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] to model the execution semantics
of UML elements which is seen as a particular case of model transformation.
      </p>
      <p>To the best of our knowledge, this study is the rst to consider behavioral
contracts at the component level in UML/SysML and to provide veri cation relations
for property satisfaction by contract-based reasoning. The meta-model we propose is
generic enough to represent all the other meta-models previously described,
excepting the veri cation results extension that is based on the dynamical execution of the
model.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>
        Based on a theory of contracts and on a methodological approach for reasoning
with contracts introduced in previous work [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], we have proposed an extension of
UML/SysML allowing to model contracts and use them for compositional veri cation
of requirements. The extension is de ned as a meta-model, enriched with constraints
and well-formedness rules to make contracts veri able. We have instantiated the
extension within the OMEGA UML/SysML pro le to make it usable with standard
model editors. The veri cation method is supported by the OMEGA-IFx toolset and
the approach was validated on an industrial-grade system model.
      </p>
      <p>Although an automatic model transformation from OMEGA system models to
the input language of the IFx Toolset is already available, some of the steps for
generating the intermediate contract-based veri cation models remain manual.
Future work consists in automating all the intermediate model generation steps and in
adding functionality for managing the proof obligations and results and for enforcing
the rigorous veri cation methodology described in x2.3.</p>
      <p>The method described before does not explicitly prescribe how to derive contracts
for the whole system and for its components. In the case study described in x4,
this task was relatively straightforward: since we make no additional assumption (A)
about the environment, G is roughly the same as ', and the component guarantees are
a projection of the desired global guarantee. There may be cases where the de nition
of contracts is less obvious and the overhead is signi cant, and previous attempts to
introduce contracts in programming have not enjoyed a widespread success due to
this kind of overhead. Nevertheless, we believe that the case for contracts in early
phases of system engineering is di erent than the case for software programming, and
the overhead should be acceptable for certain critical systems. Further work is needed
in order to lower the overhead by nding methods or methodological guidelines for
deriving intermediate contracts from the properties one is trying to prove.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          and
          <string-name>
            <given-names>D. L.</given-names>
            <surname>Dill</surname>
          </string-name>
          .
          <article-title>A theory of timed automata</article-title>
          .
          <source>Theoretical computer science</source>
          ,
          <volume>126</volume>
          (
          <issue>2</issue>
          ):
          <volume>183</volume>
          {
          <fpage>235</fpage>
          ,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>P.</given-names>
            <surname>Andre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gilles</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Messabihi</surname>
          </string-name>
          .
          <article-title>Veri cation de contrats logiciels a l'aide de transformations de modeles. In 7emes journees sur l'Ingenierie Dirigee par les Modeles (IDM)</article-title>
          <year>2011</year>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Beugnard</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.-M. Jezequel</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Plouzeau</surname>
            , and
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Watkins</surname>
          </string-name>
          .
          <source>Making Components Contract Aware. Computer</source>
          ,
          <volume>32</volume>
          (
          <issue>7</issue>
          ):
          <volume>38</volume>
          {
          <fpage>45</fpage>
          ,
          <year>July 1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>Bornot</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Sifakis</surname>
          </string-name>
          .
          <article-title>An algebraic framework for urgency</article-title>
          .
          <source>Information and Computation</source>
          ,
          <volume>163</volume>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bozga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Graf</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Ober</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Ober</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Sifakis</surname>
          </string-name>
          .
          <article-title>The IF Toolset</article-title>
          .
          <article-title>In Formal Methods for the Design of Real-Time Systems</article-title>
          , volume
          <volume>3185</volume>
          <source>of LNCS</source>
          , pages
          <volume>237</volume>
          {
          <fpage>267</fpage>
          . Springer,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>E.</given-names>
            <surname>Cariou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Ballagny</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Feugas</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Barbier</surname>
          </string-name>
          .
          <article-title>Contracts for model execution veri cation</article-title>
          .
          <source>In 7th European conference on Modelling foundations and applications (ECMFA)</source>
          <year>2011</year>
          , pages
          <fpage>3</fpage>
          <lpage>{</lpage>
          18. Springer,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>E.</given-names>
            <surname>Cariou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Belloir</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Barbier</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Djemam</surname>
          </string-name>
          .
          <article-title>OCL contracts for the veri cation of model transformations</article-title>
          .
          <source>ECEASST</source>
          ,
          <volume>24</volume>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>E.</given-names>
            <surname>Conquet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.-X.</given-names>
            <surname>Dormoy</surname>
          </string-name>
          , I. Dragomir,
          <string-name>
            <given-names>S.</given-names>
            <surname>Graf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lesens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Nienaltowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and I.</given-names>
            <surname>Ober</surname>
          </string-name>
          .
          <article-title>Formal Model Driven Engineering for Space Onboard Software</article-title>
          .
          <source>In 6th International Symposium on Embedded Real Time Software and Systems (ERTS2</source>
          )
          <year>2012</year>
          . Online website,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>I.</given-names>
            <surname>Dragomir</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Ober</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Lesens</surname>
          </string-name>
          .
          <article-title>A case study in formal system engineering with SysML</article-title>
          .
          <source>In 17th IEEE International Conference on Engineering of Complex Computer Systems (ICECCS)</source>
          <year>2012</year>
          , pages
          <fpage>189</fpage>
          {
          <fpage>198</fpage>
          . IEEE Computer Society,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>I.</given-names>
            <surname>Dragomir</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Ober</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Percebois</surname>
          </string-name>
          .
          <article-title>Integrating veri able Assume/Guarantee contracts in UML/SysML</article-title>
          .
          <source>Technical report</source>
          , IRIT, july
          <year>2013</year>
          . Available at http://www.irit.fr/~Iulian.Ober/docs/TR-Syntax.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>I.</given-names>
            <surname>Dragomir</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Ober</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Percebois</surname>
          </string-name>
          .
          <article-title>Safety Contracts for Timed Reactive Components in SysML</article-title>
          .
          <source>Technical report</source>
          , IRIT, june
          <year>2013</year>
          .
          <article-title>Submitted for publication</article-title>
          . Available at http://www.irit.fr/~Iulian.Ober/docs/TR-Contracts.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>C. A. R.</given-names>
            <surname>Hoare</surname>
          </string-name>
          .
          <article-title>An Axiomatic Basis for Computer Programming</article-title>
          .
          <source>Commun. ACM</source>
          ,
          <volume>12</volume>
          (
          <issue>10</issue>
          ):
          <volume>576</volume>
          {
          <fpage>580</fpage>
          ,
          <year>1969</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>D. K.</given-names>
            <surname>Kaynar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Lynch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Segala</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Vaandrager</surname>
          </string-name>
          .
          <source>The Theory of Timed I/O</source>
          <string-name>
            <surname>Automata - Second Edition</surname>
          </string-name>
          . Morgan &amp; Claypool Publishers,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>RTCA</given-names>
            <surname>Inc</surname>
          </string-name>
          .
          <article-title>Software Considerations in Airborne Systems and Equipment Certi cation</article-title>
          .
          <source>Document RTCA/DO-178C</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>M.</given-names>
            <surname>Messabihi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Andre</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Attiogbe</surname>
          </string-name>
          .
          <article-title>Multilevel Contracts for Trusted Components</article-title>
          .
          <source>In International Workshop on Component and Service Interoperability</source>
          , volume
          <volume>37</volume>
          <source>of EPTCS</source>
          , pages
          <volume>71</volume>
          {
          <fpage>85</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>B.</given-names>
            <surname>Meyer</surname>
          </string-name>
          .
          <article-title>Applying Design by Contract</article-title>
          .
          <source>Computer</source>
          ,
          <volume>25</volume>
          (
          <issue>10</issue>
          ):
          <volume>40</volume>
          {
          <fpage>51</fpage>
          ,
          <string-name>
            <surname>Oct</surname>
          </string-name>
          .
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>I.</given-names>
            <surname>Ober</surname>
          </string-name>
          and
          <string-name>
            <surname>I. Dragomir.</surname>
          </string-name>
          <article-title>OMEGA2: A New Version of the Pro le and the Tools</article-title>
          .
          <source>In 15th IEEE International Conference on Engineering of Complex Computer Systems (ICECCS)</source>
          <year>2010</year>
          , pages
          <fpage>373</fpage>
          {
          <fpage>378</fpage>
          . IEEE Computer Society,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18] Object Management Group.
          <source>Systems Modelling Language (SysML) v1.1</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19] Object Management Group.
          <source>Uni ed Modelling Language (UML) v2.2</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20] Object Management Group.
          <source>Object Constraint Language (OCL) v2.2</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>S.</given-names>
            <surname>Quinton</surname>
          </string-name>
          .
          <article-title>Design, veri cation et implementation de systemes a composants</article-title>
          .
          <source>PhD thesis</source>
          , Universite de Grenoble,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>S.</given-names>
            <surname>Quinton</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Graf</surname>
          </string-name>
          .
          <article-title>Contract-based veri cation of hierarchical systems of components</article-title>
          .
          <source>In Sixth IEEE International Conference on Software Engineering and Formal Methods (SEFM)</source>
          <year>2008</year>
          , pages
          <fpage>377</fpage>
          {
          <fpage>381</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>T.</given-names>
            <surname>Weis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Becker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Geihs</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Plouzeau</surname>
          </string-name>
          .
          <article-title>A UML Meta-model for Contract Aware Components</article-title>
          .
          <source>In 4th International Conference on The Uni ed Modeling Language, Modeling Languages, Concepts</source>
          , and
          <string-name>
            <surname>Tools</surname>
          </string-name>
          (UML)
          <year>2001</year>
          , pages
          <fpage>442</fpage>
          {
          <fpage>456</fpage>
          . Springer,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>