<!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>Comparison of Textual and Visual Notations of DOMMLite Domain-Specific Language</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Igor Dejanovi´c</string-name>
          <email>igord@uns.ac.rs</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maja Tumbas</string-name>
          <email>majat@uns.ac.rs</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gordana Milosavljevi´c</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Branko Periˇsi´c</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Faculty of Technical Sciences, University of Novi Sad</institution>
          ,
          <country country="RS">Serbia</country>
        </aff>
      </contrib-group>
      <fpage>131</fpage>
      <lpage>136</lpage>
      <abstract>
        <p>This paper presents a comparison of textual and visual syntax notation of Domain-Specific Language (DSL) programs on the example of DOMMLite DSL[3]. Starting from the definition of DOMMLite meta-model, the prototypes of both textual and graphical editors are implemented using tools of the Eclipse Modeling Project1. Initial observations in favor and against both syntax notations are summarized and the impact of the chosen concrete syntax on the team development and version control is analyzed.</p>
      </abstract>
      <kwd-group>
        <kwd>language notations</kwd>
        <kwd>version control</kwd>
        <kwd>MDE</kwd>
        <kwd>DSL</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        languages such as UML Class Diagrams[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], Meta-Object Facility (MOF)[
        <xref ref-type="bibr" rid="ref12">12</xref>
        ],
ECore[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and concepts expressed in Domain-Driven Design[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Textual vs. Visual Syntaxes</title>
      <p>
        Textual notation and textual editor for DOMMLite language has been fully
developed[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] using openArchitectureware framework3. Although both visual
notation and visual editor for DOMMLite language are in the early phase of
development, we will give some initial findings, based on anecdotal evidence, in favor
and against both textual and visual syntaxes and supporting tools.
Arguments for visual notations and editors
– Model structure is easier to comprehend. It is a popular belief that the
graphical notation is better than the textual. However, it has been reported
that in some circumstances graphical notation does not perform better, or
even that it performs worse than textual[
        <xref ref-type="bibr" rid="ref14 ref6">6, 14</xref>
        ]. This is usually reported for
the languages used for modeling of control or data flow and for languages
where “secondary notation”[
        <xref ref-type="bibr" rid="ref14">14</xref>
        ](see section 4) has a major impact on model
understandability. Nevertheless, for declarative DOMMLite language which
is used to express statical properties of the system, based on anecdotal
evidence, we are inclined to think that visual notation perform better at
comprehension of element relationships and the overall model structure.
– Easier model navigation. Using ubiquitous operations pertinent to
modern visual editors (like zooming, panning etc.), every part of a DOMMLite
model can be visited quickly and with a minimum of effort.
– Visual languages are easier to learn. Arguably, this depends on the
experience and background of the modeler and the choice of visual and textual
representations of language concepts. However, we argue that the learning
curve is steeper for visual notations. Presented with the palette of
modeling elements, the modeler can almost immediately start placing them on
the drawing canvas and connecting them and learn by the means of trial
and error. Conversely, with textual syntax, the modeler is presented with an
empty file and it is hard to do anything without learning some elements of
the language first (i.e. keywords, syntax and semantic rules etc.).
Arguments against visual notations and editors
– Hard to develop and maintain. Although building graphical editors is
much easier now with the advent of sophisticated tools like GMP4, DEViL5
Tiger6 and VLDesk7, the amount of work to develop and maintain a
fullfledged graphical editor is still considerable, especially in the environment of
evolving languages.
3 http://www.openarchitectureware.org/
4 http://www.eclipse.org/modeling/gmp/
5 http://devil.cs.upb.de/
6 http://user.cs.tu-berlin.de/~tigerprj/
7 http://www.dmi.unisa.it/people/risi/www/vldesk/index.html
– Serialization format is different from the presentation format. It can
be problematic if the need arises to drill down to the serialized representation,
which still is the case with current version control systems (see section 3).
Arguments for textual notations and editors
– Existing tools can be used as a fall-back option. A plain-text editor
can be used to visualize and edit models based on textual notations.
– Existing text-based version control systems can be used. See section
3.
– Programmers are used to textual syntaxes. Most programmers are
used to textual syntaxes, so it is easier to introduce text-based modeling to
current software development processes and practices.
      </p>
      <p>Arguments against textual notations and editors
– Notation verbosity. Textual notation, despite all precaution, can become
quite verbose. No part of model can be hidden and visualized at the will of
a modeler (with the sole exception of code folding support).
– The structure of the model is harder to comprehend. The modeler
needs to provide substantial effort to build a mental model of relationships
among model elements. In DOMMLite, for example, references to other
entities and inheritance hierarchy are not easy to convey from textual notation.
– Navigation is not as intuitive as is the case with visual editors.
Navigation can be performed by scrolling sequentially through the text, searching
for text patterns, listing and jumping to all usages of certain model element
(i.e. all references) etc. For DOMMLite generated editor, the only overview is
presented in the form of a tree-like code outline which conveys only
languagelevel containment structure.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Impact of the Type of Concrete Syntax on Version</title>
    </sec>
    <sec id="sec-4">
      <title>Control</title>
      <p>
        The issue of paramount importance when it comes to team development is
version control, i.e. identification, preservation, visualization and merging of model
differences. Although there are well established tools and techniques for version
control of plain textual artifacts (i.e. source code)[
        <xref ref-type="bibr" rid="ref16 ref9">16, 9</xref>
        ], the version control in the
field of model-driven engineering with emphasis on model syntax and semantics
is an active field of research[
        <xref ref-type="bibr" rid="ref1 ref10 ref2">1, 2, 10</xref>
        ].
      </p>
      <p>Traditional text-based systems for version control works at file level and
considers content of files as an array of lines of text without trying to utilize
language syntax or semantics. Using these tools for version control of models
can be troublesome. Even if model are serialized in textual XMI format, it is
still unwieldy for a modeler to drop down to the verbose and hardly readable
XMI format when trying to do the merge of concurrent changes.</p>
      <p>
        Modeling tools are rich in visual hierarchy and graphical representation,
which are not found in the linear text files of source code representation[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>Although models can be serialized to textual (e.g. XML) formats, it is hard
to visualize differences and resolve conflicts using this form of representation.</p>
      <p>We argue that a carefully crafted textual notation has a positive side-effect
of the possibility to utilize existing text-based version control systems until the
appropriate model-based tools become available.</p>
      <p>For example, figure 1 shows the three-way compare of concurrent changes
when a model is serialized using XMI format. The same changes, using
DOMMLite textual notation are presented in figure 2. It is evident that verbosity of
XMI syntax decreases readability of the model and makes conflict resolution of
concurrent changes harder in comparison to the DOMMLite textual notation.</p>
    </sec>
    <sec id="sec-5">
      <title>Related Work</title>
      <p>Work related to the topics discussed in this paper includes development of a DSL
with various notations and research on the impact of using different language
notation on performance of the developers and existing tools utilization.</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] DOMMLite language is introduced with it’s textual syntax, text-based
editor and source code generator.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] the author investigates a so called “secondary notation” (lay-outing,
clustering, white-spaces, colors) which is a way that practitioners of visual
languages use the non-formal features and techniques to specify information and
give hints to the reader.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] authors report comparisons between the comprehensibility of textual
and visual programs and paradoxically come to a conclusion that the
comprehensibility of the graphical notation is worse than textual.
      </p>
      <p>
        Visual language and environment for specification of attributed grammars
