<!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>Emerging Topics in Textual Modelling?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Achim D. Brucker</string-name>
          <email>a.brucker@exeter.ac.uk</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gwendal Daniel</string-name>
          <xref ref-type="aff" rid="aff4">4</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Martin Gogolla</string-name>
          <email>gogolla@informatik.uni-bremen.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Frédéric Jouault</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christophe Ponsard</string-name>
          <email>christophe.ponsard@cetic.be</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Valéry Ramon</string-name>
          <email>valery.ramon@cetic.be</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Edward D. Willink</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Center of Excellence in Information and Communication Technologies (CETIC)</institution>
          ,
          <addr-line>Charleroi</addr-line>
          ,
          <country country="BE">Belgium</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Computer Science Department, University of Bremen</institution>
          ,
          <addr-line>Bremen</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Department of Computer Science, University of Exeter</institution>
          ,
          <addr-line>Exeter</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>ESEO-TECH</institution>
          ,
          <addr-line>Angers</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff4">
          <label>4</label>
          <institution>Internet Interdisciplinary Institute (IN3), Universitat Oberta de Catalunya (UOC)</institution>
          ,
          <addr-line>Barcelona</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff5">
          <label>5</label>
          <institution>Willink Transformations Ltd</institution>
          ,
          <addr-line>Reading, England, ed_at_willink.me.uk</addr-line>
        </aff>
      </contrib-group>
      <fpage>97</fpage>
      <lpage>104</lpage>
      <abstract>
        <p>The 19th edition of the OCL workshop featured a lightning talk session where authors were invited to present their recent work and open questions related to textual modeling in general and OCL in particular. These 5 minute presentations triggered fruitful discussions within the OCL community on the usage of textual modeling, model validation, and specific technical points of the OCL specification. This community paper provides an overview of the presented contributions (one per section), as well as a summary of the questions and discussions they have triggered during the session.</p>
      </abstract>
      <kwd-group>
        <kwd>OCL</kwd>
        <kwd>Textual Modeling</kwd>
        <kwd>Graphical Modeling</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Textual modeling in general and OCL in particular is a well-established but still
active field of research. The OCL standard, which was first released in 1997,
has been continuously enriched since then, and is now the cornerstone of
several model querying, verification, and transformation approaches. Current work
on textual modeling covers its foundation (e. g., the formal semantics of
textual modeling languages) to its usage in cutting edge applications like database
querying, or AI specification.</p>
      <p>The lightning talk session of the 19th edition of the OCL workshop was
animated by three experts of the field. They presented their ongoing work on
the usage of textual modeling with respect to graphical modeling, discussed
specific constructs of the OCL language, and introduced optimization strategies
for model verification.</p>
      <p>The following sections are contributed by these experts. They summarize
both their recent works and the related discussions that took place during the
workshop.
2</p>
      <p>Tweaking Class Model Validation with Specialized
Association Bounds</p>
      <p>
        Martin Gogolla
