<!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>UML-VT: A Formal Verification Environment for UML Activity Diagrams</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Zamira Daw, John Mangino, and Rance Cleaveland Department of Computer Science, University of Maryland</institution>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>-This paper introduces a translation tool that supports formal verification of UML activity diagrams using the model checkers: UPPAAL, SPIN, NuSMV and PES. The motivation for this tool arises from the desire to check the properties of a system early in the development process, and the fact that UML is commonly used to describe software models. The tool is implemented as an Eclipse-plugin that automatically translates the UML activities and logical requirements into valid input notation for the model checkers. The automated aspect of the plugin allows users without a background in formal methods to verify the safety and liveness of a system. The translation strategies implemented in this plugin are the result of an experimental study. A tutorial video can be found in https://www.youtube.com/watch?v=AHsih8REUxM.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        A major concern in system development is the correctness
of software components. The benefit of formal methods is that
they verify the systems correctness against specific
requirements for all possible inputs. In contrast to testing, formal
methods allow not only the verification of the presence of an
error in a system, but also the verification of the absence of
errors. Automated formal verification such as model
checking [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] has been improved in the last decades, allowing the
verification of more complex software systems. However, the
usage of model checking is limited by the required knowledge
of formal methods, as well as by the state explosion problem,
which restricts the size of systems that are verifiable.
      </p>
      <p>
        Model-driven development (MDD) has been used in
software development in order to handle the development of
complex systems. In MDD approaches, designers first build
models of the desired software, which can be manually or
automatically (code generation) transformed into
development artifacts (e.g. source code). The models abstract
elements/behaviors of the systems, thereby reducing the
complexity of the development and facilitating the understanding
of the system. Unified Modeling Language (UML) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] has
attracted substantial attention as a language for MDD.
Moreover, UML is a non-proprietary, independently maintained
standard, which provides several graphical sublanguages and
an extension mechanism (profiling). A UML activity diagram
is a behavioral diagram that is generally used to specify the
workflow of a system. The presented tool uses UML activity
diagrams in order to specify the behavior of the system.
      </p>
      <p>The UML Verification Tool (UML-VT) is meant to support
the integration of model checking into a MDD process. The
purpose of this integration is to provide formal verification in
the early phases of development regardless of ones knowledge
of formal methods. Furthermore, the integration leverages the
higher abstraction of the UML models in order to reduce the
state explosion problem, thereby allowing the verification of
more complex systems.</p>
      <p>
        The UML-VT transforms UML activities into the input
