140 likes | 288 Views
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.
E N D
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 [1] PIPE, Platform Independent Petri net Editor, software project from Department of Computing, Imperial College London. http://pipe2.sourceforge.net/ (valid in April 2012)
PNML • Petri Net Markup Language • XML based • PNML.org • No current XSD
Program Structure – Petri Net PetriNet Arc Place Transition petrinetid places transitions arcs placeid tokens incomingArcs outgoingArcs transitionid incomingArcs outgoingArcs arcid weight direction place source target 0..1 0..1 0..1 getMarkings() setMarkings(tuple) 1 1 isEnabled() fire()
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.
Algorithm (created from [TM89]) build rootNode from initial marking Add rootNodeto nodesToProcess While 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
Tests – Dining Philosphers (PNML.org example) – PNML Analyzer