<!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>Umple: An Open-Source Tool for Easy-To-Use Modeling, Analysis, and Code Generation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Timothy C. Lethbridge</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Electrical Engineering and Computer Science University of Ottawa, Canada K1N 6N5</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>We demonstrate the Umple technology, which allows software developers to blend abstract models, including class-, state- and composite structure diagrams textually into their Java, C++ or PhP code. Umple is targeted at developers who prefer textual programming but also want additional abstractions in order to simplify their software and improve its quality. Umple development has involved over 60 people, mostly at Canadian and US universities, and is used to develop itself. Several systems have been umplified - converted into Umple - thus raising their abstraction and reducing code volume. The accompanying video can be found at http://youtu.be/xD-zTpB_zyQ .</p>
      </abstract>
      <kwd-group>
        <kwd>Code generation</kwd>
        <kwd>Textual Modeling</kwd>
        <kwd>Umple</kwd>
        <kwd>UML</kwd>
        <kwd>State Machines</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Umple is a multi-faceted technology allowing users to integrate modeling into
software development straightforwardly. It supports modeling using class diagrams, state
machines and composite structure diagrams, and provides a textual syntax for these
that can be blended into any C-family language such as Java or C++. The resulting
system can consist completely of modeling abstractions, completely of base
programming language code, or a blend of either. The Umple textual form is the ‘master’
code for the system. Umple therefore renders the distinction between model and code
somewhat moot.</p>
      <p>
        Umple can display and update model diagrams as text is edited, and allows
