<!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>PetriPad - A Collaborative Petri Net Editor</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Julian Burkhart</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michael Haustermann</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Hamburg Faculty of Mathematics, Informatics and Natural Sciences Department of Informatics</institution>
        </aff>
      </contrib-group>
      <fpage>182</fpage>
      <lpage>196</lpage>
      <abstract>
        <p>Collaboration is one of the key aspects of software engineering and commonly includes working in spatially separated teams. Many tools exist to support such a workflow and are used extensively, especially for real-time communication, e.g. instant messaging systems and voice chats. In contrast, programming environments and editors used in general mostly lack synchronous real-time collaboration functionality. In this work we present an informal specification of such a system in the context of a groupware Petri net editor and the implementation of our model as a proof of concept for the Renew tool. To do this we revisit work on this subject done more than 10 years ago and update the proposed models to the current state of software engineering. As a result we are able to simplify the specification.</p>
      </abstract>
      <kwd-group>
        <kwd>collaborative editing</kwd>
        <kwd>Petri nets</kwd>
        <kwd>Renew</kwd>
        <kwd>Mulan/Capa</kwd>
        <kwd>multi-agent systems</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Distributed development of a common code base in a collaborative manner has
become one of the key aspects of development in computer science. Many tools
exist to support this kind of distributed workflow in different styles. The most
common of them are source code management systems (SCM) that enable
distributed, concurrent editing of shared documents.</p>
      <p>However, SCMs are tailored for sequentially structured textual documents
and perform poorly on graphically oriented data files. When using a graphical
editor the user usually has only very limited control over the serialized file
formats. Even when using a text-based format, slight changes in the editor can
result in vast differences in the exported file. This makes it very hard for a SCM
system to distinguish the changed parts from the (semantically) identical ones.</p>
      <p>Also SCMs only cover scenarios where developers are working independently
in the sense that while working at the same project in general the work of others
does not immediately impact their own. This is fine for day-to-day development,
but for real-time collaborative development it is not feasible that way.
Possible applications for real-time collaboration are brainstorming ideas or teaching
interactive courses over the web.</p>
      <p>For synchronous editing of text documents there are web-based solutions, like
Etherpad1 and desktop applications, like ACE2 or Gobby3. There are plugins
for the popular development environment Eclipse4.</p>
      <p>
        In this work we present a model for a collaborative Petri net editor. It is based
