<!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>Coordination Rules Generation from Coloured Petri Net Models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Adja Ndeye Sylla</string-name>
          <email>AdjaNdeye.sylla@cea.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maxime Louvel</string-name>
          <email>maxime.louvel@cea.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>François Pacull</string-name>
          <email>francois.pacull@cea.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Univ. Grenoble Alpes</institution>
          ,
          <addr-line>CEA, LETI, MINATEC Campus, F-38054 Grenoble</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper presents an environment to automatically generate coordination rules from coloured Petri nets models. Today's systems such as building automation or industrial control processes are composed of many heterogenous and interacting components. These interactions raise problems such as data sharing and concurrent accesses. Coordination models and languages [4] are essential to provide a simple way to handle these interactions. LINC [3] is a rule based coordination environment. It is used to develop and deploy distributed applications. A LINC application is a set of rules enacted in distributed rule engines. LINC relies on powerful mechanisms such as transactions to ensure the normal execution of a rule. However, this does not prevent from writing conflicting rules. Currently, these conflicts are detected at execution time, when bugs are observed.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The proposed approach consists in generating LINC rules from coloured Petri
Net (CPN) models [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. An application is first modelled using CPNs. This helps
exchanges among all team members. Then the refined CPNs are verified to avoid
undesired behaviours. Finally, the corresponding LINC rules are automatically
generated and directly executed by LINC.
      </p>
      <p>
        An application developed using LINC is a set of rules manipulating resources
in several bags (bags are a distributed associative memory [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]). A resource is a
tuple of strings and is manipulated using three operations: rd, get, and put
to respectively verify the presence of resources, consume and insert resources. A
rule consists of a precondition (i.e. verification of conditions) and a performance
(i.e. actions to perform, atomically when the conditions are verified). To enable
the automatic generation of LINC rules, we limit the colours. Colours defining
states of the system are enumeration. Other tokens are tuples of strings.
      </p>
      <p>To generate the rules, we define a transformation to move from CPN to LINC
rules (Table 1a). Tokens in places are mapped to resources in bags. A transition
is mapped to a performance. Indeed they both verify conditions and atomically</p>
      <p>PNSE’15 – Petri Nets and Software Engineering
perform actions. An arc is mapped to an operation: both direction to rd, place
to transition to get and transition to place to put. In LINC rule, the
precondition explicitly specifies that the performance is triggerable when the specified
resources are present. This is implicit in a CPN (i.e. a transition is enabled as
soon as the specified tokens are present). Thus precondition is generated using
the incoming arcs of a transition. To enable the graphical representation and the
verification of LINC applications which were manually developed, we define the
reverse transformation to move from LINC rules to CPN (Table 1b).
Coloured Petri net LINC rule
Token Resource
Place Bag
Transition Performance
Arc Operation
orientation type
Arcs incoming in a transition Precondition
LINC Coloured Petri net
Resource Token
Bag Place
Operation Arc
type orientation
Performance Transition</p>
      <p>Precondition Implicit in CPN
(a) CPN model to LINC model</p>
      <p>(b) LINC model to CPN model</p>
      <p>Verification of CPN is limited in existing tools. Thus a CPN is first
transformed to a PN by unrolling the colours with enumeration. Other places are
left as is. Then, the generated PN is verified using existing model checkers. This
enables to verify undesired behaviours such as deadclok and livelock.
3</p>
    </sec>
    <sec id="sec-2">
      <title>Conclusion</title>
      <p>This paper has presented a method to automatically generate rules from
validated Coloured Petri Nets. CPNs verification ensures the global behaviour and
LINC ensures that each step is actually executed according to the CPN. Hence
distributed applications can safely be executed in actual distributed and
embedded systems. This has been validated in a smart parking solution including
several off-the-shelves hardware and software components.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>N.</given-names>
            <surname>Carriero</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Gelernter</surname>
          </string-name>
          . Linda in context.
          <source>Commun. ACM</source>
          ,
          <year>1989</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>K.</given-names>
            <surname>Jensen</surname>
          </string-name>
          .
          <article-title>Coloured Petri nets: basic concepts</article-title>
          ,
          <source>analysis methods and practical use. Springer Science &amp; Business Media</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M.</given-names>
            <surname>Louvel</surname>
          </string-name>
          and
          <string-name>
            <given-names>F.</given-names>
            <surname>Pacull</surname>
          </string-name>
          .
          <article-title>Linc: A compact yet powerful coordination environment</article-title>
          .
          <source>In Coordination Models and Languages</source>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>G.</given-names>
            <surname>Papadopoulos</surname>
          </string-name>
          and
          <string-name>
            <given-names>F.</given-names>
            <surname>Arbab</surname>
          </string-name>
          .
          <article-title>Coordination models and languages</article-title>
          . Advances in computers,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>