Abstract Petri Net Notation
Total Page:16
File Type:pdf, Size:1020Kb
Abstract Petri Net Notation FalkoBause Peter Kemp er Pieter Kritzinger Forschungsb ericht der Universitat Dortmund Lehrstuhl Informatik IV Universitat Dortmund D Dortmund Germany email fbausekemp erglsinformatikunidortmundde Pieter Kritzinger is from Data Network Architecture Lab oratory Department of Computer Science UniversityofCapeTown Private Bag RONDEBOSCH South Africa pskcsuctacza Abstract The need to interchange the description of Petri Net mo dels amongst re searchers and users was recognised as long ago as This do cument prop oses an Abstract Petri Net Notation APNN in whichvarious nets can b e describ ed using a common notation The use of the notation in the context of Petri Net software to ols is shown and the general requirements for such a notation to b e generally acceptable are suggested Keywords in a the notation are similar to L T Xcommands in order to supp ort readabil E ity By employing an appropriate stylele a net description can thus b e a included directly into a L T X source do cument The notation is given for E untimed PlaceTransition Nets and Coloured Petri Nets as well as Gener alised Sto chastic Petri Nets and Hierarchical Petri Nets So eine Arbeit wird eigentlich nie fertig man muss sie fur fertig erklaren wenn man nach Zeit und Umstanden das Moglichste getan hat JW Go ethe Italienische Reise Intro duction Petri Netshave b ecome widely accepted as a formalism for describing concurrent systems and an active community of researchers exist in the eld As the theory of Petri Nets develop ed so were software to ols develop ed to assist the analysis of Petri Nets It was thus recognised as long ago as by Berthelot et al that it would b e an advantage if Petri Net researchers could share their mo del descriptions in some common notation or interface and thereby exploit the existing variety of to ols and user interfaces amongst themselves Suchan interface would have the functionality illustrated in Fig where the P i indicate translations from one to the other of the functions illustrated in that gure PRINTED GRAPHICAL HUMAN ABLE TEXT REPRESENTATION READ P P PETRI NET DESCRIPTION IN ABSTRACT NOTATION INDIVIDUAL TOOL P P LOCAL INTERNAL REPRESENTATION P P P P N GRAPHICAL INTERFACE ANALYZER ANALYZER N DISPLAY RESULTS RESULTS Figure The context of the APNN The biggest advantage of such a common notation is the ability to share analysis algorithms and the implementations of these In this way one can compare the correctness and eciency of such algorithms and avoid their rep eated implementation The authors have for instance b een able to use the Markovchain analyser USENUMdevelop ed at one institution for the analysis of Petri Net mo dels created with a Petri Net user interface develop ed at the other Once one accepts the idea of a common interface description various other advantages other than sharing co de b ecome apparent One could translate the description of a net directly into a printed graphical representation or textual description for do cumentation Requirements of the Notation In general the net notation should satisfy the following criteria for it to b e useful to a wide community Exchangeable A net description should b e in such a format that it can b e easily exchanged in electronic form via eg email or ftp b etween dierent sites Exchangeability is the ma jor reason for having sucha textual notation at all Extensible More p owerful ie highlevel Petri Nets should have a nota tion such that simpler net classes like ConditionEvent Nets app ear as sp ecial cases of such a formalism in a natural way ie intuitive and concise Missing information should default to appropriate val ues A notation should extend from simple nets to highlevel nets in a straightforward way and b e exible enough to allow for future extensions Mo dular and hierarchical These two requirements are strongly related to each other The notation should b e suchthatPetri Net descriptions in a le can b e reused as parts of the description of another larger net or higher level Petri Net Readable Although the graphical description of Petri Nets is one of its ma jor advantages in terms of human readability it is a drawback for interto ol communication Softw are to ols always have a textual de scription for nets in order to store them in les Such a le format is in most cases very concise but not human readable A useful no tation should compromise b etween conciseness and human readability at least in a way that it is easily transformed into a human readable format Ideally this transformation should b e p erformed by public domain software which is generally available The general idea is then other p ersons should b e able to read the description even with out access to the corresp onding to ols or graphical user interfaces GUIs it should b e easy to include the description into printed do cu ments Portability of the graphical representation of the net derived directly from an abstract description is another matter Graphical layout where and whether arcs cross and so on is very much a matter of p ersonal preference One could sp ecify the p osition of elements of the net with resp ect to some predened origin in the notation as T X do es in fact This is not simple to E do without drawing the net in some form or other on a co ordinate system Although not imp ossible to do the authors have decided to avoid the issue for now For the notation the authors decided to cho ose keywords in the textual a description of a net which are similar to L T Xcommands in order to supp ort E readabilityByemploying an appropriate stylele a net description can b e a a directly included into a L T Xdo cument Since L T X is publicdomain E E and widely accepted within the scientic communitywe decided to use a the descriptivepower of L T X as a formal language to dene a textual E description of Petri Nets The remainder of this rep ort is structured as follows We distinguish b e tween timed Petri Nets and untimed Petri Nets In the former category we dene PlaceTransition Nets and give the grammar describing their abstract notation in Sec This grammar is then extended to Coloured Petri Nets in Sec Where timed Petri Nets are concerned we start with Generalised Sto chastic Petri Nets GSPN dened in Sec and Coloured Generalised Sto chastic Petri Nets in Sec Hierarchies are considered in Sec In Sec we dene Hierarc hical Queueing Petri Nets which are new in that they include b oth places in the ordinary sense of Petri Nets and a new typ e of place called queueing places The abstract notation of everyclassofPetri Net is describ ed in Backus Naur Form BNF throughout the remainder of this rep ort Common features of the extended BNF such as rep etition are not used since it clashes with the terminals used for the description of the notation itself Nonterminals are written in upp ercase terminals in lowercase UntimedPetri Nets Petri Nets were inventedinby Carl Adam Petri and are a formalism for the description of concurrency and synchronisation in systems Since rst describ ed byPetri manyvariations of his original nets have b een dened Since the simplest of such nets known as ConditionEvent Nets are easily describ ed by PlaceTransition Nets with a place capacityofonewe shall regard PlaceTransition Nets as the basic kind of net to b egin with In this section we dene an APNN for PlaceTransition Nets and then we extend this notation for Coloured Petri Nets In this do cumentwehave used simple stylele macros but these can b e changed andor extended easily to improve readabili ty In general Petri Nets comprise the following comp onents places usually drawn by circles whichtypically mo del conditions or ob jects tokens usually drawn by black dots which represent the sp ecic value of the condition or ob ject transitions usually drawn by rectangles These mo del activities which change the values of conditions and ob jects arcs sp ecifying the interconnection of places and transitions Petri Nets are clearly bipartite graphs ie one may only connect a place to a transition or vice versa but may not connect places to places or transitions to transitions PlaceTransition Nets Denition A PlaceTransition Net is a tuple PN P T I I M where P fp p g is a nite and nonempty set of places n T ft t g is a nite and nonempty set of transitions m P T e the backward and forward incidence functions I I P T N ar respectively M P N is the initial marking APN Notation for PlaceTransition Nets In the notation which follows the authors have adhered to the requirements describ ed in Sec Nevertheless such a notation is obviously not unique and frequently a matter of p ersonal preference For instance in the notation ID is a nonterminal which denotes a unique place transition or arc identier Place and transition identiers are necessary to sp ecify arcs uniquely The existence of a unique identier is useful in that it allows one no de description to refer to another one byanentity likeID The notation also allows for an additional description whichmaybeempty and need not b e unique asso ciated with an entity name at eachnode description to allow the mo del builder to include a name explanation or comment ab out the function of the no de in the mo del A net description using the notation will obviously b e more concise if cer tain attributes are assumed to have generally accepted default values We thus dene the default value for an arc weight to b e and for the initial marking of a place A place has a capacity of innity unless explicitly stated otherwise