PNML Analyzer

14
PNML Analyzer Reachability/Coverability Analysis of Petri Nets from PNML files Roger Ruiz-Carrillo

description

PNML Analyzer. Reachability/ Coverability Analysis of Petri Nets from PNML files Roger Ruiz-Carrillo. Presentation Contents. PNML Program structure Algorithm for reachability/ coverability graph Tests and Comparison with PIPE[1]’s output. - PowerPoint PPT Presentation

Transcript of PNML Analyzer

Page 1: PNML Analyzer

PNML AnalyzerReachability/Coverability

Analysis of Petri Nets from PNML files

Roger Ruiz-Carrillo

Page 2: PNML Analyzer

Presentation Contents

• PNML• Program structure• Algorithm for reachability/coverability graph• Tests and Comparison with PIPE[1]’s output

[1] PIPE, Platform Independent Petri net Editor, software project from Department of Computing, Imperial College London. http://pipe2.sourceforge.net/ (valid in April 2012)

Page 3: PNML Analyzer

PNML

• Petri Net Markup Language• XML based• PNML.org• No current XSD

Page 4: PNML Analyzer

Program Structure – Petri NetPetriNet

getMarkings()setMarkings(tuple)

petrinetidplacestransitionsarcs

Arc

arcidweightdirectionplacesourcetarget

Place

placeidtokensincomingArcsoutgoingArcs

Transition

transitionidincomingArcsoutgoingArcs

isEnabled()fire()

0..1 0..1 0..1

11

Page 5: PNML Analyzer

Program Structure

• PNMLLoader: Unmarshals the petri net from the XML into PetriNet, Place, Arc and Transition objects

• ReachabilityAnalyzer: Creates the reachability/coverability graph and produces the GraphViz output file and XML graph representation.

Page 6: PNML Analyzer

Algorithm (created from [TM89])build rootNode from initial markingAdd rootNode to nodesToProcessWhile there are nodes in nodesToProcess: node = first node in nodesToProcess; remove node from nodesToProcess for each enabled transition in the net with node’s marking: fire the transition and assign the resulting marking to newMarking for inspectedNode in node and all its parents: if(newMarking dominates inspectedNode’s marking) update newMarking with infinity in the proper places if no node with newMarking already exists: create a newNode with the newMarking, assign node as its parent append newNode to nodesToProcess else newNode = existing node append newNode to node’s children along with the enabled transition

[TM89] Tadao Murata, “Petri Nets: Properties, Analysis and Applications”, in Proceedings of the IEEE, vol. 77, no.4, April 1989

Page 7: PNML Analyzer

Tests – Simple Petri Net

Page 8: PNML Analyzer

Tests – Simple Petri Net: PIPE

Page 9: PNML Analyzer

Tests – Simple Petri Net: PNML Analyzer

Page 10: PNML Analyzer

Tests – Dining Philosophers (PIPE example)

Page 11: PNML Analyzer

Tests – Dining Philosophers (PIPE example) - PIPE

Page 12: PNML Analyzer

Tests – Dining Philosophers (PIPE example) – PNML Analyzer

Page 13: PNML Analyzer

Tests – Dining Philosophers (PNML.org example)

Page 14: PNML Analyzer

Tests – Dining Philosphers (PNML.org example) – PNML Analyzer