on prior research described in Section 2, but varies in that it does not need any
locking mechanisms of the graphical components manipulated by the users. The
resulting model therefore is much simpler and is presented in Section 3. As a
proof of concept we present the implementation of our model for the Petri net
editor Renew [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. It is based on the multi-agent system (MAS) framework
Mulan/Capa [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The implementation is described in Section 4 and discussed
in Section 5. At the end we summarize our work and give an overview of potential
extensions of our model and of the possibilities for further research.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        The subject of collaborative Petri net editing is discussed in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], which serves as
a canonical case study for authors to present their approaches of combining Petri
nets and object-oriented programming concepts. Some requirements for such an
editor are outlined in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The editor proposed is for hierarchically structured
Petri nets and allows multiple users to work simultaneously on the same net
from different terminals over the network. The users are organized in sessions
and each user is able to work on multiple nets in different sessions at the same
time.
      </p>
      <p>Each user is capable of having a customized view on the net and a set of
access privileges restricts the actions each user can make. For example a user
might only be granted reading access to a net or parts of it. The concept of
ownership of graphical elements is introduced to restrict the user’s actions at
a certain point in time. For each operation the appropriate ownership must be
acquired beforehand. Some ownerships are exclusive (e.g. delete), others may
be acquired from different users at the same time (e.g. modify). The request
for some ownership may happen implicitly by selecting an item or explicitly
by pressing a button. The case study describes different ownerships, how they
could be requested and which restrictions apply if some user holds a certain
ownership. We use the term ownership in the following section in this sense only
unless otherwise specified.</p>
      <p>The requirement analysis in the case study is intentionally incomplete. Other
authors are encouraged to extend the requirements appropriately to their own
concept or to focus on specific points to emphasize certain properties of a chosen
formalism.</p>
      <p>
        In the following subsections we describe three different approaches from [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <sec id="sec-2-1">
        <title>1 http://etherpad.com</title>
      </sec>
      <sec id="sec-2-2">
        <title>2 http://sourceforge.net/projects/ace</title>
      </sec>
      <sec id="sec-2-3">
        <title>3 http://gobby.0x539.de</title>
      </sec>
      <sec id="sec-2-4">
        <title>4 http://www.saros-project.org</title>
        <p>2.1</p>
        <sec id="sec-2-4-1">
          <title>Biberstein, Buchs, Guelfi</title>
          <p>
            The authors of [
            <xref ref-type="bibr" rid="ref6">6</xref>
            ] describe a centralized approach. They build upon an
architecture specified in [
            <xref ref-type="bibr" rid="ref5">5</xref>
            ] that is modeled in a formalism they introduced in [
            <xref ref-type="bibr" rid="ref7">7</xref>
            ] called
Concurrent Object-Oriented Petri Nets (CO-OOPN/2).
          </p>
          <p>
            Their architecture consists of two layers: a graphical interface layer
(viewports) and a centralized synchronization layer (server). Documents are stored on
the server and cannot be manipulated directly by users but only by the server
on request. The viewport’s task is to display the current net and send user
input to the server. Furthermore updates made by other users received from the
server have to be displayed. The server takes requests from users, updates the
net and informs all users about that update. Moreover it ensures the consistency
of the net and guarantees the compliance with the user rights and ownerships
as described in [
            <xref ref-type="bibr" rid="ref2">2</xref>
            ].
          </p>
          <p>The procedure is as follows: a user changes an element in a net in his
viewport. This change is transported from the viewport to the server. The server
examines if the changes are compatible with the users rights and ownerships
and either includes the change into the net or rejects it. A message is sent to
all viewports, if the net changed. The net itself is represented as a tree.
Components that may have subcomponents are called hierarchical components and
stored as nodes of the tree. Components that may not have subcomponents,
called atomic components, are stored as leaves of the tree. A net in this model
is itself a hierarchical component.
2.2</p>
        </sec>
        <sec id="sec-2-4-2">
          <title>Bastide, Palanque</title>
          <p>
            The authors of [
            <xref ref-type="bibr" rid="ref3">3</xref>
            ] focus on locking mechanisms for objects to ensure consistency.
The majority of the requirements in [
            <xref ref-type="bibr" rid="ref2">2</xref>
            ] are not taken into account. The
implementation of the locking mechanism is described in great detail and down to a
very technical level. The general concept is the locking of graphical elements that
are selected in an editor for all other users. [
            <xref ref-type="bibr" rid="ref3">3</xref>
            ] describes how the synchronization
between graphical elements and graphical editor works. They use the cooperative
objects formalism to present their approach.
          </p>
          <p>We do not go into further details, since we do not use any locking in our
model.
2.3</p>
        </sec>
        <sec id="sec-2-4-3">
          <title>Guerrero, Figueiredo, Perkusich</title>
          <p>
            Guerrero, Figueiredo, Perkusich describe a decentralized multi-agent
architecture [
            <xref ref-type="bibr" rid="ref14">14</xref>
            ] for the collaborative editor. They distinguish between two kinds of
agents: user agents and manager agents. User agents may work on nets according
to their access privileges and join or leave editing sessions. Manager agents are
capable of performing administrative tasks for user and session management.
They can also grant and revoke ownerships of graphical elements.
          </p>
          <p>Each agent consists of three layers. The lowest layer is the communication
layer. It provides message transportation services. The middle layer differs
between user agents and manager agents. It is called control layer and management
layer respectively. At the top lies the application layer and represents the
interface presented to the users of the system.</p>
          <p>For a user agent the application layer is a graphical editor that allows the
user to view and manipulate Petri nets. User inputs are first passed on to the
control layer. The control layer verifies that the net manipulations are compliant
with the ownerships the user holds. It may try to request additional ownerships,
if needed for the desired action. If the control layer fails to acquire all necessary
ownerships, the change is rejected.</p>
          <p>The communication layer is used to exchange messages with other agents.
Especially to request ownership and to inform other agents about acceptable
changes. Incoming changes are passed up through the layers and displayed in
the user interface (UI).</p>
          <p>The manager agent’s application layer is a system console, which enables the
execution of administrative commands. These are performed by the manager
agent’s management layer.
3</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Informal Model Specification</title>
      <p>In this section we present our own approach. Since it differs from the
aforementioned work, we first discuss the main principles behind it. Then we describe
the resulting architecture in detail. Therefore we describe the requirements on
the user interface, discuss different communication languages and explain how
consistency can be guaranteed in our model.
3.1</p>
      <sec id="sec-3-1">
        <title>General Architecture</title>
        <p>One of the goals of this work is to update the previous models to the current
practice of UI design, especially the design of the collaborative text-editor
Etherpad. Comparing different websites offering etherpad-based services5, the editor
offers basic formatting tools only. There are no restrictions in terms of what
parts of a document a user may edit. Session management is confined to merely
distinguishing sessions, while access privileges are left out completely. The name
that uniquely identifies an Etherpad session is incorporated into the URL
leading to the edited document and subsequently it can be accessed by that URL
without restrictions.</p>
        <p>Despite of the absence of administrative capabilities, the result is well
fitting to the task of collaborative writing. The UI is highly intuitive and access
privileges are non-essential to enable collaborative work (though possibly helpful
in some use cases). All conflicts arising from editing the same passage can be
discussed in the integrated chat window.</p>
        <p>From this brief analysis of Etherpad we draw three main principles for our
proposed model.
5 An overview of some of the available websites can be found on http://etherpad.</p>
        <p>
          org/public-sites/
1. All users have the same access privileges, i.e. no access privileges are present
at all.6
2. The user is enabled to make any change he wants, i.e. no change is rejected
afterwards or prohibited in the first place. Furthermore every change is
implemented immediately in the users view.
3. Any arising conflicts are dealt with automatically and in a sensible way.
From the second point it is obvious that we had to omit locking mechanisms
as described in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] and [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] (cf. Section 2). This is also the primary source for
simplification for our model.
        </p>
        <p>We adopt a number of requirements from the original case study. The session
management enables users to participate in multiple collaboration sessions and
collaborate on multiple nets at the same time. A user’s view on the shared nets
is independent of the other users.</p>
        <p>Additional requirement on the system is the separation of communication
infrastructure and editor, so that the graphical user interface (GUI) could be
exchanged. For example it should be possible for one of two collaborating users
to work in a full-blown desktop client, while the other works in a web-based
editor in an internet browser.
6 It should be mentioned that we are not opposed to access privileges in general. A
number of use cases can be thought of that require such a mechanism, e.g. tutoring
or presentation purposes, but these are not the use cases we considered for this work.</p>
        <p>
          The system is modeled as a multi-agent application similar to [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ], but with
some important differences. We identify three kinds of agents in the system (cf.
Figure 1).
        </p>
        <p>User agents represent the users of the system. Since we want the UI to be
interchangeable, a user agent needs to be modular by design. It consists of
a communication module with a well-defined interface to which an arbitrary
editor can be connected.</p>
        <p>Session management agents offer an entry point to user agents. They are
autonomous and can start or terminate sessions on request of user agents or
be queried for a list of existing collaboration sessions.</p>
        <p>Session agents represent individual collaboration sessions and keep track of
the edited nets and the participating users. It also functions as a central
message relay between the participating user agents and resolve conflicts
arising from concurrency. It also stores the current state of each net.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Requirements on User Interface</title>
        <p>
          The UI connected to a user agent’s communication module has two essential
tasks. First of all, it has to observe the actions the user takes. This follows from
the manner changes are not requested at a central authority as in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], but simply
made and then passed on to others.
        </p>
        <p>The UI should also recognize what actions result in meaningful changes. In
