<!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>Petri Nets-Based Development of Dynamically Reconfigurable Embedded Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Tom´aˇs Richta</string-name>
          <email>irichta@fit.vutbr.cz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vladim´ır Janouˇsek</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Radek Koˇc´ı</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Brno University of Technology, Faculty of Information Technology, IT4Innovations Centre of Excellence Boˇzetˇechova 2</institution>
          ,
          <addr-line>612 66 Brno</addr-line>
          ,
          <country>The Czech Republic</country>
        </aff>
      </contrib-group>
      <fpage>203</fpage>
      <lpage>218</lpage>
      <abstract>
        <p>This paper deals with the embedded systems construction process based on the system specification modeled as a set of Petri nets. Modeling of the system starts with Workflow Petri Nets specification describing the main modules and processes within the system. Workflow model is then transformed to the multilayered Reference Nets structure, that is finally used for the code generation of the target system. The main goal of our approach is to provide for dynamic reconfigurability of the system deployment according to the changes within its specification. Dynamic reconfigurability means the possibility of system changes within its runtime. This is achieved by the decomposition of the whole functionality of the system to small interpretable pieces of computation. This approach also introduces several layers of reconfigurability using different translation rules operating on each layer. The heart of the system lies within the reference nets hosting platform called Petri Nets Operating System (PNOS) that includes the Petri Nets Virtual Machine (PNVM) that performs the very Reference Nets interpretation.</p>
      </abstract>
      <kwd-group>
        <kwd>workflow modeling</kwd>
        <kwd>reference nets</kwd>
        <kwd>embedded systems</kwd>
        <kwd>modelbased software engineering</kwd>
        <kwd>code generation</kwd>
        <kwd>model transformation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Control systems are important border technology lying between the physical
and information world. The whole control process is described as a control loop
that consists of reading data from sensors and triggers a number of actuators
installed within the physical environment controlled by the system. Most of the
control systems are constructed using a set of programmable logic controllers
with appropriate suitable software installation. At a higher level of abstraction,
programmable logic controller and its software installation could be seen as an
embedded system. In this paper the considered target platform for system
installation is set of minimalistic and low energy consumption hardware devices,
e.g. Atmel microcontrollers equipped with wireless transmission modules that
are often used within Wireless Sensor Networks (WSN).</p>
      <p>A control system implementation could be divided into the hardware and
software part. The hardware part starts with selection of the proper set of
modules and its installation within the physical environment, including the sensors
and actuators attachment. When there are multiple controllers, the hardware
part must also take into account the communication among them. The software
part then follows with the programming and installation of each control unit
with appropriate application that controls hardware. The main purpose of this
paper is to describe the software part of this construction process with the focus
on dynamic reconfigurability of the resulting system using executable models
and model continuity approach. The reconfigurability is necessary for the ability
of the system to adapt itself to changes in environment and also to enable the
system maintainer with the possibility to change the system behavior without
the necessity of its complete destruction and reconstruction.</p>
      <p>
        Because there is strong demand on proper coverage of the system complexity
