<!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>Visualizing and Analyzing Discrete Sets with a UML and OCL Software Design Tool</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Martin Gogolla</string-name>
          <email>gogolla@informatik.uni-bremen.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Khanh-Hoang Doan</string-name>
          <email>doankh@informatik.uni-bremen.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Computer Science Department, University of Bremen</institution>
          ,
          <addr-line>Bremen</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>76</fpage>
      <lpage>83</lpage>
      <abstract>
        <p>This contribution discusses the visualization of discrete sets. With diagrams, we realize filtering set elements with particular properties, study set-theoretic operations, and exhibit set elements and their internal relationships. These techniques allow software developers to explore crucial set properties diagramatically. Modelling languages like UML (Unified Modeling Language) [5, 2], which includes the OCL (Object Constraint Language) [7, 1], allow developers to represent discrete sets of objects with so-called object diagrams. In UML tools, one can construct and manipulate such object diagrams and with this the underlying object sets. In the context of our tool USE (Uml-based Specification Environment)1, this paper studies set visualization and set property analysis by (a) OCL queries in order to represent interesting subsets of a given set, (b) graphical representation of set theoretic operations like union or intersection, and (c) associations for representing crucial relationships between set elements. The rest of this contribution is structured as follows. Section 2 studies OCL query selection. Section 3 focuses on set-theoretic operations. Section 4 treats internal relationships in sets determined by derived associations. All presented options are implemented in USE. Section 5 discusses very few related approaches. Section 6 ends the paper with concluding remarks and future work.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>Set Visualization through OCL Queries</title>
      <p>Figure 1 presents a set of integers in form of 16 Int objects where each object
has an object identity (in the top of the object rectangle) and a unique attribute
val showing the represented integer. The integers are randomly chosen from the
interval 0..255 and are placed randomly in the object diagram. Such a
situation, where an unknown set has to be traversed, occurs frequently in software
development. Systematic placement of elements will be discussed later. The
purpose of the following queries and selections is to explore this integer set and its
properties with diagrams, however considering the basic layout as fixed.
1 https://sourceforge.net/projects/useocl/
by 3. The union of these two sets is graphically constructed by (a) clearing the
object diagram (pushing button Hide All in the first OCL window), (b)
showing the integers divisible by 2 (pushing button Evaluate with option Show
activated), and (c) adding the integers divisible by 3 (pushing button Evaluate also
with option Show activated in the second OCL window). The result of the
diagrammatically achieved result can be checked against the third OCL expression
that computes the union by means of a logical disjunction. Analogously, other
set-theoretic operations like intersection or difference can be performed (by
activating other options like Crop or Hide).
4</p>
    </sec>
    <sec id="sec-3">
      <title>Set Visualization through Derived Links</title>
      <p>of a given integer, i.e., its predecessor and successor. Of course, other derived
associations could be defined. This derived association divides the previously
unconnected elements into components. In the example, there are six components.
Each single component constitutes a connected subset. Unconnected components
have disjoint predecessors and successors.</p>
      <p>
        Up to now we have considered integer sets. Similar techniques as discussed above
can be applied however to sets of strings. Figure 5 is based on the titles of the
papers at the Diagrams 2016 conference. It shows a weighted word cloud of the
28 words appearing in at least two different titles. In our view such a word cloud
is also a diagrammatic representation of a set of strings. However, we will explore
an alternative representation revealing more information.
Analogously to establishing a structure in a set of integers through its
predecessors or successors, one can introduce an internal structure on a string set,
e.g., through the common use of the word in different titles. Figure 6 shows the
28 words (each word appearing in at least two different titles) where a connection
in form of a derived link is established, if the two words have a title in common.
These links now classify the word set basically into four different components:
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) the top left Spontaneous-Instruction component, (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) the isolated Visual
component, (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) the top right Perception-Reasoning component, and (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) the bottom
Drawings-Understand component. This internal structure reveals more
information than the word cloud in that it shows that certain words occur together
in groups of titles. This structure indicates strong and weak connections in the
word set: within one component, words have a strong connection, whereas words
from different components have a weaker connection. These components could
be shown also as a linear or an Euler diagram (see Fig. 72).
      </p>
      <p>To understand the shown derived links, the right bottom part of Fig. 6 shows
