department of computers and informatics feei, technical university of košice, s lovak republic

21
A SUPPORT TOOL FOR THE REACHABILITY AND OTHER PETRI NETS- RELATED PROBLEMS AND FORMAL DESIGN AND ANALYSIS OF DISCRETE SYSTEMS Department of Computers and Informatics FEEI, Technical University of Košice, Slovak Republic Štefan HUDÁK, Štefan KOREČKO, Slavomír ŠIMOŇÁK

Upload: levana

Post on 17-Mar-2016

50 views

Category:

Documents


1 download

DESCRIPTION

A SUPPORT TOOL FOR THE REACHABILITY AND OTHER PETRI NETS- RELATED PROBLEMS AND FORMAL DESIGN AND ANALYSIS OF DISCRETE SYSTEMS. Department of Computers and Informatics FEEI, Technical University of Košice, S lovak Republic Štefan HUDÁK, Štefan KOREČKO , Slavomír ŠIMOŇÁK. Contents. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

A SUPPORT TOOL FOR THE REACHABILITY AND OTHER PETRI NETS- RELATED PROBLEMS AND FORMAL DESIGN AND ANALYSIS OF DISCRETE SYSTEMS

Department of Computers and InformaticsFEEI, Technical University of Košice, Slovak Republic

Štefan HUDÁK, Štefan KOREČKO, Slavomír ŠIMOŇÁK

Page 2: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

Contents PNtool overview mFDT Environment Supported Petri nets dialects PNtool modes and features PNML support Interfaces

Page 3: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool overview Implemented in Java Supports four Petri nets dialects

Generalized Petri nets (GPN) Time-basic nets (TB nets) Evaluative Petri nets (EvPN) Coloured Petri nets (CPN)

Provides graphical editor simulator formal analyser (invariants, reachability) import/export from/to PNML translation to/from Process algebra, B-AMN

Is a part of the mFDT Environment

Page 4: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

B-MethodTool

PNTool

B Interface

ACPTool

PN Interface

B Interface

User interface

mFDT Environment

Petri nets (PN)is behavior-oriented method, where the invariants of the system described can be derived automatically.

B-Method (B) is model-oriented.It provides the whole development process from abstract formal specification to implementation.

Process algebra (PA) views systems as processes, described in algebraic way. In PA we can deal with de/composition of systems very elegantly.

multi Formal Description Technique Environment Integrates 3 formal methods with

complementary features

Page 5: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

Supported Petri nets dialectsGeneralized Petri nets (GPN)

Time-basic nets (TB nets)1)

Evaluative Petri nets (EvPN)2)

Coloured Petri nets (CPN)1) – time interval semantics introduces by Š. Hudák2) – developed by Š. Hudák

Page 6: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

Supported Petri nets dialectsGeneralized Petri nets Also called Place/Transition nets, “basic” type of Petri nets in PNtool Easy to understand graphical notation - oriented graph with 2 types of vertices:

Places (circles, or ellipses) – hold tokens, represent state of system Transitions (rectangles) – their execution cause the change of state

Valuable analytical properties Automatic derivation of invariants Reachability analysis ...

2

3

p1 p2

p3 p4

t

2

3

p1 p2

p3 p4

t

N=(P, T, pre, post) P={p1,p2,p3,p4} T={t}

pre(p1,t) = 2, post(p1,t)=0 pre(p3,t) = 0, post(p3,t)=1

m0(p1)=2, m1(p3)=1

m0=(2,1,0,1) [t> m1=(0,0,1,4)

t

Page 7: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

Supported Petri nets dialectsTime - basic nets Extension of GPN, incorporates the concept of the time Chronos (timestamp)

associated with each token time when the token has been created semantics: single value (time point)

time interval Time function

associated with each transition relation between the timestamps of removed and created tokens

tmax((4,8),(2,10)) = (4,10) (4,10)+1 = (5,11)

p1 p2

p3

t

(4,8) (2,10)

max(p1,p2)+1

(5,11)

p1 p2

p3

t max(p1,p2)+1

5(5,11)

Page 8: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

Supported Petri nets dialectsEvaluative Petri nets Turing-powerful extension of GPN 3 sets of places :

P – alike the places in GPN (called individual variables ) Pf – with associated functions over the individual variables Pe – with associated predicates over the individual variables

m(p)<0 allowed for p P Pf Transition firing depends also on non-adjacent places

p1

pe1= p

10

p3

p2

2p2

1,1

t1

p1

pe1= p

10

p3

p2

2p2

1,1

t1

t1

P={p1,p2,p3} p1>0 means if m(p1)>0 then m(pe1)=1, else m(pe1)=0Pe={pe1}, Pf= 2p2 means 2* m(p2)

Page 9: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

Supported Petri nets dialectsColoured Petri nets High-level Petri nets Each token has some value: integer, string, tuple, list of values… The same expressional and analytical power as GPN Arc expressions

specify the groups of tokens taken from and delivered to places when transitions are fired Guarding predicates

associated with transitions additional conditions of transitions feasibility

t1

p1

p3

t1

p2

5

131`y1`x

1`x++2`y

x>1

53

3

p1

p3

t1

p21 1`y1`x

1`x++2`y

x>1

Page 10: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool modes and features

Graph. editor

Simulator

Analysis PNMLsupport

Transformation

GPN/TBmode

invariants1)

