<!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>Developing User and Recording Interfaces for Design Time and Runtime Models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Martin Gogolla</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nisha Desai</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Khan-Hoang Doan</string-name>
          <email>doankhg@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>
      <fpage>39</fpage>
      <lpage>48</lpage>
      <abstract>
        <p>Design time and runtime models may be uniformly described by UML and OCL models connected through correspondence models. We propose to develop a common user interface for both model layers in order to provide systematic and uniform access through operation calls to design time and runtime items. Operation calls can be systematically recorded in lmstrip models so that complete design time and runtime development steps are accessible. From recorded steps, various standard software models (like class, object and sequence diagrams) may be derived for documentation and comprehension purposes.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>are discussed in Sect. 3. Section 4 shows related work. Section 5 closes the paper
with concluding remarks and future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Basic Idea: Design Time, Runtime, User Interface,</title>
    </sec>
    <sec id="sec-3">
      <title>Filmstripping, Derived Models</title>
      <p>The class diagram in Fig. 1 determines the structures of our approach. It contains
submodels for particular purposes: a design time model, a runtime model, a user
interface model, and a lmstrip model for recording operation calls from the user
interface model.</p>
      <p>Design time model: In the upper center, the gure contains the classes Class
and Assoc. Its purpose is to enable the speci cation of classes and binary
associations, not general associations. This can be regarded as a dramatically
simpli ed version of the UML metamodel for UML class diagrams (within
the OMG 4 level architecture).</p>
      <p>Runtime model: In the upper right, the gure shows the classes Object and
Link. Its purpose is to make it possible to build objects and links for
previously de nes classes and associations. This can be seen as a simpli ed version
of the UML metamodel for UML object diagrams (within the OMG 4 level
architecture).</p>
      <p>In our view, the design time items constitute typical elements needed
during system design, and the runtime items are the building blocks occurring
during system execution (or system runtime).</p>
      <p>User interface model: In the upper left, the gure de nes the class CLI
(Command Line Interface). The operations of the class are designed for building
up a (simple) class diagram and a (simple) object diagram. The operation
parameters are all String-valued and depend on each other. For example, in
the operation newAssoc the parameters fst and snd refer to the names of the
classes between the new association that is going to be de ned.</p>
      <p>Filmstrip model: In the lower part, the gure de ned a lmstrip model for
recording operation calls from the command line interface. Every CLI
operation becomes an OperationCall class so that operation calls are represented
as OperationCall objects.
after execution of the command and operation call sequence. In the example
execution, design time elements are handled before runtime elements. However,
this must not necessarily be the case. In general, calls handling runtime items
may also be executed before design time calls.</p>
      <p>Figure 3 pictures in the left three derived models that can be regarded simply
as views on the larger object diagram in Fig. 2. All items from Fig. 3 occur in
Fig. 2, however, they are di erently arranged.</p>
      <p>Class model view: In the upper part, a class diagram view is presented. The
two classes Person and Book and the association Borrows are shown. These
three items are available for the rst time in Snapshot4.</p>
      <p>Object model view: In the middle part, three evolving object diagrams are
pictured, namely the Person object Ada and the Book object UML. The shown
items are taken from the snapshots Snapshot5, Snapshot6 and Snapshot7.
Sequence diagram view: In the lower part, the considered items are arranged
in a sequence diagram-like style. Four imaginary sequence diagram lifelines
are present: (a) the vertically arranged Snapshot objects can be imagined
as an actor in the sequence diagram; (b) three lifelines for the object Ada,
the object UML and the link between Ada and UML can be imagined. The
OperationCall objects represent the messages from the imaginary sequence
diagram. Here, the snapshot objects Snapshot4 to Snapshot7 together with
their connecting OperationCall objects have been selected and displayed.</p>
      <p>When displaying the models in the left of Fig. 3, we have taken the currently
