slides of that presentation

PNML in a nutshell
Ekkart Kindler
Ekkart Kindler
The Petri Net Markup Language (PNML) is an XMLbased transfer format for “all kinds” of Petri nets.
ric
wards a Gene
ler, Weber: To
2000.
Jüngel, Kind
tri Nets. June
Pe
for
at
rm
Fo
Interchange
The Petri Net Markup Language
Some ideas and concepts for defining
Petri Net Type Definitions (PNTDs)
The idea of Petri Net Type Definitions (PNTD) was
there in PNML right from the beginning
Ekkart Kindler
It is used in ISO/IEC 15909-2 without making explicit
what a PNTD is
Denmark’s Technical University
DTU Informatics
illah
Lom H
h
ork wit
Joint w
ers
and oth
We are going to standardise PNTDs in ISO/IEC
15909-3
PNML: Petri Net Type Definitions
PNML Core Model (simplified)
Core Model: XML syntax
Ekkart Kindler
*
*
*
*
Label
label
*
Node
source
Arc
target
Annotation
Attribute
name
Place
Transition
{redefines label}
Name
3
Place
{redefines label}
...
<place id="p1">
<name>
<text>i</text>
</name>
<initialMarking>
<text>1</text>
</initialMarking>
</place>
...
PTMarking
inscription
Arc
context Arc inv:
( self.source.isKindOf(Place) and
self.target.isKindOf(Transition) ) or
( self.source.isKindOf(Transition) and
self.target.isKindOf(Place) )
{redefines label}
text
XML_Schema::
NonNegativeInteger
PNML: Petri Net Type Definitions
PNML Tutorial: Part1 - Theory
*
Object
PTInscription
text
source
Node
Arc
target
Transition
PNML: Petri Net Type Definitions
Label: XML Syntax
Ekkart Kindler
Annotation
initialMarking
PetriNet
Place
PNML: Petri Net Type Definitions
Type Definition (example)
Ekkart Kindler
<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>
ToolInfo
PetriNet
Object
2
XML_Schema::
PositiveInteger
4
Ekkart Kindler
name
Node
Name
text
PNML Core Model
PNML Core Model
XML::
PCDATA
initialMarking
Place
PTMarking
«merge»
PT-Net
PT-Net
text
XML_Schema::
NonNegativeInteger
5
PNML: Petri Net Type Definitions
6
1
PNTD?!
PNTD
Ekkart Kindler
What needs to be defined?
What exactly is a Petri Net Type Definition?
1. Concepts:
What are the labels of this particular Petri net
version?
What needs to be defined?
How should it be defined?
2. Syntax:
How are these labels represented in XML
syntax?
How can it be implemented?
What are the problems?
Very in
terestin
g quest
but too
ion,
diff
now! An icult for me fo
r
y volun
teers?
3. Semantics:
What do they mean?
PNML: Petri Net Type Definitions
7
PNTD
Ekkart Kindler
PNML: Petri Net Type Definitions
8
PNTD: package
Ekkart Kindler
Ekkart Kindler
PTNet
How can it be defined?
Annotation
1. Concepts:
UML class diagram defining a package with the
labels of this type
2. Syntax:
9
Arc
text
XML_Schema::
PositiveInteger
10
Ekkart Kindler
PTNet
Annotation
kind = “element”
name =“initialMarking”
typeEnc = “none”
context Arc inv:
self.net.type = “.../ptnet”
Arc
PTInscription
text
XML_Schema::
NonNegativeInteger
PNTD: annotations
Ekkart Kindler
context Place inv:
self.net.type = “.../ptnet”
Place
inscription
PNML: Petri Net Type Definitions
PTNet
Place
PTMarking
{redefines label}
context Arc inv:
( self.source.isKindOf(Place) and
self.target.isKindOf(Transition) ) or
( self.source.isKindOf(Transition) and
self.target.isKindOf(Place) )
PNML: Petri Net Type Definitions
Annotation
{redefines label}
Arc
Dedicated (PNML) standard mapping of UML to XML
XMI
Annotations of UML model that define syntax
PNTD: package (details)
initialMarking
Place
initialMarking
context Arc inv:
( self.source.isKindOf(Place) and
self.target.isKindOf(Transition) ) or
( self.source.isKindOf(Transition) and
self.target.isKindOf(Place) )
PNML Core
PNML: Petri Net Type Definitions
PNML Tutorial: Part1 - Theory
PTMarking
inscription
text
XML_Schema::
NonNegativeInteger
PTInscription
Place
Place
Arc
Arc
initialMarking
context Arc inv:
( self.source.isKindOf(Place) and
self.target.isKindOf(Transition) ) or
( self.source.isKindOf(Transition) and
self.target.isKindOf(Place) )
text
XML_Schema::
PositiveInteger
11
PNML: Petri Net Type Definitions
PTMarking
inscription
text
XML_Schema::
NonNegativeInteger
PTInscription
kind = “element”
name = “text”
text
XML_Schema::
PositiveInteger
baseType = “…XMLType#NonNegativeInteger”
12
2
PNTD?!
Problem: Type encoding
Ekkart Kindler
What exactly is a Petri Net Type Definition?
What needs to be defined?
EMF technology + ?
<place ...>
<bla>
<text>... </text>
</bla>
</place>
What are the problems?
PNML: Petri Net Type Definitions
13
bla
B
kind = “element”
name =“bla”
typeEnc = “none”
How can it be implemented?
Place
blubs
A
How should it be defined?
Problem: Type encoding
bla
Place
Ekkart Kindler
PNML: Petri Net Type Definitions
14
Problem: Type encoding
Ekkart Kindler
blubs
bla
Place
A
B
Ekkart Kindler
blubs
A
kind = “element”
name =“bla”
typeEnc = “attribute”
B
name = “a”
kind = “element”
name =“bla”
typeEnc = “element”
<place ...>
<bla>
<a>
<text>... </text>
</a>
</bla>
</place>
<place ...>
<bla type="...ptnets.A">
<text>... </text>
</bla>
</place>
PNML: Petri Net Type Definitions
15
Problem: Type encoding
bla
Place
PNML: Petri Net Type Definitions
Other issues and questions
Ekkart Kindler
16
Ekkart Kindler
Extending PNTDs (types as classes in the model)
blubs
Enforcing text/structure pattern for labels
A
kind = “skip”
typeEnc = “element”
w
c is a ne
: typeEn
Problem (not from EMF
n
there
tio
d
annota
ata). An nding
dMetad
Extende be no correspo .
to
data
appears
dedMeta
in Exten
feature
PNML: Petri Net Type Definitions
PNML Tutorial: Part1 - Theory
B
Unknown types / features / namespaces
(if namespaces, where do they come from)
how important is it to know some features of
unknown types?
name = “a”
<place ...>
<a>
<text>... </text>
</a>
</place>
Distinguishing symbols (only for modular PNML)
Would we like to combine PNML with arbitrary XMI
for types?
17
PNML: Petri Net Type Definitions
18
3