reachability1)

1)

to APC1)

from ACP1)

to B-AMN1)

EvPNmode to B-AMN

CPNmode 1) – GPN only

Page 11: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool modes and featuresGraphical editor Allows to

draw, save, load and modify a graph of a net.

Offers specialized dialogs for place, transition and arc properties

Page 12: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool modes and featuresSimulator Enabled transitions and the effect of a transition firing are shown directly in the editor Allows to

choose a transition to be fired fire 1, 5 or 50 transitions randomly go back to the previous or to the initial marking

3 simulation modes are available for TB nets: GPN-like mode, time point semantics mode, time interval semantics mode.

5

(5,11)

Page 13: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool modes and featuresEditor and simulator in CPN mode

Page 14: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool modes and featuresInvariants-based analyser Available for GPN Computes

basic place invariants basic transition invariants

Implements Silva method Gaussian elimination method

It is also possible to use the Adriana plug-in (D.A. Zaitsev)

Page 15: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool modes and featuresReachability analyser

Available for GPN Implements original reachability problem

solution by Š. Hudák:1. Construction of an Mw automaton for the given net N.

(fully implemented, including a visualisation)2. Creation and solving of the integer linear programming

problem for Mw and an examined vector q (partially implemented)

Mw automaton special type of finite automaton represents the (possibly infinite) state space of N contains macrostates constructed only once for a given net

Page 16: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool modes and featuresAnalysers - screenshot

Page 17: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNML support Available for GPN and EvPN PNML

Petri Net Markup Language XML-based interchange file format for Petri-nets

New elements defined for EvPN evpnPlace - specifies whether the given place belongs to P, Pe or

Pf, evpnArc - specifies whether a negative

value of marking of the place adjacent to this arc is allowed,

relPlace - includes the name of a place, not connected to this arc, which affects the pre or post value of the arc,

capacity - specifies a capacityof the place adjacent to this arc.

pnm l

net

transitionplace arc

in itia lM ark ing inscription

evpnPlace

evpnArc

re lP lace capacity

Page 18: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool interfaces Theoretical basis: semantics preserving translations

PN Algebra of communicating processes (ACP) 1)

Algebra of process components (APC) PN 1)

EvPN B-Abstact machine notation (B-AMN) 2)

B-AMN CPN 2)

Implementation PN ACP: standalone tool ACP2PETRI APC PN: standalone tool PETRI2APC EvPN B-AMN: implemented in PNtool B-AMN CPN: partial standalone implementation

1) – defined by S. Šimoňák2) – defined by Š. Korečko

Page 19: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

PNtool interfaces: example EvPN B-AMN

MACHINE EvPNfig3VARIABLES sv_1, sv_2, sv_3INVARIANT sv_1:NAT & sv_2:NAT & sv_3:NAT DEFINITIONS grd1== sv_1>0

INITIALISATION sv_1:=1 || sv_2:=2 || sv_3:=0

OPERATIONS op_1= SELECT grd1 & sv_1>=1 THEN sv_1:=sv_1 - 1 || sv_3:=sv_3 + 2*sv_2 ENDEND

p1

pe1= p

10

p3

p2

2p2

1,1

t1

Page 20: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

Future work To add a PNML support for TB nets

require another extension of PNML.

To implement the second step of RP algorithm

To be able to load/edit/save a graph of Mw automaton in PNtool as equivalent P/T net.

To use some 2D graphics framework for the graphical editor and simulator.

Page 21: Department of Computers and Informatics FEEI, Technical University of Košice,  S lovak Republic

Thank you for your patience.

Štefan HUDÁK Štefan KOREČKO

Slavomír ŠIMOŇÁK