how the Perception-Clutter-Diagrams triangle (the relation between “Perception”,
“Diagrams” and “Clutter”) from the upper right is built. Here, all words occur
in a single title.</p>
      <p>The technical definition for the derived, reflexive association on class Word looks
as follows. A link indicates that the two words have a title in common. The link
goes from a lexicographically lower string (role fst) to a lexicographically higher
string (role lst).
association WordWord between</p>
      <p>Word [0..*] role fst -- first
Word [0..*] role lst -- last</p>
      <p>derived = self.t.w-&gt;select(e | self.W&lt;e.W)-&gt;asSet()
end
2 https://www.cs.kent.ac.uk/people/staff/pjr/linear/, http://www.eulerdiagrams.org/inductivecircles.html</p>
    </sec>
    <sec id="sec-4">
      <title>Related Work</title>
      <p>Due to space limitations we only mention very few approaches. In previous own
work [3] we have discussed different options in our tool with emphasis on
metamodels. Here we focus on set representations. The work in [4] discusses linear
diagrams that could be derived from our objects diagrams with components.
The work in [6] also applies UML diagrams focusing on ontology representation.
6</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>The problem discussed in this contribution has been to offer good diagrammatic
representations for discrete, finite sets. We have shown how to use a software
design tool to represent finite sets with UML object diagrams. Future work includes
finding a general way to determine for a given set crucial internal relationships,
i.e., associations, that can be applied to guide the process leading from the set
to a diagram representing the set and displaying with the diagram layout
meaningful relationships between set elements. Furthermore, finding a systematic way
to go from the component representation to linear and Euler diagrams seems to
be promising for string sets. Last but not least, larger case studies and examples
should check the applicability and usefulness of the proposed techniques.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Gogolla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Object Constraint Language</article-title>
          . In Liu, L., O¨ szu, M.T., eds.:
          <source>Encyclopedia of Database Systems</source>
          . Springer, Berlin (
          <year>2009</year>
          )
          <fpage>1927</fpage>
          -
          <lpage>1929</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Gogolla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Unified Modeling Language</article-title>
          . In Liu, L., O¨ szu, M.T., eds.:
          <source>Encyclopedia of Database Systems</source>
          . Springer, Berlin (
          <year>2009</year>
          )
          <fpage>3232</fpage>
          -
          <lpage>3239</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Gogolla</surname>
          </string-name>
          , M., Hamann, L.,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Zhang, J.:
          <string-name>
            <surname>Exploring (Meta-)Model</surname>
          </string-name>
          <article-title>Snapshots by Combining Visual and Textual Techniques</article-title>
          . In
          <string-name>
            <surname>Gadducci</surname>
          </string-name>
          , F.,
          <string-name>
            <surname>Mariani</surname>
          </string-name>
          , L., eds.
          <source>: Proc. WS GTVMT</source>
          '
          <year>2011</year>
          , ECEASST
          <volume>41</volume>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Rodgers</surname>
            ,
            <given-names>P.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stapleton</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chapman</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Visualizing sets with linear diagrams</article-title>
          .
          <source>ACM Trans. Comput.-Hum. Interact</source>
          .
          <volume>22</volume>
          (
          <issue>6</issue>
          ) (
          <year>2015</year>
          )
          <volume>27</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>27</lpage>
          :
          <fpage>39</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Rumbaugh</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jacobson</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Booch</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>The Unified Modeling Language 2.0 Reference Manual</article-title>
          . Addison-Wesley, Reading (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Thomas</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gerber</surname>
          </string-name>
          , A.,
          <string-name>
            <surname>van der Merwe</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>An investigation into OWL for concrete syntax specification using UML notations</article-title>
          . In Jamnik,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Uesaka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Schwartz</surname>
          </string-name>
          , S.E., eds.
          <source>: Proc. 9th Int. Conf. Diagrams</source>
          <year>2016</year>
          , Springer, LNCS
          <volume>9781</volume>
          (
          <year>2016</year>
          )
          <fpage>197</fpage>
          -
          <lpage>211</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Warmer</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kleppe</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>The Object Constraint Language: Precise Modeling with UML</article-title>
          .
          <string-name>
            <surname>Addison-Wesley</surname>
          </string-name>
          (
          <year>2003</year>
          )
          <article-title>2nd Edition</article-title>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>