(Object Petri Nets in Tcl) is a C++ extension providing an object-oriented interpreter for defining, checking and running Petri Nets
, developed at the Technical University of Ilmenau.
The Petri net class of opntcl supports tokens which contain data. A special feature of opntcl is the possibility to assign Tcl scripts to the transitions of the Petri net. The firing of the transition starts the assigned Tcl script.
- Normal net elements like places, transitions, pre and post arcs
- Special arcs like test and inhibitor arcs
- Special places (RamPlace, QueuePlace, StackPlace, PrioQueuePlace) which handle tokens which contain data
- Hierachical subnets with hierachical simulation.
- Socket communication for distributed net simulation.
OPNTcl extends the Tcl language by a set of specific script commands like Transition, Place or QueuePlace etc. Further commands are provided for tokens, data class definition and net execution. A special hierarchy concept is supported that allows use of sub nets like sub-routines.
If a post-arc definition addresses a machine name the tokens may flow across the Internet to the addressed place located on a remote machine.
High-level nets with data values attached to the tokens are possible. For definition of the data structures the package provides the DataClass command. Although Tcl stores all data values in their string representations the package defines five predefined base data classes: string, int, char, double and boolean.
An OPNTcl model combines data flow and the flow of code which may view and modify the data.
Source code: [1
See: world-wide token flow using object petri nets based on tcl