this case meaningful refers to the completion of an action. While the user drags
an element from one point to another, it might not be wise to flood the network
with updates for every single pixel that the element is moved. Especially, because
in the context of nets, dragging one element usually impacts the position of other
elements that are connected to it as well.</p>
        <p>To further reduce the number of messages, actions may be grouped together
to batches and sent in one message to the session agent. The most straight
forward way for any receiving agent to deal with batches is to first execute
all operations that add new elements, then perform all operations that change
existing elements and lastly all remove operations.</p>
        <p>The second job of the UI is to integrate incoming changes from the session
agent. A crucial requirement is for the integration to be done atomically and
between user manipulations, so that it does not interfere with changes the user
makes.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Communication Language</title>
        <p>
          We consider compliance with the standards of the Foundation for Intelligent
Physical Agents7 (FIPA) [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] a baseline for our model. These include defining
the message format (Agent Communication Language – ACL [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]) for all
interagent communication. Choice exists however on the part of the content languages
        </p>
        <sec id="sec-3-3-1">
          <title>7 http://www.fipa.org/</title>
          <p>
            for the actual message payload. Two possibilities will be discussed, namely the
Petri Net Markup Language [
            <xref ref-type="bibr" rid="ref24">24</xref>
            ] (PNML)and using ontologies.
          </p>
          <p>
            PNML is a ISO/IEC standard for higher order Petri nets that is still in
development. Many Petri net tools have adopted it [
            <xref ref-type="bibr" rid="ref8">8</xref>
            ] and type definitions for
various different flavors of Petri nets have been created. The latter is what makes
PNML especially attractive for our work. The set goal of building a universal
platform for collaborative editing agnostic to the actual editor in use would
greatly benefit from a widely adopted standard. Renew as our main aim for
application of our work already has support for importing and exporting PNML.
          </p>
          <p>The main downside of applying PNML to this work is that it only represents
the net itself and not manipulation operations on it. Describing the actions
performed directly, e.g. a moveElement or addMarking operation, is out of the
question. PNML can only be used to describe the set of elements that changed
and their relevant properties. That is however a viable solution and receiving
agents can simply overwrite the received elements in their copies of the net.</p>
          <p>
            Another possibility is to use an ontology to model Petri nets and the
operations. Ontologies becoming increasingly popular in software engineering. They
can be used as a glossary throughout all development phases and as a
metalanguage for specification. The de facto standard ontology modeling tool
Protégé8 has a built-in code generator, which can generate Java classes directly
from an ontology. Protege is based on the Web Ontology Language (OWL)
developed for the Semantic Web9. It has a variety of different syntaxes to choose
from [
            <xref ref-type="bibr" rid="ref15 ref19">19,15</xref>
            ]. They can be machine-readable like the RDF-based XML syntax or
