As far as I can tell, this talk outlines the architecture for "PetriNet Studio," a Software-as-a-Service (SaaS) platform for simulating and analyzing Petri nets. The project, part of the speaker's master's thesis, aims to replace outdated, monolithic academic tools with a modern, cloud-native microservices architecture. The core of the backend is a C++ engine that leverages a simple matrix-based "state equation" for simulation, which is optimized for performance using modern C++ features like mdspan, concepts, and SIMD vectorization. Concurrency is managed via a custom Monitor pattern built on J-threads. The platform is designed to support formal analysis of system properties using algorithms like the Minimal Coverability Tree, with a focus on mitigating the classic problem of state-space explosion. The overall goal is to create a high-performance, extensible tool for modeling complex concurrent systems.
PetriNet Studio: A Modern C++ Approach to System Simulation
0:56 The Problem: Debugging concurrent systems is fundamentally hard. Petri nets provide a mathematical and visual tool to model, analyze, and verify such systems before implementation.
8:31 Project Motivation: Current Petri net tools are mostly old, monolithic desktop applications. This project aims to build a modern, scalable, and accessible cloud-native (SaaS) alternative.
12:17 Core Engine - The State Equation: The simulation is based on a simple matrix addition (Next State = Current State + Incidence Matrix * Firing Sequence). This mathematical approach avoids the overhead of object-oriented modeling and is highly suitable for hardware acceleration.
13:50 System Architecture: The platform is a microservices-based system. A C++ backend runs the core simulation, a Go service handles the API and frontend communication, and the user interface is built in React.
19:54 Modern C++ for Performance: The project relies heavily on modern C++ features. mdspan is used for zero-copy views of large matrices, concepts enforce compile-time correctness, and SIMD intrinsics are planned for vectorized computation on the CPU.
21:23 Concurrency Control: A Monitor design pattern is implemented using J-threads to manage safe, concurrent access to the Petri net's state, preventing data races during simulation.
24:51 Formal Analysis: The platform isn't just a simulator. It's intended to run analysis algorithms, notably the Minimal Coverability Tree, which explores all reachable states of a system to find deadlocks or other critical flaws.
30:02 Key Challenge - State Explosion: The primary risk is the "coverability blow-up," where the number of possible system states grows exponentially, quickly exhausting memory and computational resources. The project uses techniques like hash pruning and omega propagation to manage this.
32:11 Future Ambitions: The architecture is designed with future extensions in mind, including using GPUs for parallel computation and potentially evolving from a simulator into an emulator by connecting to FPGAs for real-world hardware interaction.