notation for the model checkers: UPPAAL, SPIN, NuSMV
and PES. The used transformation strategies have been chosen
based on the results of an experimental study conducted
by the authors [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. This paper presents the capabilities and
functionality of the UML-VT as well as references for
theoretical and technical work, on which this tool is based. The
plugin and source code of the UML-VT can be found at
http://www.cs.umd.edu/ rance/projects/uml-vt/
      </p>
    </sec>
    <sec id="sec-2">
      <title>II. FUNCTIONALITY</title>
      <p>
        The UML-VT is an open-source Eclipse plug-in that
verifies UML activities against given requirements using
wellknow model checker tools such UPPAAL [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], SPIN [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and
NuSMV [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], and an experimental model checker PES [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
The inputs of the verification are the UML models and the
requirements. The format of the UML models is *.uml, which
can be exported from the majority of UML-Tools such as
Papyrus1 or MagicDraw2. Requirements have to be specified
as a temporal logic formula, which can be created using a
Requirement Editor provided by the UML-VT. The output
of the verification is a report that shows the satisfiability of
the given requirement and counter examples that violate the
requirement (depending of the chosen model checker).
      </p>
      <p>The UML-VT also provides an Eclipse Perspective shown
in Figure 1 in order to facilitate the verification workflow. The
Perspective can be open by the following menu chain: Window
! Open Perspective ! Other ! UML-VT. The perspective
contains four views and one menu. View 1 shows the Project
Explorer, View 2 is reserved for the chosen modeling tool,
View 3 shows the Console which will update the user on
the current state of the verification process, and View 4
displays the report file, which contains the results of the model
checker. The UML-VT Menu allows the user to start the
verification (Verify), to set the paths of the model checkers
executable file (Configuration), and to set a default model
1https://eclipse.org/papyrus/
2http://www.nomagic.com/products/magicdraw.html
checker (Model checkers). This menu is only displayed if the
UML-VT Perspective is active.</p>
    </sec>
    <sec id="sec-3">
      <title>The verification workflow is shown in Figure 2.</title>
      <p>
        Create project: A new project can be created using File !
New ! Project ! UML-VT ! Project. The created project
contains by default a Papyrus model, DMOSES Profile [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ],
and the Requirement file. The DMOSES Profile is explained
in the modeling section.
      </p>
      <p>
        Modeling: The user can model the system within the
Papyrus model or using his/her preferred UML-Tool. However,
note that the verification requires the file *.uml. If MagicDraw
is used as modeling tool, this file can be obtained by File !
Export To ! Eclipse UML2. The DMOSES profile is a UML
profile that extends UML activity diagrams and state machine
diagrams in order to add information regarding execution time,
parallelism and priority [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. This profile gives an unambiguous
behavior specification, which is required for the formal
verification. An example of an extended UML activity is shown
in Figure 3.
      </p>
      <p>Requirements specification: The user can specify the
requirements with in the file Requirements.tl using the
Requirement Editor. The editor aims to facilitate the specification
of temporal logic formulas by highlighting keywords and
checking syntax. LTL and CTL formulas are supported. The
editor syntax is model checker independent. An example
requirement for the activity in Figure 3 can be ”In all execution
paths, the ActionB should be executed at least one time”. The
temporal logic formula corresponding to the requirement is:</p>
      <sec id="sec-3-1">
        <title>AF Activity2 :: ActionB</title>
      </sec>
      <sec id="sec-3-2">
        <title>AF Activity1 :: Action2 :: ActionB</title>
        <p>(1)
(2)</p>
        <p>Note that equation 1 verifies the ActionB if the main
activity would be Activity2 and equation 1 verifies the same action
but if the main activity would be Activity1. Requirement
Editor provides code completions, which suggests a list of
possible names of actions.</p>
        <p>
          Generation of model-checker specific properties: Once the
Requirements.tl file is saved, model-checker specific formulas
are generated in the scr-gen folder according to the chosen
model checker. Formulas that are not supported by the given
model checker (e.g. UPPAAL only allows only a subset of
CTL [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]) are not transformed into model-checker specific
formulas and are shown in the console.
        </p>
        <p>Translation from UML-models into model-checker
languages: The translation is started by clicking the Verify button
in the UML-VT Menu. Depending on the chosen model
checker a different translation is executed. The translations
support hierarchical modeling and also apply optimization
techniques. The generated files are saved in the scr-gen folder.
These files are the input for the model checkers.</p>
        <p>Model checking execution: After a successful translation,
a window pops up with a list of all possible main activities
as shown in Figure 4. Thus, the user can select the main
activity of the system, afterwards the chosen model checker
is automatically invoked. There is a timeout that limits the
verification time.</p>
        <p>Display of verification results: The results of the
verification are saved in the report.txt file and are displayed after
the model checker has finished. Current efforts address a
model checker independent report in order to facilitate the
understanding of the results. Figure 5 shows the verification
result of the example in Figure 3 and the requirement of
formula 2. Note that the property is not satisfied, which implies
that the action is not executed. This is because the event
e1 is sent only after it is received. Since there are no other
activities that send this event, actions within Figure 3 are never
executed. Errors such as this one are not easy to find in a model
with multiple activities and multiple hierarchical levels. This
example shows how the correctness of the model can be easily
verified using the UML-VT.</p>
        <p>The UML-VT Eclipse-plugin can be divided into four
main components: Model Transformation, Code Generation,
a Requirement Editor, and a User Interface as is shown in
Figure 6. The User Interface aims to facilitate the interaction
with the user by providing a Perspective, Menus, Project
Wizards, Plugin-Installation, Verification Management, etc.
This component is primary based on the Rich Client Platform
(RCP) provided by Eclipse.</p>
        <p>
          Due to space limitation, technical details of the translations
can be found in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. The transformation of UML models into
model-checker input notation is implemented in two modules:
Model Transformation and Code Generation. The interaction
between these parts is shown in Figure 7. Note that an
intermediate graph is used. Thus, UML models are transformed into
graphs by the Model Transformation module, and afterwards,
graphs are transformed into model-checker input notation
by the Code Generation module. The intermediate graph
is used in order to facilitate the transformation of multiple
diagrams, the generation of multiple model-checker languages,
and the implementation of optimization algorithms. The Model
Transformation module consists of three components: Model
to Model Transformation, which transforms UML models into
graphs, Hierarchy Management, which flattens multiple
hierarchical levels (e.g. modeled by using CallBehaviorActions),
and Optimization, which reduces the number of vertices of the
graph by merging sequential vertices and normalizes execution
times. These transformations are implemented using an eclipse
plug-in called ATL (ATLAS Transformation Language)3.
        </p>
        <p>
          The Code Generation module is based on templates that
specify the behavior of the different elements of the UML
activities using the model-checker languages. For example,
for UPPAAL, the template UPPAAL Tp specifies the
tokenbased behavior of the UML activities using Timed Automata.
Note that the templates encompass sophisticated understanding
formal-methods. Since there are multiple ways to specify
this behavior using model-checker languages, the authors
conducted an experimental study to analyze the influence
of different translations strategies on the verification
performance [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. The templates that are used correspond to the best
translation strategies for each model-checker in relation to the
results of the study. Code Generation module uses the plug-in
Xpand4. The multiple intermediate steps between the UML
models and the model-checker input notation are transparent
for the user, who only sees the generated files for the model
checkers.
        </p>
        <p>
          The correctness and scalability of the transformations,
optimizations and code generation have been tested using a
benchmark composed of a set of 67 UML activity diagrams and a
model of a medical device case study, an infusion pump [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
The UPPAAL translation achieves the best performance in the
verification of UML activities, in particular for big models,
since the variable management of this model checker in the
creation of the state space of the system.
        </p>
        <p>The plug-in Xtext5 is used in the component Requirement
Editor. The component specifies the domain-specific language
of the temporal logic formulas, and implements the editor and
the generation of the model-checker specific formula files.
3https://eclipse.org/atl/
4http://wiki.eclipse.org/Xpand
5https://eclipse.org/Xtext/</p>
        <p>IV. RELATED WORK</p>
        <p>
          To the best of our knowledge, there is an apparent lack of
tools aimed at formal verification of UML activities. Although
there are different approaches that propose the verification of
UML activities using model checking, summarized in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], the
majority of these approaches do not provide a public tool
(or it could not be found). Similar to the presented tool,
these approaches use translational strategies to generate
modelchecker languages. In general, these approaches offer only
the usage of one model checker. In contrast, the UML-VT
supports four model checkers, and provides an open-source
Eclipse plugin.
        </p>
        <p>
          MADES project propose a tool chain [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] to verify UML
Model of embedded systems. MADES uses its own model
checker. In [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], dos Santos also presents a formal verification
tool for UML behavioral diagrams using NuSMV. Similar
to our approach, these tools presents translations from UML
model into the model-checker input notation. In contrast to
UML-VT, these tools force the user to use only one model
checker. Furthermore, the translations provided by the
UMLVT are based on an experimental study providing a higher
confiability. It is worth mentioning that these tools where not
available to download, and therefore the description is based
only on academic publications.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>V. DISCUSSION</title>
      <p>The usage of UML models as an input notation of the
verification has three main advantages. 1) It is easier to integrate
the verification in the MDD process because these models are
also used during the development process. 2) The abstraction
of the UML models mitigates the state-explosion problem
of the model-checking algorithm. Furthermore, the DMOSES
profile adds additional information about the implementation
(e.g. execution time) that allows verifying the system taking
into account implementation features. The DMOSES profiles
also contributes to the reduction of the state-space since this
UML extension provides a deterministic behavior and reduces
the behavior concurrency by giving a limited processing units.
These aspects allow the application of model checking without
any further optimization methods (e.g. CEGAR). 3) Since
UML models are model-checker independent, model-checker
specific translations can be implemented, which facilitate the
choice of the model checker. Although the choice of a model
checker should primarily depend on its ability to address the
system domain or the properties to verify, in practice, the
model checker is chosen based on the previous experience
of the formal method experts. Thus, the support of multiple
model checkers by the UML-VT allows users to use the most
adequate model checker for the application area (e.g. UPPAAL
for real-time systems or SPIN for distributed systems).</p>
    </sec>
    <sec id="sec-5">
      <title>VI. CONCLUSION AND FUTURE WORKS</title>
      <p>The UML-VT enables formal verification of UML activities
using model checkers. The tool is implemented in Eclipse,
which is already known as a modeling and MDD environment.
In order to facilitate the integration to any MDD process, the
tool allows the verification of models with an EMF input
format, which can be exported from the majority of
UMLTools. The UML-VT supports the verification using the model
checkers UPPAAL, SPIN, NuSMV, and PES. The support of
multiple model checkers allows the user to choose the most
appropriate model checker with respect to the target platform.
Generation of model-checker input notation is based on
modelto-model transformations, which optimize the space state of
the system, and on templates, which encompass the knowledge
of a model-checking expert. These templates are also tied to
our interpretation of the UML models, which is based on
the DMOSES profile. This limitation can be overcome by
extending the transformations in order to support other UML
profiles or other diagrams.</p>
      <p>
        In our ongoing work, we address this limitation in a more
general way by allowing the user to specify its own formal
semantics by using an extensible formal semantics [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. The
extensible semantics provides a reference semantics that can be
extended according to the interpretation of the UML models.
A label transition system (LTS) is generated from the input
UML models according to the user-specific semantics. The
LTS formally specifies the behavior of the system. We are
working in a semantics framework tool that allows specifying
the extensible semantics, and provides simulation of the UML
models, consistency verification of the semantics
(bisimulation) and formal verification (translation from LTS into
modelchecker input notation) based on the user-specific semantics.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Baier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-P.</given-names>
            <surname>Katoen</surname>
          </string-name>
          et al.,
          <article-title>Principles of model checking</article-title>
          . MIT press Cambridge,
          <year>2008</year>
          , vol.
          <volume>26202649</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>OMG</given-names>
            ,
            <surname>Unified Modeling</surname>
          </string-name>
          <string-name>
            <surname>Language</surname>
          </string-name>
          ,
          <source>Superstructure, Version 2.4</source>
          .1, http://www.omg.org/spec/UML/2.4.1/Superstructure/PDF,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Daw</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Cleaveland</surname>
          </string-name>
          , “
          <article-title>Comparing model checkers for timed uml activity diagrams</article-title>
          ,”
          <source>Science of Computer Programming</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>G.</given-names>
            <surname>Behrmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>David</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Larsen</surname>
          </string-name>
          , A Tutorial on Uppaal. Springer Berlin Heidelberg,
          <year>2004</year>
          , vol.
          <volume>3185</volume>
          , pp.
          <fpage>200</fpage>
          -
          <lpage>236</lpage>
          . [Online]. Available: http://dx.doi.
          <source>org/10.1007/978-3-540-30080-9 7</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>G. J.</given-names>
            <surname>Holzmann</surname>
          </string-name>
          , “
          <article-title>The model checker spin</article-title>
          ,
          <source>” IEEE Transactions on Software Engineering</source>
          , vol.
          <volume>23</volume>
          , no.
          <issue>5</issue>
          , pp.
          <fpage>279</fpage>
          -
          <lpage>295</lpage>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Cimatti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Clarke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Giunchiglia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Giunchiglia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Pistore</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Roveri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Sebastiani</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Tacchella</surname>
          </string-name>
          ,
          <article-title>NuSMV 2: An OpenSource Tool for Symbolic Model Checking</article-title>
          . Springer Berlin Heidelberg,
          <year>2002</year>
          , vol.
          <volume>2404</volume>
          , pp.
          <fpage>359</fpage>
          -
          <lpage>364</lpage>
          . [Online]. Available: http://dx.doi.
          <source>org/10.1007/3-540-45657-0 29</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>D.</given-names>
            <surname>Zhang</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Cleaveland</surname>
          </string-name>
          , “
          <article-title>Fast on-the-fly parametric real-time model checking,” in Real-Time Systems Symposium</article-title>
          ,
          <year>2005</year>
          .
          <source>RTSS</source>
          <year>2005</year>
          . 26th IEEE International,
          <year>Dec 2005</year>
          , pp.
          <volume>10</volume>
          pp.-
          <volume>166</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Daw</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Vetter</surname>
          </string-name>
          ,
          <source>Deterministic UML Models for Interconnected Activities and State Machines</source>
          . Springer Berlin Heidelberg,
          <year>2009</year>
          , vol.
          <volume>5795</volume>
          , pp.
          <fpage>556</fpage>
          -
          <lpage>570</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Pnueli</surname>
          </string-name>
          , “
          <article-title>The temporal logic of programs,” in Foundations of Computer Science, 18th Annual Symposium on</article-title>
          . IEEE,
          <year>1977</year>
          , pp.
          <fpage>46</fpage>
          -
          <lpage>57</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>A.</given-names>
            <surname>Radjenovic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Matragkas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. F.</given-names>
            <surname>Paige</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rossi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Motta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Baresi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Kolovos</surname>
          </string-name>
          , “
          <article-title>Mades: a tool chain for automated verification of uml models of embedded systems</article-title>
          ,” in
          <source>Modelling Foundations and Applications</source>
          . Springer,
          <year>2012</year>
          , pp.
          <fpage>340</fpage>
          -
          <lpage>351</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>L. B. R. dos Santos</surname>
            ,
            <given-names>E. R.</given-names>
          </string-name>
          <string-name>
            <surname>Eras</surname>
          </string-name>
          , V. A.
          <string-name>
            <surname>de Santiago</surname>
          </string-name>
          <article-title>Ju´nior, and</article-title>
          <string-name>
            <given-names>N. L.</given-names>
            <surname>Vijaykumar</surname>
          </string-name>
          , “
          <article-title>A formal verification tool for uml behavioral diagrams,” in Computational Science</article-title>
          and
          <string-name>
            <surname>Its</surname>
            <given-names>Applications-ICCSA</given-names>
          </string-name>
          <year>2014</year>
          . Springer,
          <year>2014</year>
          , pp.
          <fpage>696</fpage>
          -
          <lpage>711</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Daw</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Cleaveland</surname>
          </string-name>
          , “
          <article-title>An extensible operational semantics for uml activity diagrams,”</article-title>
          <source>in International Conference on Software Engineering and Formal Methods</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>