In the context of validating and verifying UML and OCL class models, we have
developed a so-called model validator [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] that automatically generates valid
object models satisfying in particular the stated OCL invariants. For each class and
optionally for each association, one states a lower and upper bound, respectively,
for the number of objects in a class and for the number of links in an
association. Tight bounds often lead to faster validation and verification processes.
Apart from plain associations, UML allows the developer to apply different kinds
of part-whole relationships: Aggregation and composition. In our
implementation, both part-whole relationships have to be acyclic on the instantiation level,
i. e., in the object diagrams. Concerning the difference between aggregation and
composition, we have implemented aggregation as a part-whole relationship
establishing a weak connection between the part and whole, whereas composition
implies a strong connection between part and whole: In aggregations, a part may
be included in many wholes, whereas in compositions a part may be included
at each point of the part’s life cycle in at most one whole (allowing for possibly
changing, different wholes). Associations are interpreted in object diagrams with
arbitrary connections in which no particular restrictions are made with respect
to structure. These requirement can be formulated again as OCL constraints [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>The requirements on the instantiations, i. e., the objects diagrams, can be
summarized as follows: Plain associations are interpreted by plain, directed
graphs having no particular restrictions, aggregations yield acyclic graphs
(socalled dags, i. e., directed, acyclic graphs), and compositions end up in graphs
with tree-like structures. Fig. 1 states an overview and an example. With
respect to the number of upper bound of links in associations, aggregations, and
compositions the requirements imply the following upper bounds. We assume
the simple case that we consider one class with one association, one aggregation
and one composition defined on the class in a reflexive manner. Furthermore we
assume that n objects are present in the considered class. The specialized
association bounds can be stated as follows: At most n ∗ n links are allowed in the
case of association, at most (n − 1) ∗ (n − 2)/2 links in the case of aggregation,
and at most n − 1 links in the case of composition.</p>
      <p>An OCL Map Type</p>
      <p>Edward D. Willink
OCL’s family of Collection types is well known, but a Map(K,V) type is missing.
Some distinguished authors have suggested that the deficiency can be remedied
by a Set(Tuple(K, V)), but this is clearly misguided since a Set(Tuple) can
have many different-valued entries for the same key, whereas a map can only
have one value per key.</p>
      <p>The Java Map type is very familiar and might perhaps inspire an equally
familiar library type for OCL, but this too is misguided since a Java Map is
mutable while an OCL Map should be immutable.</p>
      <p>The ordered Collections are therefore a better source of inspiration. The
following have obvious functionality:
=, &lt;&gt;, isEmpty(), notEmpty(), size().</p>
      <p>New keys() and values() operations can access the two halves of the map.
Similarly obvious functionality with respect to the keys can be provided by:
excludes(k), excludesAll(c), excluding(k),
excludingAll(c), includes(k), includesAll(c)</p>
      <p>Further emulation of ordered Collections suggests that at(k) accesses the
map at index k. including(k,v) creates a new map with an additional or
replacement k&lt;-v binding. It returns null for a null value and invalid for a
missing value.</p>
      <p>Richer support can be provided by:
excludesMap(m), excludesValue(v), excludingMap(m),
includesMap(m), includesValue(v), includingMap(m)</p>
      <p>Construction of a Map literal can re-use the Tuple literal syntax in conjunction
with a new binding operator &lt;-. Thus a map literal with two entries for two value
to key bindings my be created by:</p>
      <p>Map{k1&lt;-v1, k2&lt;-v2}</p>
      <p>The above facilities were prototyped in Eclipse OCL 2015-06. They provide
an adequate ability to use a Map but prove very inefficient for Map construction
since creating a Map with N entries requires progressive construction of N-1
intermediate maps; the execution performance is therefore at best quadratic.
The Eclipse OCL 2019-03 release therefore extends the create/operation Map
functionality with iteration support.</p>
      <p>A Map is treated as a set of keys each with a bound co-value. All the standard
Collection iterations apply to Maps using the set of keys as the iteration domain.
Additionally a co-iterator may be bound to the iterator to avoid the need to
invoke at(k) to obtain the value of each key. Thus a map can be checked to
ensure that each v bound to its k iterator is equal to the squared value of the
iterator.</p>
      <p>let c : Map(Integer, Real) = ... in c-&gt;forAll(k&lt;-v | v = k*k)
A new collectBy iterator, that may be used on Collections or Maps,
supports creation of a Map by collecting an expression value for each iterator key. A
map from ten integer values to their squares may be built by:</p>
      <p>Sequence{1..10}-&gt;collectBy(k | k*k)</p>
      <p>Future work might generalize k&lt;-v from special purpose punctuation to an
expression operator. The downside of this generalization is the cost/complexity
of a new Entry(K,V) type for the new expression result and of course many new
operations to allow an Entry type to be used sensibly. The upside is that the
collectBy body may use let variables and may compute both key and value. A
map that binds an integer value to its string value could be built by:
Sequence{1..10}-&gt;collectBy(k | k.toString()&lt;-k)</p>
      <p>A consequence of permitting both key and value to be computed, is that,
in general, uniqueness of the key values cannot be guaranteed. To avoid
nondeterministic loss of colliding values, the Map parameterization would need to be
a multimap: Map(K,Bag(V)).
4</p>
      <p>Some Guidelines About When to Use Textual And/Or
Graphical Modelling in MBSE</p>
      <p>
        Christophe Ponsard and Valéry Ramon
Model-based systems engineering (MBSE) is the application of modelling
techniques throughout the whole system development lifecycle to support system
requirements, specification, design, verification and validation activities [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. No
matter they are general-purpose or domain-specific, modelling languages can
take different forms and rely on different textual and/or graphical notations:
– textual modelling languages cover a large spectrum, from natural/structured
languages (e. g. for requirements) to more formal ones (e. g. B, Event-B,
Alloy)
– graphical modelling languages are mostly semi-formal (e. g. UML, SysML)
but some have formalised notations (e. g. Petri nets, Finite State Machines).
      </p>
      <p>
        Textual and graphical modelling languages can also be combined and
complement each other. Indeed, textual model elements may appear in graphical-based
languages for stating precise properties (e. g. OCL constraints in UML class
diagrams, formal layer of KAOS [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] using temporal logic). Besides, tools exist that
enable the combination of both modalities: either they provide textual edition
inside graphical editors or they enable to edit the same model both graphically
and textually (with both views continuously synchronised with each other). An
example of this latter case is the integration of Sirius graphical editor and Xtext
textual editor to edit EMF models [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        Although textual and graphical notations may capture the same information,
one modality might be more adapted to some context modelling related activities
involving both humans and tool chains. We give here a synthetic comparison of
the benefits of both kinds of notations according to relevant factors such as
analysability, learning curve or scalability. Our work is based on both a review
of results from some empirical studies [
        <xref ref-type="bibr" rid="ref5 ref7">5, 7</xref>
        ] (including themselves wider results
reported in the literature) and on our own return of experience as a research
and industry technology transfer centre. Table 1 summarises those results: +
and (+) respectively indicate that the notation is better or is better with some
restrictions explained below; deb means "debatable".
(*) Accuracy is the degree to which a model enables deeper reasoning as well as
error/deficiencies/inaccuracies detection and correction (based on definitions
of analysability and modifiability from SQuaRE (ISO/IEC 25010)).
(**) Effectiveness is the effort/time to understand and maintain a model.
      </p>
      <p>
        The following comments and lessons learned can be summarised from Table 1.
a Accuracy : textual is better according to the study of [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] whereas no
statistically significant difference is noticed in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. From our experience, textual
notation is potentially more accurate (assuming well-defined semantics)
notably for stating precise properties and in the context of formal modelling
languages.
b Effectiveness : textual notation is more effective according to the study results
of [
        <xref ref-type="bibr" rid="ref5 ref7">5, 7</xref>
        ]. Effectiveness with graphical notation significantly improves with
training [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], which matches our experience.
c Learning curve: except for simple diagrams (e. g. UML use cases), it is usually
shorter with textual notation [
        <xref ref-type="bibr" rid="ref5 ref7">5, 7</xref>
        ]. Intuitiveness depends on the language
expressiveness and intricacy but also on the user profile (technical vs non
technical). Graphical notation is usually more intuitive for non-technical
profiles. Using a Domain Specific Language (DSL) improves this dimension.
d Representation of high-level information : from our experience and the
literature, graphical models better enable an overall view of the modelled system,
especially in the first engineering phases of complex industrial systems.
e Complex/large models lack studies relying on industrial models.
Combining both modalities is probably recommended to manage different levels of
details (hierarchical views, easy navigation) and the variety of profiles.
f Versioning - Comparison: it is easier and largely supported for textual
notations thanks to Version Control Systems. Support for model versioning is
progressing. However, clear visual representation of differences in graphical
modelling tools remains tricky.
g Preference - Satisfaction : usually goes to graphical modelling [
        <xref ref-type="bibr" rid="ref5 ref7">5, 7</xref>
        ].
However, when balanced with other qualities like accuracy or effectiveness, more
experienced subjects end up preferring textual representations.
      </p>
      <p>In conclusion, the above evidence gives some hint about the respective
benefits of textual and graphical modalities in MBSE. However, they are not yet
strong enough, given the small number of the empirical studies as well as their
simplified models and engineering tasks not necessarily realistic from a real-world
perspective. Our plan is to enrich this comparison based on MBSE on-going and
future deployments, in connection with a more systematic literature survey.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Gogolla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hilken</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Doan</surname>
            ,
            <given-names>K.H.</given-names>
          </string-name>
          :
          <article-title>Achieving Model Quality through Model Validation, Verification and Exploration</article-title>
          .
          <source>Journal on Computer Languages, Systems and Structures</source>
          , Elsevier,
          <string-name>
            <surname>NL</surname>
          </string-name>
          (
          <year>2017</year>
          ).
          <source>Online</source>
          <year>2017</year>
          -
          <volume>12</volume>
          -02
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Gogolla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Richters</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Expressing UML Class Diagrams</surname>
          </string-name>
          <article-title>Properties with OCL</article-title>
          . In: Clark,
          <string-name>
            <given-names>T.</given-names>
            ,
            <surname>Warmer</surname>
          </string-name>
          ,
          <string-name>
            <surname>J</surname>
          </string-name>
          . (eds.)
          <article-title>Advances in Object Modelling with the OCL</article-title>
          , pp.
          <fpage>86</fpage>
          -
          <lpage>115</lpage>
          . Springer, Berlin, LNCS
          <volume>2263</volume>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <source>[3] INCOSE: Systems Engineering Vision</source>
          <year>2020</year>
          .
          <string-name>
            <surname>INCOSE-TP-</surname>
          </string-name>
          2004
          <string-name>
            <surname>-</surname>
          </string-name>
          004-
          <fpage>02</fpage>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>van Lamsweerde</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Requirements Engineering: From System Goals to UML Models to Software Specifications</article-title>
          . Wiley (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Melia</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cachero</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hermida</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aparicio</surname>
          </string-name>
          , E.:
          <article-title>Comparison of a textual vs a graphical notation for the maintainability of mde domain models: an empirical study</article-title>
          .
          <source>Software Quality Journal</source>
          <volume>24</volume>
          (
          <issue>3</issue>
          ),
          <fpage>709</fpage>
          -
          <lpage>735</lpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Obeo</surname>
          </string-name>
          : Xtext/Sirius Integration Use-Cases. http://bit.do/obeo-sirius-xtext (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Sharafi</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          , et al.:
          <article-title>An empirical study on the efficiency of graphical vs. textual representations in requirements comprehension</article-title>
          .
          <source>In: IEEE 21st Int. Conf. on Program Comprehension (ICPC)</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>