<!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>A Tool to Edit and Verify IoT System Architecture Model</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Shinpei Ogata</institution>
          ,
          <addr-line>Hiroyuki Nakagawa</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>-The spread of IoT (Internet of Things) categorized into a type of cyber-physical system makes future systems larger and more complex than ever. Various components such as cloud services, edges, devices and energy suppliers play important roles when constructing an IoT system. Moreover, components in such systems have various relationships to other components. Hence, a simple and extendable specification notation for grasping such relationships is sought for architectural design of IoT systems. When we design such IoT Systems, effective verification also should be provided so that we can identify critical system faults. We present a tool to edit and verify IoT system architecture models. The tool extends a UML editor to enable easy editing of architectural models, and verifies them using the logic programming language Prolog.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Keywords-IoT, Architectural Model, Logic Programming,
Verification, Twin Peaks Model.</p>
    </sec>
    <sec id="sec-2">
      <title>I. INTRODUCTION</title>
      <p>IoT systems are often developed as large-scale systems
because they have to deal with not only cyberspaces but also
physical spaces. Cyberspaces contain cloud services storing
and utilizing big data, whereas physical spaces contain devices
interacting with things outside of the system and equipment
supplying energy to other pieces of physical equipment.
Therefore, system faults occur frequently in such IoT systems
than ones in traditional software centric systems. Developers
should comprehend target IoT systems that contain various
components and their mixed and complicated relationships.</p>
      <p>
        The twin peaks model [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] describes a method to
develop software requirements and architectures concurrently
but separately using incremental development. This model is
still efficient when we construct an IoT system. Goal models
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and use case models [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] are representative models for
requirements analysis. The goal models, such as i* [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], can
represent actor relationships; the use case models, on the other
hand, mainly represent use-case-centric relationships instead
of actor relationships. We can analyze intentions and features
using goal models and use case models; however, when we
design a system architecture, it is difficult to comprehend various
relationships between cyber objects and physical objects. In
this paper, architectural objects are defined as a super concept
of components and actors..
      </p>
      <p>We propose TORTE, which is a method of modeling IoT
system architectures. In TORTE, architectural objects, their
relationships and their properties are captured in order to model
an IoT system architecture. TORTE maps each relationship
into a corresponding single layer, and widely captures such
intra- and inter-relationships between objects. Each type of
relationship has a respective description space called a layer so
that the complexity can be mitigated even if many relationships
which may be different from each other are defined. A layer
is also placed in an architectural view at an early stage of the
development conforming to the twin peaks model. We present
a novel tool which provides two main features for supporting
TORTE:</p>
      <p>An editor for creating a layered model of an IoT system
architecture using six types of architectural objects and
relationships.</p>
      <p>A verifier for checking the consistency of the model using
logic programming.</p>
      <p>In this paper, we experimentally model an existing farm
monitoring system, which is an IoT system, using the tool.
The monitoring system has various physical objects such as a
camera, solar panel, and battery, and cyber objects such as an
original monitoring service and some SNSs (Social Network
Services). We demonstrate our tool by applying it to the model
of the monitoring system.</p>
      <p>II. DESIGN MODEL FOR IOT SYSTEM ARCHITECTURES
Our architectural model consists of a set of six structural
diagrams in a variant UML class diagram notation. The model
also provides six types of architectural objects (hereafter
simply called objects) shown in Table I and directed relationships
(hereafter simply called relationships) shown in Table II.</p>
      <p>Among these objects, energy suppliers do not often appear
in general software design, but play an important role when we
consider the sustainability and dependability of IoT systems.
In particular, when we design an IoT system under unreliable
energy suppliers, the amount of energy consumption and the
lack of energy should be considered. Therefore, we have
captured energy suppliers as energy objects. Figure 1 shows
a model example and the tool. The tool is introduced in detail
in Section IV. Figure 1(a) shows an example of layers
regarding transmit-data and transmit-energy in the
farm monitoring system. A rectangle, i.e. class, represents an
object and an arrow, i.e. association, represents a relationship.
A string between &lt;&lt; and &gt;&gt;, i.e. stereotype, represents the
type of object or relationship.</p>
      <p>
        An object is defined as an actor or a component of a system
