Petri nets
What Are Petri Nets?
Petri nets are a formal mathematical modeling language for describing distributed, concurrent, and asynchronous systems. Introduced by Carl Adam Petri in his 1962 doctoral dissertation, a Petri net is a directed bipartite graph composed of two types of nodes: places, represented as circles, and transitions, represented as rectangles or bars, connected by directed arcs. Tokens reside in places, and the distribution of tokens across all places at any moment constitutes the marking, which represents the global state of the modeled system. The dynamic behavior of a Petri net emerges from firing rules that govern when transitions become enabled and how token movement changes the marking. Because Petri nets carry an exact mathematical semantics, they support both graphical representation and rigorous formal analysis, a combination that has made them a standard tool in computer science, systems engineering, and control theory.
The formalism is particularly well suited to discrete-event systems, where state changes occur at distinct points in time rather than continuously. Its visual character makes concurrent behavior, resource sharing, and synchronization visible in a way that purely textual specifications do not.
Formal Structure and Firing Rules
A Petri net is formally defined as a tuple (P, T, F, W, M0), where P is a finite set of places, T is a finite set of transitions, F is a set of directed arcs connecting places to transitions and transitions to places, W assigns integer weights to arcs, and M0 is the initial marking. A transition is enabled when each input place contains at least as many tokens as the arc weight connecting it to that transition. When a transition fires, it consumes tokens from input places and deposits tokens into output places according to the arc weights. This atomic firing rule, described in detail by the ScienceDirect overview of Petri net theory and its applications, supports modeling of parallel processes that proceed independently without global synchronization.
Reachability and Formal Analysis
One of the core strengths of Petri nets is that properties of interest can be analyzed mathematically rather than inferred solely from simulation. The reachability problem asks whether a particular marking is reachable from the initial marking through some sequence of firings; its decidability for general Petri nets was established in the 1980s. Boundedness analysis determines whether the number of tokens in any place remains finite across all reachable markings, a necessary condition for safe implementation. Liveness analysis establishes whether transitions can remain permanently enabled or may be deadlocked, and invariant analysis using place and transition invariants can verify conservation properties without enumerating the full state space. These analysis methods are surveyed in resources such as the Monmouth University course notes on Petri nets for dynamic event-driven system modeling, which describes both the theoretical foundations and their application to real systems.
Extensions and Variants
The basic Petri net formalism has been extended in several directions to model richer system behaviors. Colored Petri nets attach data values to tokens, allowing a single net to represent many interacting process instances concisely. Timed Petri nets introduce durations for transitions or delays in arcs, enabling performance analysis and scheduling studies. Hierarchical Petri nets support the decomposition of complex models into nested submodels. Stochastic Petri nets, in which transition firing times are drawn from probability distributions, allow quantitative reliability and throughput analysis. IEEE Xplore hosts many papers documenting applications of Petri net extensions to concurrent software and hardware verification, covering topics from manufacturing system control to communication protocol design.
Applications
Petri nets have applications in a range of fields, including:
- Concurrent software verification and workflow modeling
- Manufacturing system scheduling and resource allocation
- Communication protocol design and deadlock detection
- Embedded systems and real-time control specification
- Business process modeling and service composition