Abstract: This paper introduces Nested Weighted Automata (NWA), a powerful new framework for formal verification that can express complex quantitative properties—like average response time—which are beyond the reach of standard weighted automata. We provide a comprehensive map of the "decidability frontier," showing that while this added expressiveness is potent, many key verification problems remain solvable within reasonable complexity bounds.
Introduction
In formal verification, the goal is to prove that a system meets its specifications. Traditionally, these specifications were Boolean (e.g., "every request is eventually granted"). Recently, the field has shifted toward quantitative specifications, such as "the average response time is less than 5ms." While standard weighted automata (WA) are the standard tool for quantitative properties, they cannot express "average response time" because the value of a run is mathematically bounded by the maximum weight on any single transition. Nested Weighted Automata (NWA) bridge this gap by providing a decidable language for these "unbounded-yet-averagable" performance metrics.
Methodology
The NWA framework introduces a two-layer nesting structure to overcome the limitations of standard WA.
- Master Automaton: This component runs over an infinite word representing the system's lifetime. At each transition, it can "spin off" a slave automaton.
- Slave Automata: These are weighted automata that run over finite subwords. They compute a value (such as a sum of weights representing time elapsed) and return it to the master.
The master automaton then treats these returned values as a sequence of weights and aggregates them using an infinite-word value function, such as limit-average. This structure is inspired by monitor automata used in runtime verification but adapted for the quantitative domain.
Key Insights and Ideas
- Breaking the Boundedness Barrier: By letting slave automata compute values over finite segments before passing them to the master, NWA can handle values that grow indefinitely (like the time between a request and a grant) while still allowing the master to calculate a long-run average.
- The "Regular Slave" Shortcut: If the slave automata only return values from a finite set (Regular Weighted Automata), the entire nested structure can be reduced back to a standard weighted automaton.
- Exponential Succinctness: Even when a property can be expressed by a standard non-deterministic weighted automaton, an NWA can often express it exponentially more concisely, making it a more efficient specification language.
- The Decidability Frontier: The paper identifies exactly where the model becomes too complex to solve. For instance, using a "SUM" slave with a "SUP" (supremum) master makes the emptiness problem undecidable, but using "SUM+" slaves with a "LIMAVG" master remains decidable.
Key Results
- Decidability of Average Response Time: The authors prove that the emptiness problem for (LIMAVG; SUM+) automata—the specific configuration needed for average response time—is decidable in EXPSPACE.
- Complexity Mapping: For simpler slave functions like MIN, MAX, or bounded SUM, the decision problems (emptiness, universality) are PSPACE-complete.
- Succinctness Theorem: Deterministic NWAs can be exponentially smaller than non-deterministic standard weighted automata for the same property.
- Applications: NWA can be used for model-measuring (how much can a model be perturbed before it fails a spec?) and model-repair (what is the minimal change needed to make a failing model pass?).
Conclusion and Future Work
While decidable, the EXPSPACE complexity for the most interesting fragments remains a hurdle for practical implementation in large-scale systems. A major open question is the decidability of the emptiness problem for non-deterministic (LIMAVG; SUM) automata where weights can be negative. Future extensions may include multi-level nesting and moving into probabilistic settings to calculate expected values.
Summary updated