<!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>Constructing Petri Net Transducers with PNTe ooL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Markus Huber</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Robert Lorenz</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science University of Augsburg</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <fpage>339</fpage>
      <lpage>341</lpage>
      <abstract>
        <p>This poster presents a tool for the modular construction of Petri net transducers by means of several composition operations as for example union, concatenation, closure, parallel and synchronous product and language composition. There are exports to PNML and several graphical output formats. For the implementation, we use the SNAKES framework, which is a Python library supporting the rapid prototyping of new Petri net formalisms and provides many basic Petri net components and functionality. In the context of our research activities, PNTe ooL serves as a scientific prototype for the development of an open library openPNT of efficient algorithms for the construction, composition, simulation and optimisation of PNTs which can be used in real world examples.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>N1</p>
      <p>N2
(a) A transducer N1 and a generator N2.</p>
      <p>(b) Parallel product of N1 and N2 after tI has fired.</p>
      <p>
        In Figure 1 one can see on the left side two simple PNTs called N1 and N2. Like for
weighted FSTs input symbols, output symbols and weights are annotated to the
transitions. So the transition of N1 reads the symbol a and writes the symbol x (with weight
0.5) – thus N1 translates the word a into the word x (with weight 0.5). The symbol e
is used to denote empty input or output. So the PNT N2 is a generator which produces
the word y. The weights are elements of an algebraic structure called bisemiring [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
which extends semirings by an additional operation. Thus, a bisemiring a set equipped
      </p>
      <p>
        PNSE’14 – Petri Nets and Software Engineering
with three operations, namely addition, sequential multiplication and parallel
multiplication, satisfying certain consistency properties (for example the existence of neutral
elements). Addition is used to combine the weights of alternative LPO-runs of a PNT,
sequential multiplication of weights is used for sequentially composed LPOs and the
weights of parallel composed LPOs are parallel multiplied. In the examples we use the
extended Viterbi semiring ([
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ], max, ·, min).
      </p>
      <p>
        As for FSTs there exist composition operations for combining simple transducers to
more complex ones. For example, Figure 1 shows on the right side the parallel product
of the PNTs – an operation which does not exist for FSTs. In figures, we omit
annotations of the form e :e /1 where 1 is the neutral weight w.r.t. sequential and parallel
multiplication. The PNT realises the translation from the word a into the LPO w=xky
where k denotes the parallel composition of LPOs. There are more operators defined for
PNTs namely concatenation, union, closure, synchronous product and language
composition of PNTs [
        <xref ref-type="bibr" rid="ref2 ref3">3,2</xref>
        ]. In Figure 2 on the right side the language composition of the
PNT N3 on the left side with the PNT shown on the right side of Figure 1 is illustrated.
Here, a transition from the first PNT is merged with a transition from the second PNT,
if the output of the first transition equals the input of the second one. The weight of the
merged transition labelled r, t3 is computed from the weights of the transitions labelled
r and t3 using sequential multiplication.
      </p>
      <p>
        Note that PNTs are defined to always have a single source place which holds exactly
one token at the initial state. Furthermore a PNT has a single sink place and per
definition only such LPO-runs are considered, which lead to a state where exactly the sink
place is marked by one token (the final state). Each LPO-run translates an LPO over
input symbols into an LPO over output symbols via a projection onto input symbols
resp. output symbols [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        For such a formalism to be useful one needs a tool where PNTs can be implemented,
analysed, combined, simulated, drawn and the like. Since the PNT-formalism is new we
decided to start PNTe ooL. We use the SNAKES framework [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] which is a Python library
supporting the rapid prototyping of new Petri net formalisms and provides many basic
Petri net components and functionality. Therefore we implemented PNTe ooL as a Python
library extending SNAKES such that we essentially can use all the functionality already
provided by SNAKES. All graphics in this paper were generated by PNTe ooL.
      </p>
      <p>The support of graphical output serves as a possibility to check the implementation
and as a handy utility in the process of writing scientific papers. PNTe ooL’s functionality
supports fast construction of concrete example PNTs for case studies. PNML export can
be used to analyse constructed example PNTs with other Petri net tools. In the context
of our research activities, PNTe ooL serves as a scientific prototype for the development
of an open library openPNT of efficient algorithms for the construction, composition,
simulation and optimisation of PNTs which can be used in real world examples.</p>
      <p>PNTe ooL can be downloaded as a ZIP-archive from our website www.informatik.
uni-augsburg.de/EduCoSci/PNTooL. Assumed you have a working
installation of Python, SNAKES, Graphviz, and dot2tex you only need to copy the py-files
into the plugins sub-directory of your SNAKES installation.
x:a/0.25</p>
      <p>r
(a) A simple PNT N3.</p>
      <p>pI
t1
p2
p1
p3
(b) Language composition N3 (N1 k N2).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>R.</given-names>
            <surname>Lorenz</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Huber</surname>
          </string-name>
          .
          <article-title>Petri net transducers in semantic dialogue modelling</article-title>
          . In M. Wolff, editor,
          <source>Proceedings of ”Elektronische Sprachsignalverarbeitung (ESSV)”</source>
          , volume
          <volume>64</volume>
          of Studientexte zur Sprachkommunikation, pages
          <fpage>286</fpage>
          -
          <lpage>297</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>R.</given-names>
            <surname>Lorenz</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Huber</surname>
          </string-name>
          .
          <article-title>Realizing the Translation of Utterances into Meanings by Petri Net Transducers</article-title>
          . In P. Wagner, editor,
          <source>Proceedings of ”Elektronische Sprachsignalverarbeitung (ESSV)”</source>
          , volume
          <volume>65</volume>
          of Studientexte zur Sprachkommunikation, pages
          <fpage>103</fpage>
          -
          <lpage>110</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>R.</given-names>
            <surname>Lorenz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Huber</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Wirsching</surname>
          </string-name>
          .
          <article-title>On weighted Petri Net Transducers</article-title>
          .
          <source>In Proccedings of ”35th International Conference on Application and Theory of Petri Nets and Concurrency”, Lecture Notes in Computer Science</source>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>F.</given-names>
            <surname>Pommereau</surname>
          </string-name>
          .
          <article-title>The SNAKES toolkit</article-title>
          . https://www.ibisc.univ-evry.fr/ ~fpommereau/SNAKES/,
          <year>11 2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>