<!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>DAWN for component based systems - just a different perspective -</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Ekkart Kindler Universität Paderborn, Institut für Informatik</institution>
          ,
          <addr-line>D-33095 Paderborn</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>DAWN is technique for modelling and verifying network algorithms, which is based on Petri nets and temporal logic. In this paper, we present a different perspective of DAWN that allows us to use it for verifying component bases systems by modelling components and their interaction independently of each other. In a nutshell, a component based system consist of components which interact with each other. Each component encapsulates some kind of service. A component based system is built by combining and interconnecting the components. Therefore, the component based approach supports reusability and flexibility - the implementations of the individual components are independent from the overall structure (architecture) of the system. For modelling a component based system, we need to model the behaviour of the individual components as well as their interaction. For modelling the components, there is a huge variety of formalisms: starting from programming languages such as Java, via modelling formalism such as State Charts [Har87], to more theoretical models such as process algebras [Mil89] or Petri nets. The interaction among the components is defined by architecture description languages (ADL), which, basically, identify the used components and how they are interconnected. Most of these languages were defined for automatically compiling a component based system from the components and the architecture definition, and for deploying it to a distributed hardware. Some languages, however, support the analysis of component based systems. For example, DARWIN [MDEK95] has an operational semantics, which is defined in terms of the π-calculus [MPW92]. In this paper, we show how to use the Distributed Algorithms Working Notation (DAWN) [WWV+97, Rei98] for modelling and for verifying component based systems. Originally, DAWN was designed for modelling and verifying network algorithms. But, the underlying techniques are ready made for component bases systems, which will be demonstrated in this paper.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>The components will be modelled by algebraic Petri nets and the architecture will be
defined by giving a topology for the interconnected components. Given these two parts,
we get an overall model of the component based system. Then, we can use the techniques
of DAWN for verifying the resulting component based system. For example, we can use
model checking for proving some properties. In some cases, we can show even for a class
of architectures that all the resulting systems are correct.</p>
      <p>In this paper, we cannot present this approach in full detail. We will present only the
basic idea of DAWN and the different perspective that makes it work for modelling and
verifying component based systems: a concrete system can be modelled in two separate
parts: the component models and the system architecture. A component model defines
the behaviour of a particular type of component. The system architecture defines how the
different components interact with each other in a concrete system. Using phrases from
software development, modelling components corresponds to programming in the small,
whereas defining the system architecture corresponds to programming in the large.
Of course, there are many other aspects in component bases software such as reusability
and separation of services from their implementation. These aspects are not covered in this
paper. Here, we focus on the underlying mathematics of component models, architectures
and the resulting systems, which will be presented by the help of a simple example.
2</p>
    </sec>
    <sec id="sec-2">
      <title>The Example</title>
      <p>As an example, we consider a simple algorithm for the calculation of a communication
tree for a network of components such that each component has a minimal distance to
some distinguished components, which are called root components. The other components
are called inner components. So, there are two different kinds of components, which will
be discussed below. We assume that the components are connected by a communication
network, which will be discussed later.</p>
      <p>The component models The behaviour of a root component x is quite simple. A root
component sends a message to all components that are immediately connected to it. These
components are called its neighbours. In this message, component x tells each neighbour
component ni, that ni has distance 1 to a root, if ni chooses x as its connection to a root.
Figure 1 shows a model of the root component. It is a Petri net1, where the place init of x
is initially marked. As usual in object oriented programming languages, the place init of
component x is denoted by x.init. There is only one transition, which adds one token to
the interface place message of each neighbour ni of x. Note that the token representing
the message is not the usual black token, but a structured token (x, 1), which represents the
contents of the message; the first element x of (x, 1) represents the root’s identity x, the
1Strictly speaking, this is not a Petri net because of the ‘dots’ in it and because of the dashed arcs, which do not
have a meaning in Petri nets. We will use this notation for denoting the interface of a component, which defines
the possible interconnections to other components. For simplicity, we present the interface of a component and
its implementation in a single model; but, this could be easily separated from each other.</p>
      <p>x.init</p>
      <p>Abbildung 1: The root component x
