Proving Non-inclusion of Büchi Automata Based on Monte Carlo Sampling

Yong Li, Andrea Turrini, Xuechao Sun, Lijun Zhang

Introduction

In the field of formal verification, systems and their specifications are frequently modeled as Büchi Automata (BA). These mathematical constructs are designed to accept infinite sequences of symbols, representing the ongoing behavior of a system. A fundamental task in verification is checking for language inclusion: determining if every behavior exhibited by a system (represented by automaton $\mathcal{A}$) is permitted by its specification (represented by automaton $\mathcal{B}$), denoted as $L(\mathcal{A}) \subseteq L(\mathcal{B})$.

Example of two Büchi Automata, A and B, used to test language inclusion.

Traditionally, this problem is solved by complementing $\mathcal{B}$ and checking if the intersection of $\mathcal{A}$ and $\mathcal{B}^c$ is empty. However, this process is PSPACE-complete, and the size of the complemented automaton $\mathcal{B}^c$ can grow exponentially, leading to significant computational overhead and memory exhaustion in large state spaces.

The $IMC^2$ Algorithm

To overcome the limitations of exhaustive structural methods, this paper introduces $IMC^2$ (Inclusion Monte Carlo). This algorithm shifts the paradigm from absolute proof to statistical sampling, specifically targeting the discovery of counterexamples to language inclusion.

$IMC^2$ utilizes Statistical Hypothesis Testing to provide results with a user-defined error probability ($\epsilon$) and confidence level ($1-\delta$). By calculating the necessary number of samples ($M$) required to reach these thresholds, the tool can efficiently search for "witnesses" of non-inclusion—paths that are accepted by $\mathcal{A}$ but rejected by $\mathcal{B}$.

A sampling tree illustrating the probabilistic exploration of paths within an automaton.

Unlike traditional tools that explore the massive product space of $A \times B^c$, $IMC^2$ performs Direct Sampling from $\mathcal{A}$. It explores paths and checks their membership in $\mathcal{B}$ individually, effectively bypassing the "state space explosion" associated with complementation.

The $K$-Lasso Innovation

A key contribution of this work is the identification of the "Lasso Failure" gap. In standard LTL model checking, counterexamples are typically simple "lassos"—paths ending in a simple cycle. However, for general BA inclusion, a simple lasso in $\mathcal{A}$ might not be sufficient to prove that the path is rejected by $\mathcal{B}$.

The authors introduce the $K$-lasso, a generalized lasso where states can be visited up to $K$ times. This allows the algorithm to find complex counterexamples that "trick" the specification automaton $\mathcal{B}$ into rejection, even if a simple cycle wouldn't. While theoretical bounds for $K$ exist, the researchers found that small values (e.g., $K=3$ to $11$) are highly effective in practice.

Evaluation and Results

The $IMC^2$ algorithm was implemented in a tool called ROLL and benchmarked against state-of-the-art tools like RABIT and SPOT using 16,000 pairs of randomly generated automata.

  • Efficiency: ROLL consistently outperformed traditional tools in finding counterexamples, often returning results in under 2 seconds for cases where other tools timed out or crashed.
  • Scalability: The sampling approach allowed ROLL to handle automata with up to 250 states and large alphabets, surpassing the limits of structural verification tools.
  • Reliability: The empirical failure rate was less than 0.6%, well within the specified statistical confidence levels.

Conclusion

$IMC^2$ provides a powerful "fast-fail" mechanism for formal verification. While it cannot definitively prove inclusion, its ability to rapidly identify bugs in complex systems makes it a valuable complement to exhaustive proof methods. Future work aims to extend this sampling logic to black-box testing and concurrent system verification.

Summary updated

BibTeX
@inproceedings{li2020proving,
  author = {Yong Li and Andrea Turrini and Xuechao Sun and Lijun Zhang},
  title = {{Proving Non-inclusion of Büchi Automata Based on Monte Carlo Sampling}},
  booktitle = {ATVA},
  year = {2020},
  doi = {10.1007/978-3-030-59152-6\_26},
}
Figure