the epnk: ideas and concepts · ekkart kindler the epnk: ideas and concepts 32 extension mechanisms...
TRANSCRIPT
![Page 1: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/1.jpg)
The ePNK: Ideas and concepts
Ekkart Kindler
![Page 2: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/2.jpg)
Ekkart Kindler
2 The ePNK: Ideas and concepts
Motivation
![Page 3: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/3.jpg)
Ekkart Kindler
3 The ePNK: Ideas and concepts
Motivation
:Place
:Transition
:Arc
:Transition
:Place
:Arc
:Arc
source
target source
target
target source
:Arc source target
:Petrinet
:Token
Place Transition
1 source
1 target
Arc
*
PetriNet
Token *
Node
Object
concrete syntax abstract syntax
Place
Transition
Arc
Token
generate an editor
![Page 4: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/4.jpg)
Ekkart Kindler
4 The ePNK: Ideas and concepts
Motivation
![Page 5: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/5.jpg)
Ekkart Kindler
5 The ePNK: Ideas and concepts
Real world issues
Many more features:
Pages, reference nodes, ...
Need to define specific XML syntax (PNML)
Different versions of Petri nets
(each would need a separate GMF-editor)
Definition of new versions of Petri net types
(without touching the existing tool,
without programming at all?)
![Page 6: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/6.jpg)
Ekkart Kindler
6 The ePNK: Ideas and concepts
Outline
Motivation
ePNK & PNML
Overview
Core model
Type model
Mapping to XML
ePNK: Extension mechanisms
![Page 7: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/7.jpg)
Ekkart Kindler
7 The ePNK: Ideas and concepts
PNML in a nutshell
The Petri Net Markup Language (PNML) is an XML-based
transfer format for “all kinds” of Petri nets.
PNML is now an International Standard: ISO/IEC-15909-2
Part 2: focus on high-level nets
Part 3: different extensions
modularity
type and feature definitions
particular versions of Petri nets
…
![Page 8: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/8.jpg)
Ekkart Kindler
8 The ePNK: Ideas and concepts
But ...
![Page 9: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/9.jpg)
Ekkart Kindler
9 The ePNK: Ideas and concepts
PNML and XML
The Petri Net Markup Language (PNML) is an XML-based
transfer format for “all kinds” of Petri nets.
For exchanging, PNML between different tools, the XML
syntax is important; but that’s a technical issue.
The interesting stuff are the concepts of PNML.
![Page 10: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/10.jpg)
Ekkart Kindler
10 The ePNK: Ideas and concepts
Challenges
many versions and variants of Petri nets
with many common features,
but also with many variations,
some fundamental differences,
and many different combinations of the same or similar features
![Page 11: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/11.jpg)
Ekkart Kindler
11 The ePNK: Ideas and concepts
Objective
PNML should enable the exchange of all
kinds of Petri nets, and, ultimately,
alleviate exchanging between Petri net tools
that support different versions of Petri nets
without loosing too much information.
![Page 12: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/12.jpg)
Ekkart Kindler
12 The ePNK: Ideas and concepts
A first example
<place id="p1"/>
<arc id="a1" source="p1" target="t1"/>
<transition id="t1"/>
<arc id="a2" source="t1" target="p2"/>
<place id="p2"/>
![Page 13: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/13.jpg)
Ekkart Kindler
13 The ePNK: Ideas and concepts
A first example
<pnml xmlns="http://www.pnml.org/...">
<net id="n1" type="...">
...
<place id="p1"/>
<arc id="a1" source="p1" target="t1"/>
<transition id="t1"/>
<arc id="a2" source="t1" target="p2"/>
<place id="p2"/>
...
</net>
</pnml>
![Page 14: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/14.jpg)
Ekkart Kindler
14 The ePNK: Ideas and concepts
A first example
...
<place id="p1">
<name>
<text>i</text>
</name>
<initialMarking>
<text>1</text>
</initialMarking>
</place>
...
i action o
1
Label
2
![Page 15: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/15.jpg)
Ekkart Kindler
15 The ePNK: Ideas and concepts
Basic Idea
„All kinds“ of Petri nets can be represented by
places
transitions, and
arcs
along with some
labels
PNML Core Model
Petri Net Type
Definition
«merge»
![Page 16: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/16.jpg)
Ekkart Kindler
16 The ePNK: Ideas and concepts
Outline
Motivation
ePNK & PNML
Overview
Core model
Type model
Mapping to XML
ePNK: Extension mechanisms
![Page 17: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/17.jpg)
Ekkart Kindler
17 The ePNK: Ideas and concepts
Core Model (overview)
Transition Place
source
target Node Arc
Label
*
*
i action o
Object
1 5
PNML Core Model
PetriNet
label
![Page 18: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/18.jpg)
Ekkart Kindler
18 The ePNK: Ideas and concepts
Core Model (overview)
Transition Place
source
target Node Arc
Object Label
*
*
PetriNet
label
![Page 19: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/19.jpg)
Ekkart Kindler
19 The ePNK: Ideas and concepts
Core Model (overview)
Transition Place
source
target Node Arc Annotation Attribute
Label Object
*
* *
i o 2 1
1
PetriNet
label
![Page 20: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/20.jpg)
Ekkart Kindler
20 The ePNK: Ideas and concepts
Name
Core Model (overview)
Transition Place
source
target Node Arc Annotation Attribute
Label Object
*
* *
name
{redefines label}
label
PetriNet
![Page 21: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/21.jpg)
Ekkart Kindler
21 The ePNK: Ideas and concepts
PNML Core Model
pages and
reference
nodes
graphical
information
Tool specific
information
![Page 22: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/22.jpg)
Ekkart Kindler
22 The ePNK: Ideas and concepts
Tool specific information
<initialMarking>
<text>3</text>
<toolspecific tool="org.pnml.tool"
version="1.0">
<tokengraphics>
<tokenposition x="-2" y="-2" />
<tokenposition x="2" y="0" />
<tokenposition x="-2" y="2" />
</tokengraphics>
</toolspecific>
</initialMarking>
![Page 23: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/23.jpg)
Ekkart Kindler
23 The ePNK: Ideas and concepts
Outline
Motivation
ePNK & PNML
Overview
Core model
Type model
Mapping to XML
ePNK: Extension mechanisms
![Page 24: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/24.jpg)
Ekkart Kindler
24 The ePNK: Ideas and concepts
Type Definition: PT-Net
initialMarking
Arc
PTMarking Place
XML_Schema::
NonNegativeInteger XML_Schema::
PositiveInteger
inscription
text text
{redefines label}
{redefines label}
3 2
Annotation
PTInscription
Petri Net Type
Definition
![Page 25: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/25.jpg)
Ekkart Kindler
25 The ePNK: Ideas and concepts
Type Definition: PT-Net
initialMarking
Arc
Place
XML_Schema::
NonNegativeInteger XML_Schema::
PositiveInteger
inscription
text text
{redefines label}
{redefines label}
context Arc inv:
( self.source.isKindOf(Place) and
self.target.isKindOf(Transition) ) or
( self.source.isKindOf(Transition) and
self.target.isKindOf(Place) )
Annotation
PTInscription
PTMarking
![Page 26: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/26.jpg)
Ekkart Kindler
26 The ePNK: Ideas and concepts
Type Definition: HLPNG (overview)
![Page 27: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/27.jpg)
Ekkart Kindler
27 The ePNK: Ideas and concepts
Outline
Motivation
ePNK & PNML
Overview
Core model
Type model
Mapping to XML
ePNK: Extension mechanisms
![Page 28: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/28.jpg)
Ekkart Kindler
28 The ePNK: Ideas and concepts
Core Model in XML
<pnml xmlns="http:...">
<net id="n1" type="...">
<place id="p1"/>
<arc id="a1" source="p1"
target="t1"/>
<transition id="t1"/>
<arc id="a2" source="t1"
target="p2"/>
<place id="p2"/>
</net>
</pnml>
Transition Place
source
target Node Arc
Object
*
PetriNet
![Page 29: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/29.jpg)
Ekkart Kindler
29 The ePNK: Ideas and concepts
XML::
PCDATA
text
Labels in XML
...
<place id="p1">
<name>
<text>i</text>
</name>
<initialMarking>
<text>1</text>
</initialMarking>
</place>
...
Name name
XML_Schema::
NonNegativeInteger
initialMarking
text
PTMarking
PNML Core Model
PT-Net
Node
Place
![Page 30: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/30.jpg)
Ekkart Kindler
30 The ePNK: Ideas and concepts
In general
How can this be defined in general?
Core model: Just implement it
Petri net type: Just implement it, if standard mapping is not good enough.
![Page 31: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/31.jpg)
Ekkart Kindler
31 The ePNK: Ideas and concepts
Outline
Motivation
ePNK & PNML
Overview
Core model
Type model
Mapping to XML
ePNK: Extension mechanisms
![Page 32: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/32.jpg)
Ekkart Kindler
32 The ePNK: Ideas and concepts
Extension mechanisms
Net-types plug-in: A EMF-model plus a factory for producing all the extended elements
PNML-Mapping for new elements (if necessary)
Separate constraints for syntactical constraints (batch and live)
For structured net types: Interface for parsing and linking (in concrete type used Xtext worked surprisingly smooth for parsing and surprisingly bad for serialization)
Extension of graphical appearance of nets elements (dependent on attributes)
PNML-Mapping:
extended mapping that is flexible enough for all our needs (and some more)
hooked into the existing XMI-serialization ( when there is no mapping defined in the ePNK, XMI is used as default, XMI deals with cross-references even when no id’s exist)
![Page 33: The ePNK: Ideas and concepts · Ekkart Kindler The ePNK: Ideas and concepts 32 Extension mechanisms Net-types plug-in: A EMF-model plus a factory for producing all the extended elements](https://reader033.vdocuments.us/reader033/viewer/2022061004/60b2406c2d608f30644cde47/html5/thumbnails/33.jpg)
Ekkart Kindler
33 The ePNK: Ideas and concepts
The ePNK