<!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>
      <journal-title-group>
        <journal-title>International workshop on MDE for Smart IoT Systems, July</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Eficiently Engineering IoT Architecture Languages-An Experience Report (Poster)</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jörg Christian Kirchhof</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anno Kleiss</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Judith Michael</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bernhard Rumpe</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andreas Wortmann</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for Control Engineering of Machine Tools and Manufacturing Units (ISW), University of Stuttgart</institution>
          ,
          <addr-line>Germany, https://</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Software Engineering, RWTH Aachen University</institution>
          ,
          <addr-line>Germany, https:// se-rwth.de/</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>0</volume>
      <fpage>4</fpage>
      <lpage>08</lpage>
      <abstract>
        <p>Engineering architecture description languages (ADLs) is complex. Yet, research and industry have developed over 120 ADLs for various purposes. Many of these languages share similar concepts and elements. Instead of creating a novel ADL for the Internet of Things (IoT) from scratch, we created the MontiThings IoT ADL through systematically reusing (parts of) various stand-alone languages. MontiThings is an ecosystem for the model-driven development, deployment, and analysis of IoT applications [1, 2, 3]. MontiThings can generate C++ code from its models and also provides the necessary scripts to containerize the code using Docker. In this paper, we detail the MontiThings ADL, its constituents, and language reuse mechanisms. Researchers and practitioners in the engineering of (IoT) ADLs can benefit from these insights to prevent creating another 120 ADLs from scratch.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Internet of Things</kwd>
        <kwd>Model-Driven Engineering</kwd>
        <kwd>Architecture Description Language</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Language Features</title>
      <p>
        MontiThings is developed using the MontiCore Language Workbench [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], leveraging the library
of composable modeling languages [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] ofered by MontiCore ( cf. Fig. 1).
      </p>
      <p>Type System MontiThings ofers primitive types similar to Java or C++ ( byte, int, long,
float, boolean, char, String). Additionally, collections types can group objects (Set, List,
Map). To facilitate working with sensor data, MontiThings enables using SI units as primitive
types (e.g., kg, dB, km, s, °C, . . . ) by extending MontiCore’s SI Unit language. MontiThings
automatically converts the SI unit values if necessary (e.g., m/s to km/h). Developers can
specify their own types using class diagrams from MontiCore’s CD4Analysis language.</p>
      <p>MontiCore Project</p>
      <p>MCCommonStatements</p>
      <p>MCCommonLiterals
MontiArc Project</p>
      <p>ArcBasis
SI Units Project</p>
      <p>SIUnitTypes4Computing
SIUnitLiterals</p>
      <p>MontiArc</p>
      <p>MontiThings</p>
      <p>OCL Project</p>
      <p>OCLExpressions
OptionalOperators</p>
      <p>SetExpressions
type usage
only</p>
      <p>OCL
CD4A Project</p>
      <p>CD4Analysis</p>
      <p>Behavior MontiThings components ofer three modes of computation: initialization, i.e.,
behavior executed when starting the component, cyclic behavior, i.e., behavior executed in
time intervals, and event-based behavior, i.e., behavior executed in response to receiving a
message. The three modes can be combined within the same component but only one behavior
can be executed simultaneously per component to prevent race conditions. The behavior of
MontiThings components can be specified in four ways: Composed components instantiate
and connect subcomponents to specify their own behavior. Atomic components do not have
subcomponents, but specify their behavior through a programming language embedded in the
model (using MontiCore’s MCCommonStatements language), statecharts (from MontiCore’s
statechart language) or handwritten C++ code.</p>
      <p>Expressions and Literals MontiThings’ expressions are mainly built on top of the expressions
provided by MontiCore out of the box, i.e., assignments, mathematical, and boolean operators
(e.g., +, -, &lt;=, or ||). Additionally, MontiThings’ reuses expressions from object constraint
language (OCL) such as @pre, set expressions such as union or intersection of sets or checking
if a set contains a given element. MontiCore’s literal grammars ofer MontiThings the capability
to create numbers, strings, or boolean values. The SIUnitLiterals enable creating numbers
with international system of units (SI) types such as 17 km/h. To instantiate classes from class
diagrams, MontiThings uses object diagrams using a JSON-like syntax.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Discussion, Recommendations, and Conclusion</title>
      <p>
        MontiThings defines about 710 lines of grammar in 14 grammars and reuses 4371 lines of
grammar from 46 grammars from the MontiCore project. We therefore assumed that language
libraries can substantially reduce the efort required to implement new ( IoT) ADLs. To test this
assumption, we tried to re-implemented Ericsson’s IoT ADL Calvin [
        <xref ref-type="bibr" rid="ref6 ref7 ref8">6, 7, 8</xref>
        ]. We were able to