better suited to be edited by humans like the Manchester Syntax, thus lowering
the bar for adoption of OWL 2 considerably over its predecessor OWL 1.
          </p>
          <p>
            In multi-agent systems ontologies form the basis for communication [
            <xref ref-type="bibr" rid="ref13">13</xref>
            ].
Without a common ontology to give meaning to objects and statements, there
can be no exchange of knowledge, both between agent or humans. And
specifically in the context of our implementation detailed in Section 4, the
Mulan/Capa framework relies heavily on ontologies. Not only for communication,
but for modeling purposes as well.
          </p>
          <p>
            The two possibilities, using PNML or ontologies, are not necessarily
mutually exclusive either. Attempts have been made to define ontologies for higher
order Petri nets, that are compliant with PNML [
            <xref ref-type="bibr" rid="ref12 ref23">12,23</xref>
            ]. Since we are aiming
at interoperability to some extent in our model, we suggest [
            <xref ref-type="bibr" rid="ref23">23</xref>
            ] to be used to
embed PNML into use in our multi-agent system.
3.4
          </p>
        </sec>
      </sec>
      <sec id="sec-3-4">
        <title>Consistency Guarantee and Conflict Treatment</title>
        <p>Guaranteeing consistency needs special care in our approach since users have
their own synchronized copies of the shared nets. To ensure that identifiers for
net elements are globally unique, we let the central session agent determine
them. So when a user adds an element locally, a temporary identifier is assigned</p>
        <sec id="sec-3-4-1">
          <title>8 http://protege.stanford.edu/</title>
        </sec>
        <sec id="sec-3-4-2">
          <title>9 http://www.w3.org/standards/semanticweb/</title>
          <p>to that element. The final identifier is received as a result message, when he
informs the session agent about the new element. All changes to objects with
temporary identifiers are buffered in the user clients until the final identifier has
been determined.</p>
          <p>To address the problem of messages overtaking one another, we add sequence
numbers to each message. A global order of all messages is determined by the
session agent, who orders them per user and integrates them into a global order
by time of arrival. The session agent accordingly sets new sequence numbers to
all messages before distributing them.</p>
          <p>Our approach enables users to modify the same object concurrently. Thus
we allow conflicting modifications that have to be dealt with. For conflicting
changes to the same property of an element, the change processed last by the
session agent wins. To enable a user to determine which change won in such
a case, the session agent distributes change operations (but not additions or
deletions) to all users including the sender (cf. Figure 2).</p>
          <p>A minor inconvenience of the scenario in Figure 2 is that User 2 would
implement the change of User 1 for a short period of time after he made his own
change which would be undone shortly after that, when his own update is sent
back to him. A possible remedy for this is that if a user made a change to
property p of element a, all incoming updates to p of a can be ignored until his own
change appears in the stream of updates.</p>
          <p>
            Lastly we have to deal with incoming changes to elements that were already
deleted. This situation occurs at the session agent, when a user makes a change
to an element before receiving the delete message. It can also occur at the user
agent when an element was deleted locally, but the delete message was not yet
distributed. In either case the change can be dropped safely. The user from whom
the change originated will eventually receive the delete message and subsequently
delete the element himself. That way a consistent state is reached at quiescence,
i.e. when all messages have been distributed and processed at each site.
In this section we give an overview of our proof-of-concept implementation. We
will shortly introduce the Renew Petri net editor and the Mulan/Capa agent
framework and then describe the implementation and the Ontology we use for
communication.
Renew. The Reference Net Workshop (Renew) [
            <xref ref-type="bibr" rid="ref17">17</xref>
            ] is an editor for Petri
net formalisms developed by the theoretical foundations of computer science
group at the department of computer science at the University of Hamburg. It
is highly modular and includes plugins for different Petri net formalisms. The
integrated simulator can execute basic P/T-nets as well as higher order nets,
e.g. colored Petri nets and reference nets, which are object-oriented Petri nets
with synchronous channels that allow for tokens to be nets themselves [
            <xref ref-type="bibr" rid="ref16 ref22">16,22</xref>
            ].
Transitions of reference nets can also be inscribed with Java code, that is
executed during simulation. This mechanism provides a seamless integration of
object-oriented programming with specification and simulation of Petri nets.
Mulan/Capa. In order to facilitate the implementation of our model, we
built upon a framework for multi-agent applications called Mulan/Capa.
          </p>
          <p>
            Mulan (Multi-agent nets) [
            <xref ref-type="bibr" rid="ref21">21</xref>
            ] is a reference architecture for multi-agent
systems. It is modeled completely in reference nets and consists of four different
levels as seen in Figure 3.
          </p>
          <p>The highest level (level 1) is the infrastructure. The infrastructure connects