[(x,1)]
[(x,1)]
nk.message
second element represents the distance information for this neighbour. Up to now, we are
considering each component separately. Hence, we do not know its concrete neighbours
n1, . . . , nk when modelling the component. Therefore, we represent the corresponding
arcs by dashed arrows, and some dots indicate that there can be several neighbours. The
meaning of this is that, once we have define the architecture, each concrete instance of this
component will be connected to the corresponding message places2 of its neighbours.
Next, we model the behaviour of an inner component3 x. The inner component x waits
for arriving messages. When it identifies a message from a better candidate for a parent
(i. e. a candidate with a shorter distance to a root component), it chooses this candidate
and stores this candidate along with its distance in its place parent. Initially, there is a
token (⊥, ω), where ⊥ denotes a not yet defined parent component and ω denotes infinity.
Figure 2 shows the model of the inner component. The transition waits for a message
x.message
[(y,n)]
n &lt; m
[(x,n+1)]
[(x,n+1)]
[(z,m)]</p>
      <p>[(y,n)]
[( ,w)]
x.parent
n1.message
nk.message</p>
      <sec id="sec-2-1">
        <title>Abbildung 2: The inner component x</title>
        <p>2Maybe, there are more appropriate notations for this. But, notation is an issue that strongly depends on the
application area. Therefore, we concentrate on the underlying concepts in this paper.</p>
        <p>3Note, that we use the same identifier x for the inner component as for the root component. The reason is
a convention that always uses x for the component currently under consideration. We will see later on, that
this convention gives us a simple transformation for obtaining the overall model of a component based system.
Object oriented programmers may consider x as a key word like this or self in object oriented programming
languages.
from some other agent y with a distance n that is less than its current distance m. This
condition is represented by the transition guard n &lt; m. In that case, the transition updates
y as its new parent node with distance n in place parent. Moreover, it sends a message
(x, n + 1) to all its neighbours n1, . . . , nk. This message tells each neighbour that it could
have distance n + 1 from a root, if it chooses x as its neighbour. Sending these messages is
modelled in the very same way as in the root component. Note that the place message of
an inner component is drawn with a bold face line. This indicates that this is an interface
place on which other components may produce tokens.</p>
        <p>Note that an inner component will never read or remove a message with a distance n that
is worse than its current distance. This does not do any harm to our model, but it is a
little sloppy. It would be easy to add another transition that removes these messages. For
simplicity, however, we omit this transition from our considerations.</p>
        <p>The architecture In our example, the architecture of a system is defined by a number
of instances for each component and by their interconnection. This can be represented by
simple a graph as shown in Fig. 3: There is one root component a and there are three inner
components b, c, and d, which are connected in a ring. From this graph, we can easily
construct the corresponding system. This is shown in Fig. 4, where we omit the names of
places and the annotations of arcs for simplicity.</p>
        <p>Analysis and verification Now, we could analyse or verify this concrete Petri net model.
But actually, we can do much better: We can analyse and verify properties for all possible
systems that can be built from the components. This is where DAWN comes in. First of
all, we fold the concrete net from Fig. 4 to a single algebraic Petri net. This algebraic
Petri net is shown in Fig. 5. Note that there are only three places init, messages, and
parent for all components now. In order to distinguish the identity of the components,
we add a first element to each token, which identifies the component to which it belongs.
Likewise, the labels of the arcs are equipped with a first element, which identifies the
involved component when the transition fires. This first element is the variable x for all
ingoing arcs of a transition. For the outgoing arcs to place message, it is the component to
which a message is sent. The symbol R represents the root agent, the symbol I represents
the initially undefined parents of the agents b, c, and d, and the function N represents the
way, messages are passed on to other components. Note that the interpretation of these
symbols comes from the architecture definition only.</p>
        <p>It turns out, that the net itself is the same for all systems built from the components root