at the beginning of the construction process, there is a need for suitable
description tools that preserve the user requirements semantics. During the system
lifetime there are also strong demands on its dynamic reconfiguration according
to the new requirements and also according to the changes within the physical
environment. The dynamic system specification change and following
reconfiguration requirements are not easy to satisfy. Within this paper we introduce
our solution of the described problem using the Workflow Petri Nets model
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and MULAN-like multilayered Reference Nets control system structure[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ],
which is constructed according to the workflow model and then translated into
the executable form. The system prototype then runs within the target platform
simulator that deduces the requirements for the hardware part of system
installation. The main characteristics of the system - its dynamic reconfigurability
is based on the ability of nets to migrate among places as tokens, which was
inspired by [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The new or modified nets could be sent over another nets to its
target place to change the system behavior. Within our solution, the nets are
maintained by Petri Nets Operating System (PNOS) and interpreted using the
Petri Nets Virtual Machine (PNVM).
      </p>
      <p>Next two sections describe used formalisms and the reconfigurable system
architecture. The following section describes the whole system development
process using a running example, and the last section contains the evaluation and
conclusion.
2
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Formalisms and Tools</title>
      <sec id="sec-2-1">
        <title>Workflow Management</title>
        <p>
          Will van der Aalst defined the way to construct workflow models using Petri
Nets[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. His work is also well formally defined and so the workflow models could
be used for the processes verification and validation purposes. The way of
modeling the system in this way is also similar to the BPMN workflow models, so it
could be easily used by the business process modeling experts. For that reason
we decided to use the YAWL notation[
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] and Workflow Nets formalism[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] in
the beginning of the embedded control system construction process. There are
two main concepts from this theory that we use at the moment - basic
transition categories (AND-split, AND-join, OR-split and OR-join) and the concept
of workflow subprocess.
2.2
The second part of the system construction then consists of the
transformation of Workflow Petri Nets into the multilayered reference Nets model of the
system that comply with the nets-within-nets concept defined by Rudiger Valk
[
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] formalized as Reference Nets[
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. The problem of generating code from
formal specification to the running prototype of target system is mainly based on
the decomposition of the whole net to a set of subnets, which is also called
partitioning problem. For this purpose we use similar concept to the MULAN
architecture defined by Cabac et al.[
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. This architecture divides the model into
four levels of abstraction - infrastructure, agent platform, agents, and protocols.
Our architecture is very similar, we use layers for the infrastructure, platform,
main processes and subprocess. Each of those layers is mapped to the target
platform and the transformation is used for the code generation. The main goal
of the architecture is to enable changes within the system specification during
its run-time. This is mainly achieved by the platform, process and subprocess
abstraction levels that specify the functionality of the system.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Reconfigurable Architecture</title>
      <p>
        Reference Nets allow to construct a system hierarchically, in several levels. Such
an idea is a basis of the MULAN (MultiAgent Nets) architecture developed by
Cabac et al.[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Thanks to the nature of Reference nets, MULAN allows nets
to migrate among places in other nets and thus it is possible to dynamically
modify functionality of system components, specified by this kind of nets [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
We use application-specific main processes and subprocesses, which are hosted
on platform that is considered to be a part of the operating system of the node,
PNOS (Petri Nets Operating System). The multi-layered nature of the system
and responsibilities of particular levels are described in Figure 1.
      </p>
      <p>The main part of the the system is installed over the hardware as a PNOS
kernel with platform net, that are both able to host other nets. Each platform
then hosts some number of main processes nets that hosts subprocesses. The
whole communication is performed by sending messages using serial link. There
is also theoretical possibility for subprocesses to contain other subprocesses etc.
But presented example does not cover this.</p>
      <p>The PNOS contains PNVM (Petri Net Virtual Machine) which interprets
Petri Nets that are installed in the system in the form of a bytecode called Petri
Nets ByteCode (PNBC). PNOS also provides the installed processes with the
access to inputs and outputs of the underlying hardware that are connected</p>
      <p>Subprocesses application bussiness logic</p>
      <p>app. business logic,
Processes install/remove subprocesses,</p>
      <p>send/receive messages and commands</p>
      <p>Plat+form iifnnotsrewtaraallrc/drteimomneowsvseiathgaepHspWltiocaaantpidopnc.oppmrroomcceeussnssiceeasst,,ion
PNOS kernel irneffrearsetnrcuectnuerets, iinntethrperseytastteiomn of all</p>
      <p>
        Hardware icnotmermpruentaictaiotinonofinthfreaswtrhuocletusryes-tepmhysical
to sensors and actuators, and also with the serial communication port that is
connected to the wired or wireless communication module (e.g. ZigBee)[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>The main net (first process) interpreted in PNOS is so called platform net.
Platform net is responsible for interpretation of commands which are read from
buffered serial line. These commands allow to install, instantiate, and uninstall
other Petri nets. The Platform also allows to pass messages to the other
layers, which are responsible for application-specific functionality. Since we need
reconfigurability in all levels, the installation and uninstallation functionality is
implemented in each level.
4</p>
    </sec>
    <sec id="sec-4">
      <title>The Development Process</title>
      <p>
        The whole process of system development is described in Figure 2. It starts with
the specification of the main system workflow and its subprocesses. Resulting
workflow model is then transformed to the layered architecture and might be
further debugged using the Renew reference nets tool [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. After this, the final
set of Reference Nets is translated to Petri Nets ByteCode (PNBC) that is then
used either for the target prototype simulation using SmallDEVS tool [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and
also to be transfered to the nodes of the system infrastructure. Here it serves as
a reconfigurable part of the running system.
      </p>
      <p>
        More detailed description of the whole PNOS architecture and functionality
could be found in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
4.1
      </p>
      <sec id="sec-4-1">
        <title>Running Example</title>
        <p>As a running example, we use a subset of a home automation system. The home
automation is partly based on the optimization of the energy consumption from
multiple sources. There are diverse primary sources of the energy, but within
207</p>
        <p>Graph
transformations</p>
        <p>reference
nets production</p>
        <p>PNML</p>
        <sec id="sec-4-1-1">
          <title>SmallDEVS</title>
          <p>Model
of controlled</p>
          <p>system
Node
PNOS</p>
          <p>PNML</p>
          <p>Work ow model</p>
          <p>initial system speci cation
XSLT</p>
          <p>PNML
+
Renew modeling and debugging inscription Compiler</p>
          <p>PNBC/HEX</p>
          <p>code
translation rules XSLT generation</p>
          <p>Node
PNOS</p>
          <p>Model of
infrastructure</p>
          <p>PNBC
messages</p>
          <p>Infrastructure
Microprocessor messages External Components</p>
          <p>UART
I/O</p>
          <p>ZigBee Ethernet ...</p>
          <p>Native
Code
+</p>
          <p>
            PNBC
our example we concern on the photothermic solar energy panels used for warm
water and heating circuits energy supply. The home automation problem used
as an example is described in more detail in [
            <xref ref-type="bibr" rid="ref9">9</xref>
            ], where also some preliminary
ideas about the system design and code interpretation principles are proposed.
In this paper we present refined and improved version of the design process and
its evaluation.
          </p>
          <p>Home automation process could be described as an workflow model using
the Workflow Petri Nets described previously. Next section shows the workflow
model and its description.
4.2</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>House Workflow Model</title>
        <p>
          Within this section, the workflow model of the part of house automation system
- the photothermic solar panel and hot water storage tank - is described, using
the Workflow Petri Nets defined by Van der Aalst[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. The Figure 3 describes
two swimlines that represent two modules - solar panel and water tank. Each
swimline consists of the main process of the module, that is constructed using
a set of subprocesses. Within the solar panel module, there is a task of sending
data and measure temperature subprocess. In the water tank module, there is
a task of receiving the data and two subprocesses - measure temperature and
adapt settings. Measure data subprocess and the receive task are connected with
the adapt setting subprocess using the OR transition. Particular subprocesses
descriptions are shown in next figures.
measure
        </p>
        <p>send
Water Tank Module</p>
        <p>data
receive
measure
adapt</p>
        <p>In Figure 4 the measure subprocess was modeled also using the Workflow
Petri Nets. It consists of two tasks - reading the data and converting it to the
temperature value. Reading the data means getting the voltage from the
input and the conversion means the necessary calculations to produce the human
readable results.</p>
        <p>Measure Subprocess</p>
        <p>read
delay</p>
        <p>convert</p>
        <p>The other subprocess shown on Figure 5 consists of the task of temperatures
reading and comparing them to use the result for the adequate reaction of the
automation system. If there is higher temperature on the solar panel than within
the water tank, corresponding circular pump is started to move the hot water
form panel to the tank.</p>
        <p>In this way the system specification is basically defined. But there are some
other prerequisites, e.g. we need to know about the technical aspects of reading
and writing the input/output data. This information should be obtained from the
customer and must be included as a part of the PNOS system. At this moment,
these rules are stored in a proprietary format alongside the nets specifications,
Adapt Subprocess
solar temperature
tank temperature
adapt
but in future we plan to add them as a next layer of the system called drivers.
The following section describes the derived four level reference nets architecture,
which is produced from described workflow model. The process of conversion
of workflow model into the multilayered Reference Nets system is done using
some coarsely defined rules, but in future it should be based on formally defined
translation rules.
4.3</p>
      </sec>
      <sec id="sec-4-3">
        <title>Layered Reference Nets Architecture</title>
        <p>The multilayered system architecture derivation starts with the subprocess nets.
In Figure 6 there is the measure subprocess reference net derived from the
measure subprocess. This net is constructed adding the initial and final uplinks and
places. These uplinks serve as a starting and finishing transitions called from the
main process of the module. There are also primitive system functions calls, that
operate directly with the underlying operating system. Resulting value token is
prepared and sent using uplink : output(). All the subprocess protocol nets are
named using the name place and corresponding uplink.</p>
        <p>The solar panel main process described in Figure 7 is derived from the solar
panel swimline in the workflow model. It consists of the place, where all the
subprocess nets are stored and according to their names are called in particular
order. Synchronization place is added between the subprocess protocol nets calls
matching the solar panel main process swimline place. The name of the protocol
net is derived from the name of the workflow subprocess, and it is not necessary
to be human readable.</p>
        <p>The measurement subprocess protocol net has already been described, so
the last net that remains is the settings adaptation subprocess protocol net. It is
described in Figure 8 and communicates with the operating system calling the
proper signals according to the decisions made in transitions.</p>
        <p>The water tank main process reflects the main process in the workflow model.
It calls all the subnets and performs the synchronization of subprocesses using
two temperature places, that are then synchronized within the adapt subprocess.
It is described in Figure 9.</p>
        <p>Above the last net, called infrastructure, there is a part of the underlying
operating system called the platform net that describes the main required
functions of the operating system needed by the application processes installed on
it. The platform net is shown in Figure 10.</p>
        <p>Finally the infrastructure layer, that is derived from the main workflow
process description, is shown in Figure 11. In our example, it is very simple. Each
swimline represents one place, where the module for hosting the platform, main
process and protocols will be placed. The communication between the two
subprocesses seated in different swimlines is represented here as an communication
transition, that should internally call the final transition of the send task, that
means the : output() downlink and the initial transition of the receive task, that
means the : input() downlink. Those transitions are part of the platform layer
and are propagated to the subprocesses nets.
4.4</p>
      </sec>
      <sec id="sec-4-4">
        <title>Code Generation</title>
        <p>Generally, in our approach, each layer of the system can be compiled to target
code independently. There are two possibilities: first - the target code can be the
native code of the controller processor, and second - target code is a bytecode
that is interpreted by some virtual machine. Regardless on the way the code is
generated, all the abstraction levels communicate with each other using uplinks
and downlinks. The difference is, that levels deployed as interpreted bytecode
are more flexible and dynamically changeable than the compiled ones. It is
because such a modification needs a heavy compiler and (possibly) over-the-air
programming of the node, that consumes a lot of energy. On the other hand
it is possible to send the bytecode to the node as data. It thus allows for very
high level of dynamic reconfigurability in the system runtime. E.g. new version
of the measure subprocess is produced, then the corresponding Reference Net is
derived and proper bytecode is generated. Finally the new version of the measure
net is sent to the relevant node, and installed by its platform net.</p>
        <p>
          We currently use the virtual machine and bytecode for all Petri Nets-based
code. The only part which is implemented natively, is the PNOS kernel,
including PNVM [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. The example of bytecode follows. It represents simple net that
reads data from some sensor and produces relevant output (the net is depicted
in Figure 6). In fact, it is a human-readable version of the bytecode. In this
representation, numbers are represented as a text and also some spaces and line
breaks are added. This means that the contents of the code memory is a bit
more condensed. Each byte of the code is either an instruction for PNVM, or
data.
(Nmeasure
(measure)
(arg/raw/val/name)
(Uoutput(val)()(P3(B1)(V1)))
(Uinput(arg)()(Y1(B1)(V1)(I1000)))
(Uname(name)()(P4(B1)(V1)))
(I(O4(B1)(S1)))
(Tread(arg/raw)
(P1(B1)(V1))
(A(:(V2)(r(V1))))
(O2(B1)(V2)))
(Tconvert(raw/val)
(P2(B1)(V1))
(A(:(V2)(/(*(V1)(I625))(I10000))))
(O3(B1)(V2))))
        </p>
        <p>The bytecode contains symbols definitions and places definitions, allowed
by a code for each uplink (U), initialization (I), and each transition (T). Each
transition description consists of preconditions (P), guard (G), action (A) and
postconditions (O), in a form of instructions for the PNVM. Each data element
is a tuple consisting of a type and a value. Variables are declared as a part of
transition code and identified by indexes. When the code of the net template
is loaded to code memory of the PNVM, it is indexed in order to allow PNVM
to quickly access particular parts of the code, especially places declarations,
the uplinks and the transitions code. When the net template is instantiated,
a specific part of runtime memory is allocated according to number of places.
At the same time, the net transitions are scheduled for execution. Execution
of a transition consists of reading its bytecode and attempting to satisfy all
preconditions, downlinks and guards using recursive backtracking algorithm.</p>
        <p>In guards and actions of transitions it is possible to call primitive operations
of the underlying PNOS. Those operations are available in the Reference Nets
inscription language as PNOS.operation, e.g., PNOS.readPort("solar1") reads
data from virtual port named solar1, PNOS.writePort("pump1",100) writes
value to the virtual port named pump1, PNOS.h(m) gets first space-separated
substring from string m, and PNOS.t(m) returns the rest of the string m without
the first substring.</p>
        <p>Those primitive operations are directly mapped to the corresponding
bytecode. We use a subset of the Reference Nets inscription language here. It works
only on integers and strings as values with corresponding set of basic operations.</p>
        <p>
          The important feature of the system is its reconfigurability. It is based on
operations of the operating system that are designated for manipulations with
nets (in the form of PNBC) and their instances. Nets could be sent to a node as a
part of the command for its installation. The command is executed by Platform
net. Using other commands, the platform can instantiate a net, pass a command
to it, destroy a net instance and unload a net template - see Figure 10. The
PNOS Platform functionality is described in more detail in [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ].
4.5
        </p>
      </sec>
      <sec id="sec-4-5">
        <title>Simulation in SmallDEVS</title>
        <p>
          PNOS-based nodes can be simulated in SmallDEVS environment [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], together
with simulation models of sensors and actuators connected to the controlled
physical process, as well as with simulation model of communication
infrastructure. While Renew is used for application business logic debugging, SmallDEVS
is used for realistic simulation of the system with its surroundings. Execution
steps delays are incorporated to the simulation model in order to make
simulation as realistic as possible. Statistics gathered from simulation experiments can
be used for verification purposes and also can support decisions about type of
hardware for target system implementation. Hardware-In-the-Loop simulation
is also possible.
5
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Evaluation</title>
      <p>For the testing purposes we use the Arduino and Raspberry Pi hardware
platforms with XBee modules for wireless communication. The Arduino is enabled
with the ATmega328P chip that introduces some important restrictions to the
implementation. The main one is the 2kB SRAM memory that makes extensive
use of direct Petri Nets interpretation very difficult. There is a strong limitation
for the number of nets and also for the complexity of problems solved. For that
purposes we consider now for further testing of the system to use the Raspberry
Pi platform, that offer much more memory for the interpretation purposes. The
energy consumption of the ARM could be reduced by underclocking, that is part
of our future work plans.</p>
      <p>PNVM/PNOS prototype has been implemented in Smalltalk. The
implementation resembles the way how it will be implemented in pure C language in order
to make final implementation easy. Up to now, we do not have C implementation
ready, because we are still doing minor improvements to the reference Smalltalk
version. Nevertheless, the automated generation of C version of PNVM/PNOS
is planned for very near future.</p>
      <p>With the hardware limitations in mind, we have tested the PNVM/PNOS
prototype with a model containing the platform net and other three simple nets
(9 transitions in all nets), that are loaded and instantiated successively. The
code of nets occupies 718 B, 679 B, 147 B, and 115 B, what is 1659 B of total
used memory for code. The simulation generates 4 net instances, containing 14
places. The number of tokens is up to 31, and needs 1547 B of object memory.
The history of memory occupation is shown in Figure 12. Peaks in the graph
corresponds to receiving a net via serial line and its loading to code memory.</p>
      <p>To investigate the time consumption of the simulation, we measured the time
needed for each step execution. It comprises evaluation of all transitions in all
2000
] 1500
B
[
e
z
i
ys 1000
r
o
m
e
M 500
0</p>
      <p>Code Memory
Object Memory
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32</p>
      <p>Step Number
ten instances. The simulation was executed for 50 times to get average step
duration.</p>
      <p>The history of simulation steps durations is shown in Figure 13. We can
see, that the duration increases depending on number of instances because the
number of transitions is increasing. Peeks in the graph correspond with net
loading, net instantiation, and uplink execution. These experiments has been
done on contemporary desktop computer. On Raspberry Pi the step duration is
about 100 times higher, because of slower CPU and slower access to the memory.
Nevertheless, we suppose that C version of the PNVM/PNOS for Raspberry Pi
will run reasonably faster which will make Arduino and Raspberry Pi platforms
well usable for Petri nets-specified control systems.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Related Work</title>
      <p>
        The use of high-level languages, especially Petri Nets, allows to build and
maintain control systems in a quite fast and intuitive way. There are many approaches
to relate high-level languages with embedded devices or microcontrollers. One
kind of that approaches is applicable in systems with not very limited resources.
For example, Java can be used as a high-level language and works on
architecture which can be successfully used in embedded systems [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. To control robot
application, hierarchical Petri Nets are used for middleware implementation in
a RoboGraph framework [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Another approaches are focused to the devices
with limited resources. They obviously use high-level languages or models for
system design and the implementation is generated, usually into the C code.
An examle is a usage of Timed Petri Nets for the synthesis of control software
for embedded systems by generating C-code [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] or Sequential Function Charts
[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. All these approaches allow to design systems using high-level languages or
models, but they either do not preserve models in the system implementation,
      </p>
      <p>Step
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32</p>
      <p>Step Number
or are not applicable for systems with limited resources. The approach presented
in this paper allows not only for design of systems with limted resources, but
also for systems implementation using a high-level language, particularly the
Nets-within-Nets formalism, allowing for the dynamic reconfigurability.
7</p>
    </sec>
    <sec id="sec-7">
      <title>Conclusion</title>
      <p>In this paper, we described the process of system construction based on Petri
Nets-based models transformations and target prototype code generation. This
process starts with the workflow model defined according to the Van der Aalst’s
WF-Nets that describe the functionality of the system from the customers point
of view. This model is then transformed to the multilayered architecture based
on Reference Nets formalism. Each layer of the architecture is then translated to
the specific target representation. The main part of the system is translated to
the Petri Nets ByteCode (PNBC), that is interpreted by the Petri Nets Virtual
Machine (PNVM) that is part of the Petri Nets Operating System (PNOS) which
forms the remaining part of the system.</p>
      <p>The whole system reconfigurability is based on the possibility of PNBC net
replacement with the new version where the interpretation after reinstalling starts
to perform the new version of the process. In the current version, the
reconfigurability is considered to work on the granularity of processes and subprocesses. In
further research, we plan to focus on more fine grained reconfiguration, including
the platform primitive operations, and also on the processes migration.</p>
      <sec id="sec-7-1">
        <title>Acknowledgment</title>
        <p>This work has been supported by the European Regional Development Fund in
the IT4Innovations Centre of Excellence project (CZ.1.05/1.1.00/02.0070), by
BUT FIT grant FIT-11-1, and by the Ministry of Education, Youth and Sports
under the contract MSM 0021630528.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Van der Aalst</surname>
            ,
            <given-names>W.M.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Van Hee</surname>
            ,
            <given-names>K.M.</given-names>
          </string-name>
          <year>2002</year>
          .
          <article-title>Workflow Management: Models, Methods, and Systems</article-title>
          . IT press, Cambridge, MA.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Van der Aalst</surname>
            ,
            <given-names>W.M.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ter</surname>
            <given-names>Hofstede</given-names>
          </string-name>
          ,
          <string-name>
            <surname>A.H.M.</surname>
          </string-name>
          <year>2005</year>
          .
          <article-title>YAWL: yet another workflow language</article-title>
          .
          <source>Inf. Syst</source>
          .
          <volume>30</volume>
          ,
          <issue>4</issue>
          (
          <year>June 2005</year>
          ),
          <fpage>245</fpage>
          -
          <lpage>275</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Valk</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <year>1998</year>
          .
          <article-title>Petri Nets as Token Objects: An Introduction to Elementary Object Nets</article-title>
          .
          <source>In Proceedings of the 19th International Conference on Application and Theory of Petri Nets (ICATPN '98)</source>
          , Jrgen Desel and Manuel Silva (Eds.). SpringerVerlag, London, UK,
          <fpage>1</fpage>
          -
          <lpage>25</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Kummer</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          <year>2001</year>
          .
          <article-title>Introduction to petri nets and reference nets</article-title>
          .
          <source>SozionikAktuell</source>
          <volume>1</volume>
          :2001 / Rolf von Lu¨de, Daniel Moldt,
          <article-title>Ru¨diger Valk (Hrsg</article-title>
          .).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Cabac</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duvigneau</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moldt</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , Ro¨lke,
          <string-name>
            <surname>H.</surname>
          </string-name>
          <year>2005</year>
          .
          <article-title>Modeling dynamic architectures using nets-within-nets</article-title>
          .
          <source>In Proceedings of the 26th international conference on Applications and Theory of Petri Nets (ICATPN'05)</source>
          ,
          <source>Gianfranco Ciardo and Philippe Darondeau (Eds.)</source>
          . Springer-Verlag, Berlin, Heidelberg,
          <fpage>148</fpage>
          -
          <lpage>167</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Kummer</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wienberg</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duvigneau</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Ko¨hler,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Moldt</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          , and Ro¨lke,
          <string-name>
            <surname>H.</surname>
          </string-name>
          <year>2003</year>
          . Renew - the
          <source>Reference Net Workshop</source>
          . Tool Demonstrations. Eric Veerbeek (ed.).
          <source>24th International Conference on Application and Theory of Petri Nets (ATPN</source>
          <year>2003</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Cˇeˇska</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Janouˇsek V.</given-names>
            ,
            <surname>Vojnar</surname>
          </string-name>
          <string-name>
            <surname>T</surname>
          </string-name>
          . PNtalk
          <article-title>- A Computerized Tool for Object Oriented Petri Nets Modelling</article-title>
          .
          <source>Lecture Notes in Computer Science</source>
          , vol.
          <volume>1333</volume>
          , DE, p.
          <fpage>591</fpage>
          -
          <lpage>610</lpage>
          , ISBN 3-540-63811-3, ISSN 0302-
          <issue>9743</issue>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Richta</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Janouˇsek</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <year>2013</year>
          .
          <article-title>Operating System for Petri Nets-Specified Reconfigurable Embedded Systems</article-title>
          , To appear
          <source>in: Proceedings of the 14th Computer Aided Systems Theory</source>
          , Las Palmas de Grand Canaria,
          <string-name>
            <surname>LNCS</surname>
          </string-name>
          , Springer Verlag.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Richta</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Janouˇsek</surname>
            , V., Koˇc´ı,
            <given-names>R.</given-names>
          </string-name>
          <year>2012</year>
          .
          <article-title>Code Generation For Petri Nets-Specified Reconfigurable Distributed Control Systems</article-title>
          ,
          <source>In: Proceedings of 15th International Conference on Mechatronics - Mechatronika</source>
          <year>2012</year>
          , Praha,
          <string-name>
            <surname>CZ</surname>
          </string-name>
          , FEL Cˇ,
          <year>2012</year>
          , s.
          <fpage>263</fpage>
          -
          <lpage>269</lpage>
          , ISBN 978-80-01-04985-3.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Pizlo</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ziarek</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , et al.
          <year>2010</year>
          .
          <article-title>High-level programming of embedded hard realtime devices</article-title>
          .
          <source>In Proceedings of the 5th European conference on Computer systems</source>
          , ACM New York,
          <fpage>69</fpage>
          -
          <lpage>82</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Fernandez</surname>
            ,
            <given-names>J.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sanz</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paz</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alonso</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <year>2008</year>
          .
          <article-title>Using hierarchical binary Petri nets to build robust mobile robot applications: RoboGraph</article-title>
          .
          <source>In IEEE International Conference on Robotics and Automation</source>
          .
          <volume>1372</volume>
          -
          <fpage>1377</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Rust</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stappert</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kunnemeyer</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <article-title>From Timed Petri Nets to Interrupt-Driven Embedded Control Software</article-title>
          . In International Conference on Computer,
          <source>Communication and Control Technologies (CCCT</source>
          <year>2003</year>
          ), Orlando, Florida, USA. p.
          <fpage>6</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Bayo-Puxan</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rafecas-Sabate</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gomis-Bellmunt</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bergas-Jane</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <year>2008</year>
          .
          <article-title>A GRAFCET-compiler methodology for C-programmed microcontrollers</article-title>
          ,
          <source>In Assembly Automation</source>
          , Vol.
          <volume>28</volume>
          Iss: 1, Emerald Group Publishing.
          <fpage>55</fpage>
          -
          <lpage>60</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>