EnPAC: Petri Net Model Checking for Linear Temporal Logic

Zhijun Ding, Cong He, Shuo Li · DOI

Abstract

State generation and exploration (counterexample search) are two cores of explicit-state Petri net model checking for linear temporal logic (LTL). Traditional state generation updates a structure to reduce the computation of all transitions and frequently encodes/decodes to read each encoded state. We present the optimized calculation of enabled transitions on demand by dynamic fireset to avoid such a structure. And we propose direct read/write (DRW) operation on encoded markings without decoding and re-encoding to make state generation faster and reduce memory consumption. To search counterexamples more quickly under an on-the-fly framework, we add heuristic information to the Buchi automaton to guide the exploration in the direction of accepted states. The above strategies can optimize existing methods for LTL model checking. We implement these optimization strategies in a Petri net model-checking tool called EnPAC (Enhanced Petri-net Analyser and Checker) for linear temporal logic. Then, we evaluate it on the benchmarks of MCC (Model Checking Contest), which shows a drastic improvement over the existing methods.

Introduction

Model checking is the gold standard for verifying that concurrent systems, such as distributed software or hardware circuits, behave correctly. These systems are often modeled as Petri nets, and their requirements are specified using Linear Temporal Logic (LTL). The primary hurdle in this field is the "state-explosion problem," where the number of possible system states grows exponentially with the number of components.

Traditional explicit-state checkers struggle because they spend excessive time calculating every possible transition at every state and constantly encoding/decoding data to save memory. Furthermore, when searching for a "counterexample" (a sequence of events proving a bug exists), most tools explore the state space blindly, wasting resources on irrelevant paths. EnPAC (Enhanced Petri-net Analyser and Checker) addresses these issues through three novel optimization strategies.

Methods

EnPAC introduces a trio of high-performance optimizations designed to streamline the model-checking process:

  1. Dynamic Fireset (DYN): Traditional tools calculate all enabled transitions at a state simultaneously. EnPAC takes a "lazy" approach, calculating only one transition at a time on demand. If the search backtracks, it remembers its position and calculates the next transition. This significantly reduces memory and CPU cycles for paths that are never fully explored.
  2. Direct Read/Write (DRW): To save RAM, tools encode "markings" (token distributions). Usually, this requires a slow decode-read-modify-encode cycle. DRW uses bitwise operations and predefined patterns to read or write token counts directly within the compressed bitstream, bypassing the decoding bottleneck entirely.
  3. Heuristic Büchi Automaton (HBA): LTL checking involves synchronizing the system model with a Büchi automaton representing "bad" behavior. EnPAC adds "intelligence" to this automaton by pre-calculating the shortest path to an "accepting" (error) state. This distance guides the search, prioritizing paths likely to find a counterexample faster.
EnPAC System Architecture and Workflow

Key Results

The researchers evaluated EnPAC using the Model Checking Contest (MCC) benchmarks, a massive dataset consisting of 1,016 Petri net instances and 32,512 LTL formulae. The results were compared against top-performing tools from the MCC 2020 competition.

  • Speed and Efficiency: The DRW optimization alone was over 20x faster for 1-safe nets and over 200x faster for P-invariant encodings. The DYN method significantly reduced peak memory usage, allowing the tool to verify complex models within a 16GB limit.
  • Problem Solving Capability: EnPAC successfully provided results for 432 formulae that no other tool could solve in the MCC 2020 competition.
  • Overall Impact: With all three optimizations, EnPAC correctly verified nearly 3,000 more formulae than previous versions, representing a drastic improvement in the state of the art.
Comparison of Time and Memory Performance

Conclusion

EnPAC demonstrates that "laziness" in computation, bit-level surgical precision in data handling, and informed exploration can effectively combat the state-explosion problem. While the HBA strategy can occasionally be counterproductive if the heuristic leads the search into dense areas without errors, its overall performance gains are substantial. Future work will focus on integrating traditional reduction techniques, such as partial order and symmetry reduction, to further enhance EnPAC's capabilities for even larger concurrent systems.

Summary updated

BibTeX
@misc{ding2023enpac,
  author = {Zhijun Ding and Cong He and Shuo Li},
  title = {{EnPAC: Petri Net Model Checking for Linear Temporal Logic}},
  year = {2023},
  eprint = {2307.12324},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.12324},
}
Figure