and inner. The only part that changes is the definition of the meaning of the symbols R,
I, and N . For each architecture definition, these symbols receive a new interpretation.
Thus, the algebraic net form Fig. 5 along with the different interpretations of the symbols
according to the architecture definition language, captures all systems that can be built
from the components. What is more, DAWN provides techniques for verifying all these
systems once and for all (architectures). The net from Fig. 5, for example, was verified in
[KR97] – though not obtained from the component based approach.</p>
        <p>Altogether, there are two ways of verification. On the one hand, we can verify a single
a: root
b: inner</p>
        <p>c: inner
d: inner</p>
      </sec>
      <sec id="sec-2-2">
        <title>Abbildung 3: The architecture</title>
        <p>a: root
c: inner
b: inner
d: inner</p>
      </sec>
      <sec id="sec-2-3">
        <title>Abbildung 4: The system</title>
        <p>init
R
[x]</p>
        <p>N(x,1)
message [(x,y,n)]
Where: N(a,n) = [ (b,a,n), (c,a,n) ]
N(b,n) = [ (d,b,n) ]
N(c,n) = [ (d,c,n) ]
N(d,n) = [ (b,d,n), (c,d,n) ]
R = [ a ]
I = [ (b, ,w), (c, ,w), (d, ,w)]
N(x,n+1)
[(x,z,m)]</p>
        <p>[(x,y,n)]
n &lt; m</p>
        <p>I
parent</p>
      </sec>
      <sec id="sec-2-4">
        <title>Abbildung 5: The corresponding algebraic Petri net</title>
        <p>concrete system, which is defined in terms of component models and a single architecture.
Since models uniquely define a system, we can use model checking for doing automatic
verification. On the other hand, we can do verification for a class of architectures (e. g.
for all rings or for all fully connected graphs, etc.). To this end, we can use the support of
automated theorem provers.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>In this paper, we have illustrated how to model components and how to build systems
from components by defining an architecture. The underlying techniques themselves are
not new. Therefore, we did not formalize them, here. DAWN and its verification
techniques have been introduced in [KR96, WWV+97, Rei98]. The particular interpretation of
x in the first element of the arc labels has been proposed by Desel [Des97] and has been
further developed for modelling different communication paradigms [DK98, DK01].
The main contribution of this brief note is a new perspective that allows us to use these
techniques for modelling and verifying component bases systems. Since the end model is
the very same as in DAWN, we can use the very same techniques for doing all kinds of
analysis and verification. We can use model checking for individual systems, which can
be done fully automatically. Or we can use theorem provers for verifying properties for a
complete class of architectures.</p>
      <p>Obviously, the presented example is quite simple. In practice, architecture description
languages are much richer. A careful investigation of a complete ADL with all its features
is subject to future research and part of ongoing research. Moreover, a more detailed
investigation of reusability of components in this setting needs further attention; we believe
that classical Petri net results on refinement and abstraction can be reused to deal with this
issue.</p>
    </sec>
    <sec id="sec-4">
      <title>Literatur</title>
      <p>[Des97]
[DK98]
[DK01]</p>
      <p>Jörg Desel. How distributed algorithms play the token game. In Foundations of
Computer Science: Potential – Theory – Cognition, LNCS 1337. Springer, 1997.
Jörg Desel and Ekkart Kindler. Proving Correctness of Distributed Algorithms Using
High-Level Petri Nets – A Case Study. In 1998 International Conference on
Application of Concurrency to System Design, pages 177–186, Fukushima, Japan, March 1998.
IEEE Computer Society Press.</p>
      <p>Jörg Desel and Ekkart Kindler. Petri nets and components – Extending the DAWN