multiple agent platforms to a network. A platform (level 2) provides the
environment for agents. Apart from starting and terminating agents, it provides means
for communication between agents. If sending and receiving agent are identical
the communication is considered to be an internal communication, e.g. between
different active protocols of the same agent. The next level are the actual agents
(level 3). The agents can send and receive messages to and from other agents
and the platform. This is the only externally observable behavior of an agent.
Each communication between agents and agents or agents and a platform is
described by protocols (level 4). It models the behavior of an agent or how agents
communicate with each other. A protocol is developed in complementary parts
for each participating agent and orders the flow of information and the messages
sent.</p>
          <p>
            Capa (Concurrent Agent Platform Architecture) [
            <xref ref-type="bibr" rid="ref10">10</xref>
            ] is a FIPA-compliant
implementation of the Mulan model on top of Renew and Java. Capa
facilitates building multi-agent applications based on the Mulan model.
Heterogeneous systems with platforms implemented in other frameworks are possible
due to the FIPA-compliance. The infrastructure level of the Mulan model is
not implemented in Capa. It emerges when combining an arbitrary number of
instances of Capa platforms that can be interconnected over a network.
          </p>
          <p>The combination of model and implementation, plus the development
environment, monitoring and debugging tools comprise the Mulan/Capa
framework. It provides a high level of concurrency since it is developed with reference
nets that are by design concurrent.
4.2</p>
        </sec>
      </sec>
      <sec id="sec-3-5">
        <title>Coarse Design of the PetriPad Plugin</title>
        <p>PetriPad consists of two parts. The multi-agent model is implemented in the
Mulan/Capa framework and we extend Renew with a plugin, which connects
it to the MAS. In terms of our informal model communication module is the
agent connected to the editor.</p>
        <p>
          To exchange data between the editor and the agent we use the WebGateway
plugin for Mulan/Capa. It implements a gateway architecture [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], which
facilitates connecting HTML5-based web services to the MAS. The WebGateway
acts as a bridge using the WebSocket protocol and although web applications
are its original aim, it can hook up arbitrary software systems.
        </p>
        <p>Our utilization of WebGateway can be seen in Figure 4. The Renew Petri net
editor serves as UI for an agent running in a remote Mulan/Capa platform. We
call that agent the modeler agent. The Renew plugin tracks the changes made
by the user and passes them through a WebSocket channel to the WebGateway,
which relays them to the modeler agent in the PetriPad MAS.</p>
        <p>The primary motivation for this architecture is that users do not need to
be running a instance of the Mulan/Capa platform locally. Instead only one
platform is needed to which an arbitrary number of editors can be connected
and it is possible to use editors other than Renew.</p>
        <p>Our use case diagram (Figure 1) showed three agent types and a number of
interactions between them. These translate directly to levels 3 and 4 of the
Mulan model. Each interaction is implemented as a protocol for the participating
agents.
4.3</p>
      </sec>
      <sec id="sec-3-6">
        <title>Ontology</title>
        <p>
          Although we argued in favor of using PNML compliant ontologies, we had to
deviate from it to some extent. This is mostly due to the limited expressive power of
the Mulan/Capa default modeling formalism for ontologies. It is called concept
diagrams [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] and can define a taxonomy of concepts in a UML-based graphical
notation. Each concept can be described by a set of key-value-tuples and the
values’ respective domains. A domain may be a Java data type, another concept in
the ontology or a list of either of them. Semantically concept diagrams coincide
with the idea of frames [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ] limited to defining concepts only and subsumption
as the only relation.
        </p>
        <p>Figure 5 shows a subset of our ontology dealing with reference nets and
possible operations on them. The semantics are as follows. The nodes in the graph
represent the defined concepts and the arcs define the subsumption hierarchy.
Every concept has a name (bold) and attributes of the form k: t, where k is the
name of the attribute and t its domain. A star (‘*’) at the end of the domain
definition denotes that an instance of the concept can have multiple values for
that attribute, whereas the other attributes must be single-valued.</p>
        <p>Our ontology distinguishes between the structural elements (transition, place,
arc, virtual-place10) and the textual elements. Arcs in our model have type (e.g.
10 A virtual place is a reference to a place. A place and its virtual copies are semantically
identical.
normal, inhibitory) and direction attributes that define the way they interact
with the associated place and transition.</p>
        <p>The leafs of the text-element subtree model the four types of textual elements
that are used in Renew. A structural element can be named by a name
annotation and inscriptions cover all semantically relevant annotations, e.g. markings,
guards, weights, etc. All other annotations are labels and are ignored during
simulation of the net. Declarations are free-standing textual elements that contain
all declarations of Java objects used in the net and all imports for Java packages
that are needed.</p>
        <p>The top concept for elements (refnet-element) has an attribute attributes that
may contain the graphical information of the element. The concept hierarchy for
its type element-attributes is not depicted here, but contains e.g. color and size.</p>
        <p>An operation on an element is modeled as refnet-operation. We distinguish
three different kinds of operations: add, update and remove. In case of an update
the element attribute contains the entire new state of the element that was
updated.</p>
        <p>Note that Figure 5 describes only part of our reference net ontology.