available options in USE. Instead, one could choose a di erent visual syntax
that is closer to the purpose of the considered fraction of the object diagram, as
indicated in the right of the gure.
3</p>
    </sec>
    <sec id="sec-4">
      <title>Technical Realization</title>
      <p>In our view, the architecture and operation mode of our approach can be
visualized as shown in Fig. 4. It captures the four di erent layers and makes clear that:
(a) the design time model can be used on its own; (b) the design time model and
the runtime model can be used together on their own; (c) this analogously holds
for the remaining models. This section goes through the four models in Fig. 1
and Fig. 4 and discusses relevant details.</p>
      <p>Design time model: We have kept this model rather simple, because our aim
in this contribution was to explain our overall approach with a manageable
example. The two classes Class and Assoc with their connecting association
de ne that an Assoc object (an association) is binary with exactly two
implicit association ends. Naturally, also more involved models can be used
as design time models. Please note that the PredSucc associations are part
of the lmstrip model, not part of the design time model. An analogous
statement holds for the runtime model and user interface model: PredSucc
associations are part of the lmstrip model.</p>
      <p>Fig. 4. Russian Doll Architecture Showing Model Usage.</p>
      <p>Runtime model: The runtime model has counterparts for the items occurring
in the design time model. The two di erent parts of a link are modelled by
two di erent associations. The correspondence model connecting the design
time model and the runtime model consists of the two `typing' associations
ClassObject DT RT and AssocLink DT RT. These associations specify for an
Object its Class and for a Link its Assoc. The runtime model brings the design
time model into life by allowing to instantiate classes and associations.
User interface model: This model consists of the single class CLI only
(Comand Line Interface). It has operations to construct a new class, a
new association, a new object and a new link. Classes, associations and
objects have unique names. Additional query operations retrieve items
when provided names as parameters. For example, the query operation
CLI::class(c:String):Class returns the Class object cls for which cls.name=c
holds. In Fig. 2, we have for instance CLI6.class('Person') = Class9. The
following listing shows how essential operations are implemented in the
imperative language SOIL (Simple Ocl-like Imperative Language) that is part
of USE.
begin
declare v:Object;
v:=new Object(o); v.name:=o; v.properties:='';
insert (self.class(c),self.object(o)) into ClassObject_DT_RT
end
...
class(c:String):Class = Class.allInstances-&gt;any(e|e.name=c)
assoc(a:String):Assoc = Assoc.allInstances-&gt;any(e|e.name=a)
object(o:String):Object = Object.allInstances-&gt;any(e|e.name=o)
...</p>
      <p>end
Filmstrip model: The user interface model is automatically transformed into
a so-called lmstrip model. A lmstrip model consists of snapshots that
make system states from the user interface model (and the design time and
runtime model) explicitly accessible. The purpose of the lmstrip model is to
record a complete sequence of operation calls from the user interface model,
so that one can trace the system development in terms of the snapshots
and the transitions between the snapshots in form of operation calls. The
lmstrip model includes all PredSucc associations that are used to describe
the incarnations of a particular object in later snapshots. For example, in
Fig. 2 for the object Ada in Snapshot5 its later incarnations are Object1 and
Object3 with PredSuccObject links between them.</p>
      <p>Object attributes could be handled by the property properties. In our
examples we currently do not make use of attributes. The user interface model already
provides the operation setProperties for this pupose.</p>
      <p>Essential for our approach is the option allowing the developer to derive from
the lmstrip object diagram specialized models that help to document and to
better comprehend the design time and the runtime structure and behavior.
The example models in Fig. 3 show how structural models like class or object
diagrams and behavioral models like sequence diagrams may be derived. As
future work, we plan to provide the option to de ne a domain-speci c visual
syntax in order to make the diagrams in Fig. 3 look like proper UML class,
object and sequence diagrams, as we have already indicated in the right of the
gure. We envision that further UML diagram forms like communication or
statechart diagrams may be derived from lmstrip object diagrams. For example,
from a lmstrip object diagram, one may derive a protocol state machine for
books specifying that the operations borrow and return alternate between states
available and borrowed.
4</p>
    </sec>
    <sec id="sec-5">
      <title>Related Work</title>
      <p>
        In Fig. 5 on the left side (part of the) the well-known OMG 4 level architecture
and on the right side essentials of our approach are shown. Roughly speaking,
we are mapping the M2 level to the M1 level. This has the advantage that the
InstanceOf relationship between M2 and M1 now becomes explicitly available as
an association and is made precise. Bridging the gap between design and runtime
aspects is one of the signi cant challenges when developing complex systems [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
and several works are presented recently in this direction. In [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] the need to
shift model-based assurance cases from design time to runtime is discussed. In
this paper, the authors conclude that runtime assurance cases could be a
potential solution for assuring safety-related Cyber-Physical Systems. A solution
introduced in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] makes executing UML design models directly on embedded
microcontrollers possible thanks to a model interpreter. In [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], a set of modeling
patterns extracted from the literature is introduced. These patterns are
organized in a pattern language and consist of the speci cation for setting up the
models and the environment for the analysis of runtime behavior utilizing design
models. The authors in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] introduce ModelPlex, a method which combines o ine
veri cation of Cyber-Physical System (CPS) models with runtime validation of
system executions for compliance with the model. In [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], the authors present a
design pattern, Aggregate Callback, for building DSL-based models in a robust
and exible way by enforcing constraints in the model so that the consistency of
the output is guaranteed. The approach in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] discusses the Requirements
Modeling Languages (RML) and proposes a conceptual distinction between design
time and run time requirements models. Run time models extend design time
models with additional information about execution of system tasks.
5
      </p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>The problem discussed in this contribution was how to provide a generic
infrastructure in that design time and runtime models can be applied and properties
of these models can be retrieved. The goal was to achieve such properties in
a semi-automatic fashion. We started from a design time and runtime model,
proposed to develop a common user interface and then automatically generated
a lmstrip model that is able to record development steps. From this lmstrip
model, we were able to extract other models that represented artifacts occurring
in the development process and that help in comprehending the development.</p>
      <p>As future work, we want to develop language support in form of a visual
domain-speci c language for the di erent layers, namely the design time, the
runtime and the user interface layer on the basis of the lmstrip model. Tool
support for the di erent layers must be extended, e.g., layout and view support
for di erentiating between design time and runtime. Furthermore, larger case
studies in particular with more advanced correspondence models and a wide
range of derived diagram forms must check the applicability and practicability
of the proposed approach.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Besnard</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brun</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jouault</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Teodorov</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dhaussy</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Embedded UML model execution to bridge the gap between design and runtime</article-title>
          . [
          <volume>8</volume>
          ]
          <fpage>519</fpage>
          {
          <fpage>528</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Borgida</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dalpiaz</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horko</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mylopoulos</surname>
          </string-name>
          , J.:
          <article-title>Requirements models for design- and runtime: a position paper</article-title>
          . In Atlee,
          <string-name>
            <given-names>J.M.</given-names>
            ,
            <surname>Chechik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            , France, R.B.,
            <surname>Gray</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Paige</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.F.</given-names>
            ,
            <surname>Rumpe</surname>
          </string-name>
          , B., eds.
          <source>: Proc. 5th Int</source>
          . Workshop Modeling in Software Engineering,
          <source>MiSE</source>
          <year>2013</year>
          , IEEE Computer Society (
          <year>2013</year>
          )
          <volume>62</volume>
          {
          <fpage>68</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bruneliere</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eramo</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gomez</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Besnard</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bruel</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gogolla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Kastner,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Rutle</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Model-driven engineering for design-runtime interaction in complex systems: Scienti c challenges and roadmap - report on the mde@derun 2018 workshop</article-title>
          . [8]
          <fpage>536</fpage>
          {
          <fpage>543</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Gogolla</surname>
          </string-name>
          , M., Hamann, L.,
          <string-name>
            <surname>Hilken</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuhlmann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , France, R.B.:
          <article-title>From Application Models to Filmstrip Models: An Approach to Automatic Validation of Model Dynamics</article-title>
          . In Fill, H.,
          <string-name>
            <surname>Karagiannis</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reimer</surname>
          </string-name>
          , U., eds.
          <source>: Proc. Modellierung</source>
          (MODELLIERUNG'
          <year>2014</year>
          ), GI, LNI
          <volume>225</volume>
          (
          <year>2014</year>
          )
          <volume>273</volume>
          {
          <fpage>288</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <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, Veri cation and Exploration</article-title>
          .
          <source>Journal on Computer Languages, Systems and Structures</source>
          , Elsevier,
          <source>NL (2017) Online</source>
          <year>2017</year>
          -
          <volume>12</volume>
          -02.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Kastner,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Gogolla</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Doan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Desai</surname>
          </string-name>
          , N.:
          <article-title>Sketching a model-based technique for integrated design and run time description</article-title>
          . [
          <volume>8</volume>
          ]
          <fpage>529</fpage>
          {
          <fpage>535</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. Kovesdan, G.,
          <string-name>
            <surname>Asztalos</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lengyel</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Aggregate callback - A design pattern for exible and robust runtime model building</article-title>
          . In Hammoudi, S.,
          <string-name>
            <surname>Pires</surname>
            ,
            <given-names>L.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Desfray</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Filipe</surname>
          </string-name>
          , J., eds.
          <source>: Proc. Modelsward</source>
          <year>2015</year>
          , SciTePress (
          <year>2015</year>
          )
          <volume>149</volume>
          {
          <fpage>156</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Mazzara</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ober</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          , Salaun, G., eds.:
          <article-title>STAF 2018 Collocated Workshops</article-title>
          . Volume
          <volume>11176</volume>
          of Lecture Notes in Computer Science., Springer (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Mitsch</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Platzer</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Modelplex: veri ed runtime validation of veri ed cyberphysical system models</article-title>
          .
          <source>Formal Methods in System Design</source>
          <volume>49</volume>
          (
          <issue>1-2</issue>
          ) (
          <year>2016</year>
          )
          <volume>33</volume>
          {
          <fpage>74</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. OMG, ed.:
          <source>Object Constraint Language, Version</source>
          <volume>2</volume>
          .4.
          <string-name>
            <surname>OMG</surname>
          </string-name>
          (
          <year>2014</year>
          )
          <article-title>OMG Document, www</article-title>
          .omg.org.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. OMG, ed.:
          <source>Uni ed Modeling Language, Version</source>
          <volume>2</volume>
          .5.
          <string-name>
            <surname>OMG</surname>
          </string-name>
          (
          <year>2015</year>
          )
          <article-title>OMG Document, www</article-title>
          .omg.org.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <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>
          :
          <source>The Uni ed Modeling Language 2</source>
          .0
          <string-name>
            <given-names>Reference</given-names>
            <surname>Manual.</surname>
          </string-name>
          Addison-Wesley, Reading (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Szvetits</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zdun</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          :
          <article-title>A pattern language for manual analysis of runtime events using design models</article-title>
          .
          <source>In: Proc. 23rd European Conf. on Pattern Languages of Programs, EuroPLoP</source>
          <year>2018</year>
          , ACM (
          <year>2018</year>
          )
          <volume>15</volume>
          :
          <fpage>1</fpage>
          {
          <fpage>15</fpage>
          :
          <fpage>24</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <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 id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Wei</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kelly</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , Reich, J.,
          <string-name>
            <surname>Gerasimou</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>On the transition from design time to runtime model-based assurance cases</article-title>
          . In Hebig, R.,
          <string-name>
            <surname>Berger</surname>
          </string-name>
          , T., eds.
          <source>: Proc. MODELS 2018 Workshops. CEUR Proceedings</source>
          , Vol.
          <volume>2245</volume>
          (
          <year>2018</year>
          )
          <volume>56</volume>
          {
          <fpage>61</fpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>