approach. In D. Moldt, editor, Workshop on Modelling of Objects, Components, and
Agents, pages 21–35, August 2001.
[KR96]</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [KR97]
          <string-name>
            <given-names>David</given-names>
            <surname>Harel</surname>
          </string-name>
          .
          <article-title>Statecharts: A Visual Formalism for Computer Systems</article-title>
          .
          <source>Science of Computer Programming</source>
          ,
          <volume>8</volume>
          (
          <issue>3</issue>
          ):
          <fpage>231</fpage>
          -
          <lpage>274</lpage>
          ,
          <year>June 1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>Ekkart</given-names>
            <surname>Kindler</surname>
          </string-name>
          and
          <string-name>
            <given-names>Wolfgang</given-names>
            <surname>Reisig</surname>
          </string-name>
          .
          <article-title>Algebraic System Nets for Modelling Distributed Algorithms</article-title>
          .
          <source>Petri Net Newsletter</source>
          ,
          <volume>51</volume>
          :
          <fpage>16</fpage>
          -
          <lpage>31</lpage>
          ,
          <year>December 1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>Ekkart</given-names>
            <surname>Kindler</surname>
          </string-name>
          and
          <string-name>
            <given-names>Wolfgang</given-names>
            <surname>Reisig</surname>
          </string-name>
          .
          <article-title>Verification of Distributed Algorithms with Algebraic Petri Nets</article-title>
          . In C. Freksa,
          <string-name>
            <given-names>M.</given-names>
            <surname>Jantzen</surname>
          </string-name>
          , and R. Valk, editors,
          <source>Foundations of Computer Science: Potential - Theory - Cognition</source>
          , LNCS
          <volume>1337</volume>
          , pages
          <fpage>261</fpage>
          -
          <lpage>270</lpage>
          . Springer,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [MDEK95]
          <string-name>
            <given-names>Jeff</given-names>
            <surname>Magee</surname>
          </string-name>
          , Naranker Dulay, Susan Eisenbach, and
          <string-name>
            <given-names>Jeff</given-names>
            <surname>Kramer</surname>
          </string-name>
          .
          <article-title>Specifiying Distributed Architectures</article-title>
          .
          <source>In Fifth European Software Engineering Conference, ESCE '95, LNCS 989</source>
          , pages
          <fpage>137</fpage>
          -
          <lpage>153</lpage>
          . Springer,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [Mil89] [MPW92] [Rei98]
          <string-name>
            <given-names>Robin</given-names>
            <surname>Milner</surname>
          </string-name>
          . Communication and Concurrency. International Series in Computer Science. Prentice Hall,
          <year>1989</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>Robin</given-names>
            <surname>Milner</surname>
          </string-name>
          , Joachim Parrow, and
          <string-name>
            <given-names>David</given-names>
            <surname>Walker</surname>
          </string-name>
          .
          <article-title>A Calculus of Mobile Processes (Parts I &amp; II)</article-title>
          .
          <source>Information and Computation</source>
          ,
          <volume>100</volume>
          (
          <issue>1</issue>
          ):
          <fpage>1</fpage>
          -
          <lpage>40</lpage>
          &amp;
          <fpage>41</fpage>
          -
          <lpage>77</lpage>
          ,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <given-names>Wolfgang</given-names>
            <surname>Reisig</surname>
          </string-name>
          .
          <article-title>Elements of Distributed Algorithms - Modeling and Analysis with Petri Nets</article-title>
          . Springer,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [WWV+97]
          <string-name>
            <given-names>M.</given-names>
            <surname>Weber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Walter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Völzer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Vesper</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Reisig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Peuker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Kindler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Freiheit</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Desel</surname>
          </string-name>
          . DAWN:
          <article-title>Petrinetzmodelle zur Verifikation Verteilter Algorithmen</article-title>
          .
          <source>Informatik-Bericht</source>
          <volume>88</volume>
          ,
          <string-name>
            <surname>Humboldt-Universität</surname>
          </string-name>
          zu Berlin,
          <year>December 1997</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>