5</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Discussion</title>
      <p>Our decision to abandon locking mechanisms resulted in a huge simplification
of the overall design of the collaborative Petri net editor. On the other hand
abandonment of locking mechanisms entails certain problems with concurrent
editing of the same elements. It can be confusing for users for example to have
their changes overwritten immediately by other users. One such case has been
discussed in Section 3.4.</p>
      <p>In this case the developers have to communicate to clear up the confusion
and possibly revert some changes manually. We argue that in the targeted use
case of constructive collaborative work this is a corner case that seldom arises
and thus can be neglected.</p>
      <p>The choice of using WebSocket as communication channel and a well-defined
ontology for message contents leads to loose coupling of the infrastructure and
the editor. This has two main benefits. Firstly different editors can be connected
to the MAS and secondly the MAS can be offered as a service, which compatible
editors can connect to from anywhere over the net.</p>
      <p>Not mentioned before, the WebGateway can convert ontology communication
into JSON or XML. These languages are common in web applications and thus
facilitate connecting web-based editors in particular.</p>
      <p>Modeling the system as a MAS resulted in a very modular architecture and
naturally, it inherits certain properties from the Mulan/Capa framework. On
the one hand, implementing large parts of the system in Petri nets is a huge gain
in terms of concurrency. On the other hand the message transport through the
various layers of the MAS is far slower than direct peer-to-peer communication.</p>
      <p>The ontology we designed for inter-agent communication is not yet compliant
with the PNML standard, but in general the differences are minor. Using an
ontology has the additional benefit of serving as a glossary in the development
phase. It also provides a more abstract means of modeling in conjunction with
the code generator of the Mulan/Capa framework.
6</p>
    </sec>
    <sec id="sec-5">
      <title>Summary</title>
      <p>In the preceding chapters we gave a short overview of the prior work on
collaborative Petri net editors. We argued that the specifications are incomplete in the
sense that they only consider parts of the overall system.</p>
      <p>The new model proposed in this work differs from all prior approaches in
that it completely foregoes locking of elements in the edited nets. The goal is
not to restrict the user in what he can manipulate and give immediate feedback
to all inputs. We achieve this by using a multi-agent approach with a central
message relay. By serializing all communication at the central relay we were able
to implement user input immediately in the user’s view and only subsequently
send it to the relay.</p>
      <p>Session management is incorporated in our model as well. A user can
participate in multiple sessions simultaneously and each session can hold an arbitrary
number of documents available to all users in that session.</p>
      <p>As a proof of concept we implemented our model as a plugin for the Petri
net editor Renew and a multi-agent application based on the Mulan/Capa
framework.</p>
    </sec>
    <sec id="sec-6">
      <title>Outlook</title>
      <p>Since our approach uses WebSocket for communication it allows for using a web
application as Petri net editor. With the canvas element and the WebSocket
channel HTML5 offers all the required components to build such an editor.</p>
      <p>Another topic of great significance for developing Petri nets is the
synchronized simulation. The simulation of the models may reveal modeling errors. In a
collaborative development process, on-line debugging a net has the benefit that
every participant can observe the exact firing sequence in the net. Simulating
the nets individually produces various different firing sequences for each
participant due to the innate concurrency of Petri nets and is therefor of little use to
collaborative debugging.</p>
      <p>Looking a little farther behind the horizon, the MAS specified in our model