changes to diagrams to automatically change the Umple text. This is accomplished in
nearreal-time using UmpleOnline [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The developer can hence work productively,
whether they prefer text or diagrams.
      </p>
      <p>
        Umple supports a rich feature set, all documented with examples in its user manual
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], and all generating fully-operational code in Java and C++. Features include:
• UML associations with capabilities such as referential integrity, sorting, and
enforcement of multiplicity constraints [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
• State machines with unlimited nesting, concurrent activities, and a choice of
implementation semantics such as having a separate thread for queuing events [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
• Traits to support inclusion of model or code fragments in different contexts, or to
overcome lack of multiple inheritance.
• Active objects and ports for communicating among concurrent objects (including
support of parts of Autosar [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]).
• Constraints for invariants, state transition guards, method preconditions and ports.
• Built-in patterns such as singleton and immutable, with idioms for other patterns
such as delegation.
• Aspect-oriented code injection to allow tailoring of the generated code.
• Templates to allow construction of string output for language generation.
• Trace-directives to allow dynamic analysis at the model level [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
Umple supports mixins to allow the system to be structured in several ways. These
include separating model abstractions from methods of classes, or dividing up the
system in a feature-oriented manner. With mixins, multiple definitions of a given
model element (e.g. a class) found separately in the Umple source files, are merged.
      </p>
      <p>Umple can generate C++. Java, PhP, Ruby, SQL, metrics, documentation and
various model-interchange formats such as ECore XMI, USE , TextUML and YUML.
Particular focus is being placed on its ability to generate real-time systems.</p>
      <p>Umple is under active development. Upcoming features include formal method
generation, incorporation of Use Cases, requirements , and product-line capabilities.
Umple has been designed to be extensible; new code generators and modeling
concepts can be added easily – a process that has been going on for the last 7 years.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Envisioned Users</title>
      <p>Umple is intended for general-purpose development, so anybody currently developing
in one of Umple’s primary supported languages can use it to enhance productivity.
Anyone who wants to model using UML class diagrams, state diagrams or composite
structure diagrams can also use it purely for that purpose, even if they don’t intend to
generate code. However, Umple is particularly targeted at the following groups:
• Open source developers and small in-house developers: For these communities,
code is king. They may use a little UML on whiteboards, but they don’t generate
code due to awkward or expensive tools, or poor quality of the code generated by
many tools.
• University professors and students: Umple is designed to be as easy to use as
possible to facilitate teaching and learning, as discussed in the next section.
• Developers who want the flexibility and the minimum of dependency: There
are several ways of structuring an Umple system, and it can be managed with many
tools: Umple supports command-line, Eclipse-based and web-based development.
Umple generated code doesn’t require linking with third-party libraries. Although
Eclipse’s EMF is powerful, we avoided it to preclude dependency on Eclipse.
• Developers who want generated code that is readable (and inspectable), but
need to avoid modifying it: In Umple, any needed user code can be injected into
the master Umple files; nonetheless, generated code can be easily read as described
in Section 3.2.
• Real-time developers: There are several UML profiles such as Marte and Autosar
for real-time use, but these are hard to master. Umple’s C++ code generation
(supporting various platforms) and syntax for active objects, ports and composite
structure are designed to simplify basic real-time system generation.</p>
      <p>
        Other open source modeling tools are available. ArgoUML [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] was once a contender
but has never had full-fledged code generation, and its development has trickled to a
very slow pace. Papyrus [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] is an actively-developed open-source modeling suite
(According to Ohloh –Black Duck Open Hub [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] its velocity and size is about twice
that of Umple), but it is tied tightly to the Eclipse ecosystem, and is more complex
than what we desire for our targeted users.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>The MDE and modeling challenges that Umple addresses</title>
      <p>
        The key challenge Umple addresses is to make modeling simple and adoptable, and
hence accessible to most developers. Recent papers have commented on the lack of
use of modeling in practice [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], and the obstacles to adoption of modeling [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
Umple specifically targets these obstacles as described in the following subsections:
3.1
      </p>
      <sec id="sec-3-1">
        <title>Textual modeling that blends into code and avoids round-tripping</title>
        <p>Although many aspects of a system can be better understood using a diagram, textual
formats have advantages: They allow rapid input and editing, they allow easier
version-difference analysis, and the majority of targeted users are most comfortable with
textual forms. We have therefore sought ways to make all modeling constructs
textual, and to ensure they are syntactically compatible with our target programming
languages. Umple is not the only textual modeling tool, but it is the only tool to allow
transparent blending of models with multiple programming languages.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>High quality code generation</title>
        <p>
          Most tools we have studied either do not generate code at all, or else do it in a
halfhearted way. It is common that UML associations only generate stub methods [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
        </p>
        <p>Much Umple research has focused on ensuring generated code code is of top
quality and can be used for real systems out of the box. All aspects of Umple-generated
code work synergistically with other aspects, and with hand-written code.</p>
        <p>Although it is Umple philosophy to never edit generated code, Umple generates
readable code. Comments in Umple source pass through to generated code, and
traceability links are injected; this enables certification and raises confidence in code
correctness. There are thousands of test cases verifying all aspects of the code generation.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>A highly-usable user interface</title>
        <p>
          In a recent paper, we explained how for the education community, Umple’s design
was guided by the need to achieve usability, incrementality in learning how to model,
and various other traits [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]. UmpleOnline instantly starts on the web, and generates
code with one click, and diagrams with zero clicks. Umple’s command-line tool
works just like any other compiler that people have been familiar with for decades,
and Umple’s Eclipse plugin works just like any other language plugin for Eclipse.
4
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Methodology for using Umple</title>
      <p>Umple gives the user the freedom to choose their methodology. Virtually any existing
approach is possible.</p>
      <p>Umple can be used in any of the following modes, or in a hybrid of these:
Model-first: The developer can start by creating the model (either graphically or
textually). Developers can then inject any necessary additional program code, such as
main programs or methods for algorithms, directly into the Umple text. It is possible
in Umple to specify alternative versions of code in different languages. One model
can hence be used to create a C++ and a java version of the same system.</p>
      <p>
        Code-first: An existing system written in a pure programming language such as
Java or C++ can be ‘umplified’ [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. This can be done incrementally in a series of
refactorings, gradually adding Umple syntactic constructs to replace existing code.
We have so far performed this on systems such as JHotDraw [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] and Weka [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ].
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Research and Development of Umple</title>
      <p>Umple has been under development since 2007, and has been the subject of several
theses and many published papers that are referenced throughout this paper.</p>
      <p>
        The effectiveness of Umple has been evaluated in several contexts. For example in
an experiment [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], Badreddin et al. show that developers can model with Umple’s
textual form just as readily as they can use the standard UML diagram form for the
same model. We plan to conduct more such experiments soon.
      </p>
      <p>
        One of the key tests of Umple is that it is developed in itself. The Umple compiler
code is written in over 120 Umple files, describing over 460 classes. The project is
managed using model-driven and test-driven development, as well as continuous
integration. The status of the build server [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], and the most recent test run can be found
online [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
      </p>
      <p>Development velocity has been increasing over the years. Most contributions have
been by professors and students at ten Canadian and three US universities.</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>Umple is an open-source modeling suite designed to make modeling practical and
accessible to a wide variety of software developers and application types.</p>
      <p>
        The accompanying video (http://youtu.be/xD-zTpB_zyQ [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]) gives a walkthrough
of the use of UmpleOnline for editing models, generating code and analyzing models.
It also gives a quick look at the extensive user manual [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and the architectural
diagram generated by Umple of Umple itself [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. At the Models conference the
demonstration will expand on many of these aspects.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>1. UmpleOnline, http://try.umple.org</mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <article-title>Umple user manual</article-title>
          , http://manual.umple.org
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Badreddin</surname>
            ,
            <given-names>O</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Forward</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lethbridge</surname>
            ,
            <given-names>T.C.</given-names>
          </string-name>
          (
          <year>2013</year>
          ), “
          <article-title>Improving Code Generation for Associations: Enforcing Multiplicity Constraints and Ensuring Referential Integrity”</article-title>
          ,
          <source>SERA 2013</source>
          , Springer SCI 496, pp.
          <fpage>129</fpage>
          -
          <lpage>149</lpage>
          , DOI: 10.1007/978-3-
          <fpage>319</fpage>
          -00948-
          <issue>3</issue>
          _
          <fpage>9</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Badreddin</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lethbridge</surname>
            ,
            <given-names>T.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Forward</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Elasaar</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Aljamaan</surname>
            ,
            <given-names>H</given-names>
          </string-name>
          , Garzon,
          <string-name>
            <surname>M.</surname>
          </string-name>
          (
          <year>2014</year>
          ), “
          <article-title>Enhanced Code Generation from UML Composite State Machines”</article-title>
          ,
          <source>MODELSWARD</source>
          <year>2014</year>
          , Portugal
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>5. Autosar, http://www.autosar.org</mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Aljamaan</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lethbridge</surname>
            ,
            <given-names>T.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Badreddin</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guest</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Forward</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2014</year>
          ), “
          <article-title>Specifying Trace Directives for UML Attributes and State Machines”</article-title>
          ,
          <source>Modelsward 2014</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>7. ArgoUML, http://argouml.tigris.org</mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>8. Papyrus, http://www.eclipse.org/papyrus/</mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>9. The Umple Open Source Project on Black Duck Open Hub, http://www.openhub.net/p/Umple</mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. M. Petre, “UML in Practice”,
          <source>ICSE</source>
          <year>2013</year>
          , pp
          <fpage>722</fpage>
          -
          <lpage>731</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Forward</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Badreddin</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lethbridge</surname>
            <given-names>T.C.</given-names>
          </string-name>
          (
          <year>2010</year>
          ), “
          <article-title>Perceptions of Software Modeling: A Survey of Software Practitioners”</article-title>
          ,
          <source>5th C2M:EEMDD Workshop</source>
          , Paris,
          <year>June 2010</year>
          , http://www.esi.es/modelplex/c2m/papers.php.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Forward</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2010</year>
          ):
          <article-title>The Convergence of Modeling and Programming: Facilitating the Representation of Attributes and Associations in the Umple Model-Oriented Programming Language</article-title>
          ,
          <source>PhD Thesis</source>
          , UOttawa, http://www.site.uottawa.ca/~tcl/gradtheses/aforwardphd/
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Lethbridge</surname>
            ,
            <given-names>T.C.</given-names>
          </string-name>
          (
          <year>2014</year>
          ),
          <article-title>“Teaching Modeling Using Umple: Principles for the Development of an Effective Tool”</article-title>
          , CSEE&amp;T
          <year>2014</year>
          ,
          <article-title>IEEE Computer Society</article-title>
          , Austria, pp
          <fpage>23</fpage>
          -
          <lpage>28</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Lethbridge</surname>
            ,
            <given-names>T.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Forward</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Badreddin</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          (
          <year>2010</year>
          ), “Umplification:
          <article-title>Refactoring to Incrementally Add Abstraction to a Program”</article-title>
          , Working Conference on Reverse Engineering, Boston,
          <year>October 2010</year>
          , pp.
          <fpage>220</fpage>
          -
          <lpage>224</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>15. JHotDraw, http://sourceforge.net/projects/jhotdraw/</mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Weka</surname>
          </string-name>
          , http, //sourceforge.net/projects/weka/
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Badreddin</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Forward</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lethbridge</surname>
          </string-name>
          , T. “
          <article-title>Model Oriented Programming: An Empirical Study of Comprehension”</article-title>
          , Cascon,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>18. Umple Continuous Integration Server, http://cc.umple.org</mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Umple Quality Assurance Report</surname>
          </string-name>
          , http://qa.umple.org
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20. YouTube, Umple Demo - Summer
          <year>2014</year>
          , http://youtu.be/xD-zTpB_zyQ
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>21. Umple Metamodel, http://metamodel.umple.org</mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>