Presentation is loading. Please wait.

Presentation is loading. Please wait.

Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 1/18 June 26, 2004 Towards a High-Level Petri Net Type Definition.

Similar presentations


Presentation on theme: "Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 1/18 June 26, 2004 Towards a High-Level Petri Net Type Definition."— Presentation transcript:

1 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 1/18 June 26, 2004 Towards a High-Level Petri Net Type Definition Michael Westergaard Department of Computer Science University of Aarhus Denmark

2 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 2/18June 26, 2004 Difficulties Labels are not just non-negative integers, but can range over an arbitrary domain – is “1`2++4`7” the same as “ +4* ”? High-level Petri nets (HLPN) often support elaborate composition mechanisms, which have to be dealt with – should we extend PNML to support hierarchical nets?

3 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 3/18June 26, 2004 Outline Labels Composition Constructs –Hierarchical Petri Nets –Fusion Implementation Status

4 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 4/18June 26, 2004 Labels We have identified the following labels for high-level Petri nets: –(Names,) –Declarations (of types and variables), –Place types, –Initial markings, –Arc inscriptions, and –Transition guards. To support interchange, we have defined structures for: –Identifiers (for names, declarations, and place markings), –Types (for type declarations), –Multi-sets (for initial markings and arc inscriptions), and –Expressions.

5 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 5/18June 26, 2004 Labels Take as example a net with a place named A with domain INT and initial marking one token with value 2 and four tokens with value 7 We notice 1)Two (three) new labels, the domain, the initial marking (and the name) 2)The initial marking is rather complex, and several reasonable concrete syntaxes can express it, e.g. CPN Tools: 1`2++4`7 CPN-AMI: + 4*

6 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 6/18June 26, 2004 Labels – Solution 1: Store as Concrete Syntax Example We would store the initial marking as follows (using the concrete syntax of CPN Tools): 1`2++4`7 Advantage Very simple approach; high-level labels are a direct generalization of low-level labels Disadvantage Different tools use different syntaxes to express the same –CPN Tools: 1`2++4`7, or –CPN-AMI: + 4*. and this makes interchange difficult

7 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 7/18June 26, 2004 Labels – Solution 2: Store as Abstract Syntax Tree Example We would store the initial marking as follows: 2 7 Advantage Eliminates differences in concrete syntax Disadvantages Difficult to make simple editors that do not completely parse and check inscriptions Cumbersome to add new features, as a new AST node has to be defined

8 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 8/18June 26, 2004 Labels – Solution 3: Mix Abstract and Concrete Syntax Example We would allowing the initial marking to be stored as either: 1`2++4`7 or 2 7 Advantages Tools can save as much or as little using abstract syntax as desired – trade-off between interchangeability and simplicity New features can easily be incorporated by using concrete syntax until an appropriate AST node is defined

9 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 9/18June 26, 2004 Labels – Solution 3: Mix Abstract and Concrete Syntax Added benefits Allows an incremental transition to the interchange format, as tool implementers can choose to save only some (parts of) labels as ASTs Allows the format to be used as primary storage format, as incorrect (and therefore unparsable) inscriptions can be saved using concrete syntax

10 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 10/18June 26, 2004 Composition Constructs A number of composition constructs exist for high-level Petri nets: –Hierarchical nets –Fusion places –Synchronous channels –etc. Composition mechanisms can be represented by adding new labels or special nodes –Example: Fusion places can be implemented by adding a label fusionGroup, which indicates to what fusion group the place belongs

11 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 11/18June 26, 2004 Composition Constructs If we implement the composition constructs by a translation to Modular PNML, they will be available to a wider range of tools –Tools only need to support Modular PNML, and we need not clutter the standard with more or less useful improvements –Modular PNML can be mechanically flattened to Basic PNML, so support for Modular PNML is not essential –Expressed like this, the composition mechanisms are no longer tied to high-level Petri nets

12 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 12/18June 26, 2004 Fusion Places: Canonical Member Page: Producer Page: Consumer A If a tool does not know about fusion places, how do we easily remove the place B from the fusion group? What happens if we have more than one instance of the Consumer-page? Select one member and convert it to a normal place Make all other members point to the selected place Select one member and convert it to a normal place Make all other members point to the selected place

13 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 13/18June 26, 2004 Create a new page with a new place Fusion Places: Create a New Global Place Page: Producer Page: Consumer Page: Storage Storage 1`2++4`7 INT BA Create a new page with a new place Make all the members point to it Create a new page with a new place Make all the members point to it Deletion is now easy: just do it It is easy to add a place to or remove a place from the group: just update the pointer Multiple instances just amount to multiple pointers, which is fine Create a new page with a new place Make all the members point to it

14 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 14/18June 26, 2004 Hierarchical Petri Nets Page: Produce/ConsumePage: Counted transmit Module: Counted transmit AB AB Counted transmit Convert the sub-page to a module Move all port-places to the interface Convert the sub-page to a module Move all port-places to the interface Convert the substitution-transition to an instance of the module Convert the sub-page to a module Move all port-places to the interface Convert the substitution-transition to an instance of the module

15 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 15/18June 26, 2004 Implementation Status A preliminary PNTD for high-level Petri nets is written A transformation from PT-nets to the proposed format has been written A transformation from the current storage-format of CPN Tools to the proposed format has been written A tool for composition of high-level Petri nets stored using the proposed format is written All is available from http://www.daimi.au.dk/~mw/local/pnml/. (the address is also in the paper)

16 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 16/18June 26, 2004 Conclusion We have shown 3 different ways to represent labels: 1)using concrete syntax only, 2)using abstract syntax only, and 3)using a mixture of concrete and abstract syntax. We have argued that the 3 rd way is the best, as it is more flexible and allows interchange between tools not sharing concrete syntax We have seen reasonable ways to translate common composition mechanisms to Modular PNML equivalents, in particular: 1)Hierarchical Petri nets and 2)Fusion Places.

17 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 17/18June 26, 2004 Difficulties Revisited Labels are not just non-negative integers, but can range over an arbitrary domain – is “1`2++4`7” the same as “ +4* ”? Yes, store them as abstract syntax. High-level Petri nets (HLPN) often support elaborate composition mechanisms, which have to be dealt with – should we extend PNML to support hierarchical nets? No, convert them to use Modular PNML.

18 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 18/18June 26, 2004 Future Work Definition of AST nodes for more functions in expressions, such as –arithmetical operators –string operations Division of expressions into reasonable chunks (suitable for e.g. well-formed nets and general coloured Petri nets)

19 Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 19/18June 26, 2004 Labels – Solution 3: Mix Abstract and Concrete Syntax Not a clear-cut separation E. Kindler proposes in the April 2004 proposal for ISO/IEC 15909-2 a similar approach to the representation labels Kindlers proposal requires that a label is stored either using concrete syntax or using abstract syntax Our proposal allows PRIME prime which clearly is a type-declaration even though the type “prime” is not standardized Thus not having a clear-cut separation of abstract and concrete syntax makes it easy to simulate new AST nodes


Download ppt "Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 1/18 June 26, 2004 Towards a High-Level Petri Net Type Definition."

Similar presentations


Ads by Google