is by itself agnostic to the subject of the collaborative work. We defined very
basic manipulation operations that can be applied to a number of
collaborative editing scenarios. The MAS could thus be developed into a service platform
providing an infrastructure for collaborative editing. In order to build such an
infrastructure a meta ontology for collaborative editing needs to be developed.
It will facilitate building subject ontologies that describe particular subjects of
collaborative work and the permissible manipulations and their effects.
Compliant subject ontologies can then be used in conjunction with the collaboration
infrastructure.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Gul</given-names>
            <surname>Agha</surname>
          </string-name>
          , Fiorella De Cindio, and Grzegorz Rozenberg, editors.
          <source>Advances in Petri Nets: Concurrent Object-Oriented Programming and Petri Nets</source>
          , volume
          <volume>2001</volume>
          <source>of Lecture Notes in Computer Science</source>
          . Springer-Verlag,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Rémi</given-names>
            <surname>Bastide</surname>
          </string-name>
          , Charles Lakos, and
          <string-name>
            <surname>Philippe</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Palanque</surname>
          </string-name>
          .
          <article-title>A Cooperative Petri Net Editor</article-title>
          .
          <source>In Agha et al. [1]</source>
          , pages
          <fpage>534</fpage>
          -
          <lpage>535</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Rémi</given-names>
            <surname>Bastide</surname>
          </string-name>
          and
          <string-name>
            <given-names>Philippe A.</given-names>
            <surname>Palanque</surname>
          </string-name>
          .
          <article-title>Modeling a groupware editing tool with cooperative objects</article-title>
          .
          <source>In Agha et al. [1]</source>
          , pages
          <fpage>305</fpage>
          -
          <lpage>318</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Tobias</given-names>
            <surname>Betz</surname>
          </string-name>
          , Lawrence Cabac, and
          <string-name>
            <surname>Matthias</surname>
          </string-name>
          Wester-Ebbinghaus.
          <article-title>Gateway architecture for Web-based agent services</article-title>
          .
          <source>In Franziska Kügl and Sascha Ossowski</source>
          , editors,
          <source>Multiagent System Technologies</source>
          , volume
          <volume>6973</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>165</fpage>
          -
          <lpage>172</lpage>
          . Springer Berlin / Heidelberg,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>O.</given-names>
            <surname>Biberstein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Buchs</surname>
          </string-name>
          , and
          <string-name>
            <surname>N. Guel.</surname>
          </string-name>
          <article-title>CO-OPN/2 applied to the modeling of cooperative structured editors</article-title>
          .
          <source>In Tech. Report 96/184, Swiss Federal Institure of Technology (EPFL)</source>
          ,
          <source>Software Engineering Laboratory. Citeseer</source>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>O.</given-names>
            <surname>Biberstein</surname>
          </string-name>
          , Didier Buchs, and
          <string-name>
            <given-names>Nicolas</given-names>
            <surname>Guelfi</surname>
          </string-name>
          .
          <article-title>Object-oriented nets with algebraic specifications: The CO-OPN/2 formalism</article-title>
          . In Agha et al. [
          <volume>1</volume>
          ], pages
          <fpage>73</fpage>
          -
          <lpage>130</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Olivier</given-names>
            <surname>Biberstein</surname>
          </string-name>
          and
          <string-name>
            <given-names>Didier</given-names>
            <surname>Buchs</surname>
          </string-name>
          .
          <article-title>Structured Algebraic Nets with ObjectOrientation</article-title>
          . In G. Agha and F. de Cindio, editors,
          <source>Workshop on Object-Oriented Programming and Models of Concurrency'95</source>
          , pages
          <fpage>131</fpage>
          -
          <lpage>145</lpage>
          ,
          <year>1995</year>
          . Turin.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Jonathan</given-names>
            <surname>Billington</surname>
          </string-name>
          , Søren Christensen, Kees van Hee,
          <string-name>
            <surname>Ekkart Kindler</surname>
            , Olaf Kummer, Laure Petrucci, Reinier Post,
            <given-names>Christian</given-names>
          </string-name>
          <string-name>
            <surname>Stehno</surname>
            , and
            <given-names>Michael</given-names>
          </string-name>
          <string-name>
            <surname>Weber</surname>
          </string-name>
          .
          <article-title>The petri net markup language: Concepts, technology, and tools</article-title>
          .
          <source>In Applications and Theory of Petri Nets</source>
          <year>2003</year>
          : 24th International Conference, pages
          <fpage>1023</fpage>
          -
          <lpage>1024</lpage>
          , Eindhoven, The Netherlands,
          <year>June 2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Lawrence</given-names>
            <surname>Cabac</surname>
          </string-name>
          .
          <article-title>Modeling Petri Net-Based Multi-Agent Applications</article-title>
          . Dissertation, University of Hamburg, Department of Informatics, Vogt-Kölln Str.
          <volume>30</volume>
          ,
          <issue>D22527</issue>
          Hamburg,
          <year>April 2010</year>
          . http://www.sub.uni-hamburg.de/opus/volltexte/ 2010/4666/.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>Michael</given-names>
            <surname>Duvigneau</surname>
          </string-name>
          .
          <article-title>Bereitstellung einer Agentenplattform für petrinetzbasierte Agenten</article-title>
          .
          <source>Diploma thesis</source>
          , University of Hamburg, Department of Computer Science, Vogt-Kölln Str. 30,
          <string-name>
            <given-names>D</given-names>
            <surname>-</surname>
          </string-name>
          22527
          <string-name>
            <surname>Hamburg</surname>
          </string-name>
          ,
          <year>December 2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <article-title>Foundation for Intelligent Physical Agents. FIPA ACL message structure specification</article-title>
          . http://fipa.org/specs/fipa00061/.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>Dragan</given-names>
            <surname>Gašević</surname>
          </string-name>
          and
          <string-name>
            <given-names>Vladan</given-names>
            <surname>Devedžić</surname>
          </string-name>
          .
          <article-title>Petri net ontology</article-title>
          .
          <source>Knowledge-Based Systems</source>
          ,
          <volume>19</volume>
          (
          <issue>4</issue>
          ):
          <fpage>220</fpage>
          -
          <lpage>234</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Thomas</surname>
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Gruber</surname>
          </string-name>
          .
          <article-title>A translation approach to portable ontology specifications</article-title>
          .
          <source>Knowledge Acquisition</source>
          ,
          <volume>5</volume>
          (
          <issue>2</issue>
          ):
          <fpage>199</fpage>
          -
          <lpage>220</lpage>
          ,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. Dalton Serey Guerrero,
          <string-name>
            <surname>Jorge C. A. de Figueiredo</surname>
            , and
            <given-names>Angelo</given-names>
          </string-name>
          <string-name>
            <surname>Perkusich</surname>
          </string-name>
          .
          <article-title>An object-based modular cpn approach: Its application to the specification of a cooperative editing environment</article-title>
          .
          <source>In Agha et al. [1]</source>
          , pages
          <fpage>338</fpage>
          -
          <lpage>354</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>Matthew</given-names>
            <surname>Horridge and Peter F. Patel-Schneider</surname>
          </string-name>
          .
          <article-title>OWL 2 web ontology language manchester syntax</article-title>
          . http://www.w3.org/TR/owl2-manchester-syntax/.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>Olaf</given-names>
            <surname>Kummer</surname>
          </string-name>
          .
          <article-title>Introduction to Petri nets and reference nets</article-title>
          .
          <source>Sozionik Aktuell</source>
          ,
          <volume>1</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>9</lpage>
          ,
          <year>2001</year>
          . ISSN 1617-2477.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Olaf</surname>
            <given-names>Kummer</given-names>
          </string-name>
          , Frank Wienberg,
          <string-name>
            <given-names>Michael</given-names>
            <surname>Duvigneau</surname>
          </string-name>
          , Michael Köhler, Daniel Moldt, and
          <string-name>
            <given-names>Heiko</given-names>
            <surname>Rölke</surname>
          </string-name>
          . Renew - the
          <source>Reference Net Workshop</source>
          . In Eric Veerbeek, editor,
          <source>Tool Demonstrations. 24th International Conference on Application and Theory of Petri Nets (ATPN</source>
          <year>2003</year>
          ).
          <source>International Conference on Business Process Management (BPM</source>
          <year>2003</year>
          )., pages
          <fpage>99</fpage>
          -
          <lpage>102</lpage>
          . Department of Technology Management, Technische Universiteit Eindhoven,
          <source>Beta Research School for Operations Management and Logistics</source>
          ,
          <year>June 2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <given-names>Marvin</given-names>
            <surname>Minsky</surname>
          </string-name>
          .
          <article-title>A framework for representing knowledge</article-title>
          .
          <source>Technical report</source>
          , Massachusetts Institute of Technology, Cambridge, MA, USA,
          <year>1974</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Peter F. Patel-Schneider</surname>
          </string-name>
          and
          <article-title>Boris Motik. OWL 2 web ontology language mapping to RDF graphs</article-title>
          . http://www.w3.org/TR/owl2-mapping
          <string-name>
            <surname>-</surname>
          </string-name>
          to-rdf/.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <given-names>S.</given-names>
            <surname>Poslad</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Charlton</surname>
          </string-name>
          .
          <article-title>Standardizing agent interoperability: The FIPA approach</article-title>
          .
          <source>Multi-Agent Systems and Applications</source>
          , pages
          <fpage>98</fpage>
          -
          <lpage>117</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <given-names>Heiko</given-names>
            <surname>Rölke</surname>
          </string-name>
          .
          <source>Modellierung von Agenten und Multiagentensystemen - Grundlagen und Anwendungen</source>
          , volume
          <volume>2</volume>
          <source>of Agent Technology - Theory and Applications</source>
          . Logos Verlag, Berlin,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <given-names>Rüdiger</given-names>
            <surname>Valk</surname>
          </string-name>
          .
          <article-title>Petri nets as token objects - an introduction to elementary object nets</article-title>
          .
          <source>In Jörg Desel and Manuel Silva</source>
          , editors,
          <source>19th International Conference on Application and Theory of Petri nets</source>
          , Lisbon, Portugal,
          <source>number 1420 in Lecture Notes in Computer Science</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>25</lpage>
          , Berlin Heidelberg New York,
          <year>1998</year>
          . Springer-Verlag.
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>J.C. Vidal</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Lama</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Bugarín</surname>
          </string-name>
          .
          <article-title>A high-level petri net ontology compatible with PNML</article-title>
          .
          <source>Petri Net Newsletter</source>
          ,
          <volume>17</volume>
          :
          <fpage>11</fpage>
          -
          <lpage>23</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <given-names>Michael</given-names>
            <surname>Weber</surname>
          </string-name>
          and
          <string-name>
            <given-names>Ekkart</given-names>
            <surname>Kindler</surname>
          </string-name>
          .
          <article-title>The petri net markup language</article-title>
          . In Hartmut Ehrig, Wolfgang Reisig, Grzegorz Rozenberg, and Herbert Weber, editors,
          <source>Petri Net Technology for Communication-Based Systems</source>
          , volume
          <volume>2472</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>124</fpage>
          -
          <lpage>144</lpage>
          . Springer Berlin / Heidelberg,
          <year>2003</year>
          .
          <volume>10</volume>
          .1007/978-3-
          <fpage>540</fpage>
          -40022-
          <issue>6</issue>
          _
          <fpage>7</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>