QuAK: Quantitative Automata Kit

Marek Chalupa, Thomas A. Henzinger, Nicolas Mazzocchi, N. Ege Saraç · DOI

Introduction

Formal verification has traditionally focused on binary properties—determining whether a system is "correct" or "incorrect" based on boolean logic. However, modern engineering requirements often demand more nuanced analysis. Questions regarding average power consumption, response time, or resource usage require a quantitative approach. This paper presents QuAK (Quantitative Automata Kit), the first general-purpose software tool designed to automate the analysis and verification of quantitative automata (QA).

Problem Statement

Quantitative Automata extend classical automata by assigning weights to transitions. Instead of simply accepting or rejecting a sequence of events, a QA uses a "value function" (such as limit-average or discounted sum) to aggregate these weights over infinite executions, yielding a real-valued measure of performance.

An example of a Quantitative Automaton (QA) with four states and weighted transitions.

The primary challenge in this field is the computational complexity of key decision problems. For instance, the inclusion problem—determining if one system's performance is always bounded by another's—is PSpace-complete or even undecidable for certain non-deterministic models. Despite over 15 years of theoretical development, the lack of practical tools has hindered the adoption of QA in real-world verification workflows.

Methodology

QuAK is implemented in C++ and supports a variety of value functions, including Inf, Sup, LimInf, LimSup, LimInfAvg, and LimSupAvg. It introduces several technical innovations to make QA analysis feasible:

Antichain-based Inclusion

Traditional "standard" approaches reduce quantitative inclusion to multiple, repeated boolean inclusion checks. QuAK instead generalizes the FORKLIFT algorithm, using a symbolic fixpoint computation with "Families of Quasiorders" (FORQs). This antichain-based heuristic prunes the search space for counterexamples, specifically for LimSup (Büchi-like) automata, leading to significant performance gains.

Constant-Function Checking and Monitoring

The tool includes a procedure to determine if an automaton always returns the same value, a task involving complex reductions to universality problems. Additionally, QuAK can generate quantitative monitors from deterministic QA. These monitors process input letters incrementally to track the "top" and "bottom" achievable values in real-time, enabling runtime performance monitoring.

Evaluation and Results

The authors evaluated QuAK using a combination of synthetic benchmarks and a practical drone simulation case study.

  • Inclusion Performance: In a benchmark of 10,000 randomly generated automata pairs, the antichain algorithm solved nearly 2,000 more instances within a 2-second time limit compared to the baseline standard approach.
  • Structural Optimization: An "scc-search" optimization, which restricts computations to transitions within the same Strongly Connected Component, improved performance in 90% of tested cases.
  • Drone Controller Monitoring: QuAK was used to monitor the "smoothness" of drone trajectories. The tool successfully assigned lower scores to erratic paths and higher scores to optimized ones. These quantitative scores were found to correlate directly with physical energy consumption, demonstrating the monitor's utility as a proxy for hardware resource usage.

Conclusion

QuAK bridges the gap between the theoretical study of quantitative automata and practical engineering applications. By providing a robust suite of algorithms for inclusion, universality, and monitoring, it enables the verification of complex performance-related properties. Future work aims to expand support for Discounted Sum (DSum) automata and explore probabilistic extensions to handle stochastic system behaviors.

Summary updated

BibTeX
@inproceedings{chalupa2024quak,
  author = {Marek Chalupa and Thomas A. Henzinger and Nicolas Mazzocchi and N. Ege Saraç},
  title = {{QuAK: Quantitative Automata Kit}},
  booktitle = {ISoLA},
  year = {2024},
  url = {https://openreview.net/forum?id=uwOha8dTd2},
}
Figure