under development (SUD). The UML 2.5 specification [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
defines an actor as follows: “an actor specifies a role played
by a user or any other system that interacts with the subject.”
That is, actors interact with a SUD from the outside and their
capability cannot be changed by the developers of the SUD.
      </p>
      <p>
        Meanwhile, components behave as a part of a SUD and
their capability can be changed by the developers of the SUD.
When use cases and their relationships are given to models, the
models have the aspect of a use case diagram [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Hence, the
models have an architectural view in the twin peaks model [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] when use case models are assumed to be a requirements
view.
      </p>
      <p>
        According to existing research [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] on IoT system
development, relationships have been variously categorized but
are different from each other. Thus, an architectural design
model should have the flexibility to easily accept new
viewpoints, i.e. relationship types. TORTE can easily accept new
viewpoints by adding corresponding layers without affecting
existing layers.
      </p>
    </sec>
    <sec id="sec-3">
      <title>III. MODEL VERIFICATION</title>
      <p>Fig 2 shows the overview of the model verification process.
This research assumes that architectural elements, i.e. objects
and relationships, have common behaviors for each type of
element. For instance, the behaviors include interaction
protocols when controlling, monitoring or transmitting something.
The combinations of such behaviors across different objects
should be verified at an early stage of the design phase. Hence,
our method employs the logic programming language Prolog
for the verification.</p>
      <p>
        According to the ISO/IEC standard of Prolog [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], A
program in Prolog consists of many clauses. Each clause is
categorized into either a fact or a rule. Fact clauses can
be completely generated from model elements in TORTE.
Table III shows the correspondences between model
elements and the resulting fact clauses. Bracketed strings, e.g.
      </p>
      <sec id="sec-3-1">
        <title>Architectural model Generate fact clauses in Prolog and execute the resulting program</title>
      </sec>
      <sec id="sec-3-2">
        <title>Input</title>
      </sec>
      <sec id="sec-3-3">
        <title>Rule clauses in Prolog</title>
      </sec>
      <sec id="sec-3-4">
        <title>Tool to edit and verify the model</title>
      </sec>
      <sec id="sec-3-5">
        <title>Output</title>
      </sec>
      <sec id="sec-3-6">
        <title>Result highlighted on layers</title>
        <p>[name], represent variables which are replaced with model
elements or their properties in the generation. For instance,
a camera object categorized as device is transformed into
object(camera, device).</p>
        <p>Meanwhile, rule clauses pre-defined by TORTE represent
common behaviors using model elements and their properties.
Listing 1 shows the rule clauses excerpted. For instance, the
clause notEnergySupplied(X, Ls) aims to discover whether
there is a path in which an edge, device or energy supplier
cannot receive energy from any power source. When such
a path existed, the objects and relationships in the path are
highlighted with red on the transmit-energy layer. In
this demonstration, we assume that only these types of objects
cannot work without the energy generated in the system. The
clause checkDataTransmission(X) aims to discover the edges
and devices that cannot transmit any data because of lack
of energy. This clause is defined by slightly extending the
clause notEnergySupplied(X, Ls). Thus, various clauses can
be easily created by reusing existing clauses in accordance
with the relationship between layers in order to easily and
variously verify the model. Currently, if users want to extend
rule clauses, knowledge of Prolog is necessary. Therefore, in
future work we plan to establish a method to create a number
of beneficial rule clauses in line with an architectural model.</p>
        <p>A complete program can be generated by combining the
rule and fact clauses mentioned above. The rule clauses are
used for checking whether a certain object can be reached
from another object along the relationships between them on
the basis of their behaviors.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>IV. A TOOL TO EDIT AND VERIFY MODELS</title>
      <p>
        Fig 1(b) shows a tool to edit and verify models created in
TORTE. The tool is implemented in Java and as a software
plug-in for the UML modeling editor Astah* [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Astah*
provides a basic editor for UML diagrams, but adding stereotypes
to each element is laborious and error-prone work.
      </p>
      <p>The editor part of the tool provides the following features:
(1) matrix-based input forms to the set of architectural objects
and to each layer are provided in order to edit object types and
to create relationships including their respective types; (2) six
class diagrams representing their respective layers can be
automatically generated in order to intuitively confirm the result of
inputs; (3) a round trip-engineering function is implemented
in order to guarantee the consistency between inputs to the
editor and the corresponding class diagrams. For instance, an
association and its stereotype represent a relationship and its
type, which correspond to a cell in a matrix-based input form.
When such an association is removed, the corresponding cell
is unchecked automatically.</p>
      <p>
        The verifier part of the tool provides the following features:
(1) fact clauses in Prolog can be automatically generated
from a model in TORTE in order to verify the model; (2)
an input form is provided in order to give a query to the
program; (3) the program is executed by using JIProlog [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ],
a Prolog implementation in Java, as a checker component; (4)
the execution result can be highlighted on the model in order
to give feedback to the developer.
      </p>
    </sec>
    <sec id="sec-5">
      <title>V. PRELIMINARY EVALUATION</title>
      <p>
        As a preliminary evaluation, we applied TORTE to an
architectural model of an existing farm monitoring system
[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. As a result, we confirmed that the tool can output
expected results in some cases. Fig 3 shows an example of
the model highlighted. A problem with this model is that
the charge controller is not connected to the two DC-DC
converters on the transmit-data layer. Elements colored
in red in Fig 3 show the edges, devices and energy suppliers
whose energy cannot be supplied from any power sources, and
the edges and devices that cannot transmit any data because
of lack of energy.
      </p>
    </sec>
    <sec id="sec-6">
      <title>VI. CONCLUSION</title>
      <p>This paper presented TORTE, a method of modeling an
IoT system architecture on the abstraction level of a use case
model, and verifying the model with a logic programming
language. A support tool provides an editor part by extending
an existing UML editor for constructing architectural models,
which describe various relationships and relevant objects in
IoT systems. The tool also provides a verifier part by using
Prolog. As future work, we plan to add beneficial rules to
check on the basis of the failure histories of IoT systems. We
subsequently evaluate TORTE by applying it to various
largescale systems.</p>
    </sec>
    <sec id="sec-7">
      <title>ACKNOWLEDGMENT</title>
      <p>This work was supported by JSPS KAKENHI Grant
Number JP15K00097 and JP17KT0043, and the
Telecommunications Advancement Foundation.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>B.</given-names>
            <surname>Nuseibeh</surname>
          </string-name>
          , “
          <article-title>Weaving together requirements and architectures</article-title>
          ,” Computer, vol.
          <volume>34</volume>
          , no.
          <issue>3</issue>
          , pp.
          <fpage>115</fpage>
          -
          <lpage>117</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Cleland-Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. S.</given-names>
            <surname>Hanmer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Supakkul</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Mirakhorli</surname>
          </string-name>
          , “
          <article-title>The twin peaks of requirements and architecture</article-title>
          ,
          <source>” IEEE Software</source>
          , vol.
          <volume>30</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>24</fpage>
          -
          <lpage>29</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>E.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Giorgini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Maiden</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Mylopoulos</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Fickas</surname>
          </string-name>
          ,
          <article-title>Modeling Strategic Relationships for Process Reengineering</article-title>
          . MIT Press,
          <year>2011</year>
          , pp.
          <fpage>11</fpage>
          -
          <lpage>152</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>A. van Lamsweerde</surname>
          </string-name>
          and
          <string-name>
            <given-names>L.</given-names>
            <surname>Willemet</surname>
          </string-name>
          , “
          <article-title>Inferring declarative requirements specifications from operational scenarios</article-title>
          ,
          <source>” IEEE Transactions on Software Engineering</source>
          , vol.
          <volume>24</volume>
          , no.
          <issue>12</issue>
          , pp.
          <fpage>1089</fpage>
          -
          <lpage>1114</lpage>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Object</surname>
            <given-names>Management Group.</given-names>
          </string-name>
          (
          <year>2015</year>
          )
          <article-title>Unified modeling language</article-title>
          . (Accessed:
          <fpage>2016</fpage>
          -10-04). [Online]. Available: http://www.omg.org/spec/UML/2.5/
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>E. S. K.</given-names>
            <surname>Yu</surname>
          </string-name>
          , “
          <article-title>Towards modeling and reasoning support for early-phase requirements engineering</article-title>
          ,”
          <source>in Proceedings of the 3rd IEEE International Symposium on Requirements Engineering</source>
          , ser.
          <source>RE '97</source>
          ,
          <year>1997</year>
          , pp.
          <fpage>226</fpage>
          -
          <lpage>235</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7] (
          <year>2015</year>
          )
          <article-title>Industrial internet reference architecture version 1.7</article-title>
          . (Accessed:
          <fpage>2016</fpage>
          -07-27). [Online]. Available: http://www.iiconsortium.org/IIRA-1
          <article-title>- 7-ajs</article-title>
          .pdf
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>L.</given-names>
            <surname>Atzori</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Iera</surname>
          </string-name>
          , and G. Morabito, “
          <article-title>The internet of things: A survey,” Computer Networks</article-title>
          , vol.
          <volume>54</volume>
          , no.
          <issue>15</issue>
          , pp.
          <fpage>2787</fpage>
          -
          <lpage>2805</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>P.</given-names>
            <surname>Patel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Morin</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Chaudhary</surname>
          </string-name>
          , “
          <article-title>A model-driven development framework for developing sense-compute-control applications</article-title>
          ,”
          <source>in Proceedings of the 1st International Workshop on Modern Software Engineering Methods for Industrial Automation</source>
          ,
          <year>2014</year>
          , pp.
          <fpage>52</fpage>
          -
          <lpage>61</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <source>[10] “Information technology - Programming languages - Prolog - Part</source>
          <volume>1</volume>
          :
          <string-name>
            <surname>General</surname>
            <given-names>core</given-names>
          </string-name>
          ,” International Organization for Standardization, Standard,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Change</surname>
            <given-names>Vision</given-names>
          </string-name>
          , Inc. astah professional. [Online]. Available: http://astah.net/
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>U.</given-names>
            <surname>Chirico. JIProlog. (Accessed</surname>
          </string-name>
          :
          <fpage>2016</fpage>
          -11-18). [Online]. Available: http://www.jiprolog.com/
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>K.</given-names>
            <surname>Kobayashi</surname>
          </string-name>
          and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Saito</surname>
          </string-name>
          , “
          <article-title>Development of hand framing camera for field monitoring</article-title>
          ,”
          <source>in Proc. of EFITA-WCCA-CIGR Conference</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>K.</given-names>
            <surname>Kobayashi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Fujikawa</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Saito</surname>
          </string-name>
          , “
          <article-title>Monorail-based monitoring system for multipoint field observation</article-title>
          ,”
          <source>in Proceedings of the 2014 International Workshop on Web Intelligence and Smart Sensing</source>
          ,
          <year>2014</year>
          , pp.
          <volume>8</volume>
          :
          <fpage>1</fpage>
          -
          <issue>8</issue>
          :
          <fpage>2</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>