(AG) is presented in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. The authors conclude that, by using a visual language,
the mental gap between the required text-based AG specification imposed by
several compiler generator tools and the habitual way of sketching AGs in the
form of a decorated tree has been shortened.
      </p>
      <p>
        Difficulties and problems related to text-based version control of models are
presented in [
        <xref ref-type="bibr" rid="ref1 ref8">8, 1</xref>
        ].
      </p>
      <p>
        Native model-based version control approaches are presented in [
        <xref ref-type="bibr" rid="ref1 ref10 ref2">1, 2, 10</xref>
        ]
5
      </p>
    </sec>
    <sec id="sec-6">
      <title>Conclusions and Future Work</title>
      <p>
        There is no definite answer whether textual or graphical syntax is better. There
are papers that support either point of view. It is a popular belief that visual
languages are easier to understand but, for certain language constructs, it has
been empirically proved that comprehensibility can be worse than for textual
languages [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. The graphical notation is also more prone to the “secondary
notation” which is not part of the formal system and thus it is left to developers
to freely create their own style and ways of encoding additional information
and hints. One way to remedy this would be to make elements of “secondary
notation” a part of the formal specification.
      </p>
      <p>We have outlined trade-offs between textual and visual notations on the basis
of our experience in development of the DOMMLite DSL. If development and
maintenance of both syntaxes is not an issue, we suggest using graphical syntax
for model overview, navigation and structural changes (e.g. editing relationships)
and textual syntax for defining non-structural properties of the model (e.g. for
DOMMLite it would be the definition of attribute names and types, constraints
etc.). Also, we find that using textual syntax as the canonical serialization
format enables utilization of existing, industry proven, text-based version control
systems until native model based version control systems mature.</p>
      <p>Further research and development will be focused on platforms and tools
for supporting development, version control and co-evolution of languages and
different concrete syntaxes.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Alanen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Porres</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Version control of software models</article-title>
          .
          <source>Advances in UML and XML-based Software Evolution</source>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Altmanninger</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kappel</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kusel</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Retschitzegger</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schwinger</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seidl</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wimmer</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>AMOR-Towards Adaptable Model Versioning</article-title>
          .
          <source>In: 1st International Workshop on Model Co-Evolution and Consistency Management (MODELS '08)</source>
          (
          <year>September 2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. Dejanovi´c, I., Milosavljevi´c, G., Periˇsi´c,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Tumbas</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.:</surname>
          </string-name>
          <article-title>A domain-specific language for defining static structure of database applications</article-title>
          .
          <source>Computer Science and Information Systems</source>
          <volume>7</volume>
          (
          <issue>3</issue>
          ),
          <fpage>409</fpage>
          -
          <lpage>440</lpage>
          (
          <year>June 2010</year>
          ), http://www.comsis.org/ComSIS/ Vol7No3/RegularPapers/paper2.htm
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Eclipse</given-names>
            <surname>Foundation: Eclipse Modeling Framework - EMF</surname>
          </string-name>
          . Online http:// www.eclipse.org/modeling/emf/, http://www.eclipse.org/modeling/emf/, accessed June,
          <year>2010</year>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Evans</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Domain-Driven</surname>
            <given-names>Design</given-names>
          </string-name>
          :
          <article-title>Tackling Complexity in the Heart of Software</article-title>
          . Addison-Wesley
          <string-name>
            <surname>Professional</surname>
          </string-name>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Green</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Petre</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>When visual programs are harder to read than textual programs</article-title>
          .
          <source>In: Human-Computer Interaction: Tasks and Organisation, Proceedings of ECCE-6 (6th European Conference on Cognitive Ergonomics)</source>
          .
          <source>GC van der Veer</source>
          , MJ Tauber,
          <string-name>
            <given-names>S.</given-names>
            <surname>Bagnarola</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Antavolits</surname>
          </string-name>
          . Rome, CUD. Citeseer (
          <year>1992</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Kelly</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tolvanen</surname>
            ,
            <given-names>J.P.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Domain-Specific</surname>
            <given-names>Modeling</given-names>
          </string-name>
          : Enabling Full Code Generation.
          <source>Wiley-IEEE Computer Society Pr (March</source>
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
          </string-name>
          , J.,
          <string-name>
            <surname>Gray</surname>
          </string-name>
          , J.:
          <article-title>Model comparison: A key challenge for transformation testing and version control in model driven software development</article-title>
          .
          <source>Object Oriented Programing, Systems, Languages and Applications</source>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Mackall</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Towards a better scm: Revlog and mercurial</article-title>
          .
          <source>In: Proceedings of the Linux Symposium</source>
          . vol.
          <volume>2</volume>
          , pp.
          <fpage>83</fpage>
          -
          <lpage>90</lpage>
          . Ottawa, Ontario,
          <source>Canada (July</source>
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Oliveira</surname>
            ,
            <given-names>H.L.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Murta</surname>
            ,
            <given-names>L.G.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Werner</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Odyssey-vcs: a flexible version control system for uml model elements</article-title>
          .
          <source>In: Proceedings of the 12th International Workshop on Software Configuration Management</source>
          ,
          <string-name>
            <surname>SCM</surname>
          </string-name>
          <year>2005</year>
          . pp.
          <fpage>1</fpage>
          -
          <lpage>16</lpage>
          . ACM, Lisbon, Portugal (
          <year>September 2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Oliveira</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pereira</surname>
            ,
            <given-names>M.J.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Henriques</surname>
            ,
            <given-names>P.R.</given-names>
          </string-name>
          , da
          <string-name>
            <surname>Cruz</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cramer</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Visuallisa: A visual environment to develop attribute grammars</article-title>
          .
          <source>ComSIS - Computer Science an Information Systems Journal, Special issue on Advances in Languages, Related Technologies and Applications</source>
          <volume>7</volume>
          (
          <issue>2</issue>
          ),
          <fpage>266</fpage>
          -
          <lpage>289</lpage>
          (
          <year>April 2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>OMG: Meta Object Facility (MOF) Core</surname>
            <given-names>Specification</given-names>
          </string-name>
          ,
          <source>Version</source>
          <volume>2</volume>
          .0 (
          <year>January 2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>OMG: OMG Unified Modeling</surname>
          </string-name>
          <article-title>Language (OMG UML)</article-title>
          ,
          <source>Infrastructure, Version 2.1.2 (November</source>
          <year>2007</year>
          ), oMG Document formal/2007-11-04
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Petre</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Why looking isn't always seeing: readership skills and graphical programming</article-title>
          .
          <source>Communications of the ACM</source>
          <volume>38</volume>
          (
          <issue>6</issue>
          ),
          <fpage>33</fpage>
          -
          <lpage>44</lpage>
          (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Schmidt</surname>
            ,
            <given-names>D.C.</given-names>
          </string-name>
          :
          <article-title>Guest editor's introduction: Model-driven engineering</article-title>
          .
          <source>Computer</source>
          <volume>39</volume>
          (
          <issue>2</issue>
          ),
          <fpage>25</fpage>
          -
          <lpage>31</lpage>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <article-title>The Apache Software Foundation: Apache subversion</article-title>
          . Online http://subversion. apache.org/, http://subversion.apache.org/, accessed June,
          <year>2010</year>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>