parse (slightly adapted) Calvin models using only existing language components adapted with
about 50 lines of grammar to match Calvin’s syntax. Another 15 lines of grammar were needed
to add CalvinScript, which is not covered by MontiCore’s language library. The main limitation
to this approach is that deviating from the language library’s infrastructure (e.g., type system)
may require a non-negligible amount of work. As re-implementing the Calvin’s Python-like
type system would have implied significant changes, we kept MontiThings’ type system. Thus,
the Calvin models needed to be adapted to contain explicit type names. Nevertheless, this
experiment suggests that future IoT ADLs could reuse models of existing IoT ADLs with only
limited efort. Providing parsers for other IoT ADLs can lower the entry barrier for modelers
who are already invested in another IoT ADL.
      </p>
      <p>The intensive reuse of existing language components enables us to reduce the efort for
creating a new language. Language engineers can extend already mature and tested languages
but the approach still allows to add needed domain-specific extensions. Thus, we recommend
language engineers to not build new IoT languages from scratch but utilize language libraries
and consider the option of providing parsers for existing IoT ADLs.</p>
    </sec>
    <sec id="sec-4">
      <title>Source Code</title>
      <p>MontiThings is available on GitHub: https://github.com/MontiCore/montithings</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence
Strategy—EXC 2023 Internet of Production—390621612. Website: https://www.iop.rwth-aachen.de</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Kirchhof</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Rumpe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Schmalzing</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Wortmann,
          <article-title>MontiThings: Model-driven Development and Deployment of Reliable IoT Applications</article-title>
          ,
          <source>Journal of Systems and Software</source>
          <volume>183</volume>
          (
          <year>2022</year>
          )
          <fpage>111087</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Kirchhof</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kleiss</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Rumpe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Schmalzing</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Schneider</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wortmann</surname>
          </string-name>
          ,
          <article-title>Model-Driven Self-Adaptive Deployment of Internet of Things Applications with Automated Modification Proposals, ACM Transactions on Internet of Things</article-title>
          (In Press,
          <year>2022</year>
          , DOI: https://doi.org/10.1145/3549553).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Kirchhof</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Malcher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Rumpe</surname>
          </string-name>
          ,
          <article-title>Understanding and Improving Model-Driven IoT Systems through Accompanying Digital Twins</article-title>
          , in: E. Tilevich, C. De Roover (Eds.),
          <source>Proceedings of the 20th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences (GPCE '21)</source>
          ,
          <source>ACM SIGPLAN</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>197</fpage>
          -
          <lpage>209</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>K.</given-names>
            <surname>Hölldobler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Kautz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Rumpe</surname>
          </string-name>
          ,
          <source>MontiCore Language Workbench and Library Handbook: Edition</source>
          <year>2021</year>
          ,
          <string-name>
            <given-names>Aachener</given-names>
            <surname>Informatik-Berichte</surname>
          </string-name>
          ,
          <source>Software Engineering, Band</source>
          <volume>48</volume>
          ,
          <string-name>
            <surname>Shaker</surname>
            <given-names>Verlag</given-names>
          </string-name>
          ,
          <year>2021</year>
          . URL: https://www.monticore.de/ handbook.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Butting</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Eikermann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Hölldobler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Jansen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Rumpe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wortmann</surname>
          </string-name>
          , A Library of Literals, Expressions, Types, and
          <article-title>Statements for Compositional Language Design, Special Issue dedicated to Martin Gogolla on his 65th Birthday</article-title>
          ,
          <source>Journal of Object Technology</source>
          <volume>19</volume>
          (
          <year>2020</year>
          ) 3:
          <fpage>1</fpage>
          -
          <lpage>16</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>O.</given-names>
            <surname>Angelsmark</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Persson</surname>
          </string-name>
          ,
          <article-title>Requirement-Based Deployment of Applications in Calvin</article-title>
          , in: I.
          <string-name>
            <surname>Podnar Žarko</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Broering</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Soursos</surname>
          </string-name>
          , M. Serrano (Eds.),
          <source>Interoperability and Open-Source Solutions for the Internet of Things</source>
          , Springer International Publishing, Cham,
          <year>2017</year>
          , pp.
          <fpage>72</fpage>
          -
          <lpage>87</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>P.</given-names>
            <surname>Persson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Angelsmark</surname>
          </string-name>
          , Calvin - Merging Cloud and IoT,
          <source>Procedia Computer Science</source>
          <volume>52</volume>
          (
          <year>2015</year>
          )
          <fpage>210</fpage>
          -
          <lpage>217</lpage>
          .
          <source>6th Int. Conf. on Ambient Systems, Networks and Technologies (ANT).</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>P.</given-names>
            <surname>Persson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Angelsmark</surname>
          </string-name>
          , Kappa:
          <article-title>Serverless iot deployment</article-title>
          ,
          <source>in: Proceedings of the 2nd International Workshop on Serverless Computing</source>
          , WoSC '17,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2017</year>
          , pp.
          <fpage>16</fpage>
          -
          <lpage>21</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>