Petri Nets for Automatic Wave Digital Code Generation
Jonas Röhrig, Karlheinz OchsABSTRACT
Wave Digital (WD) models are a well‐established framework for the emulation of linear and nonlinear circuits. In practice, however, WD models are still implemented largely manually or through limited automated toolchains. Manual programming of WD models is time‐consuming and error‐prone for larger systems with pronounced algebraic dependencies, and existing frameworks lack a unified semantic representation from which parameterization, evaluation, and executable code can be derived and generated automatically in a backend‐agnostic manner. The aim of this work is to enable fully automatic generation of executable WD models from a declarative specification, by introducing a semantic framework that makes parameterization and timestep‐level evaluation dependencies explicit and directly compilable. We introduce a typed declarative graph as a modeling interface, specifying topology, parameters, and algebraic dependencies. From this graph, each element is mapped to two complementary local Petri nets: one representing parameter dependencies for parameterization, and one representing signal dependencies for timestep‐level evaluation. These nets are composed into global Petri nets that serve as a semantic intermediate representation whose firing semantics directly induce admissible evaluation orders and can be lowered systematically into backend‐specific executable code. The Petri net representation naturally enables future use of established analysis techniques, dynamic execution, model checking, and the development of loop‐breaking heuristics through systematic Petri net exploration.