Invariants for One-Counter Automata with Disequality Tests
Dmitry Chistikov, Jérôme Leroux, Henry Sinclair-Banks, Nicolas Waldburger
TL;DR
This work studies reachability in one-counter automata with disequality tests and proves a tight placement in the second level of the polynomial hierarchy, specifically coNP^{NP}, via a novel leaky-invariant framework that overapproximates a core portion of the reachability set. It introduces forward and backward invariants within strongly connected components and composes them across the SCC structure using a separator mechanism to certify non-reachability. When equality tests are added, the complexity rises to P^{NP^{NP}}, reflecting the higher expressive power needed to lift candidate runs. The approach relies on concise descriptions of invariant cores (arithmetic progressions within bounded chains) and a lifting technique that connects local analyses to global reachability. Overall, the results advance the theoretical understanding of OCA with tests and offer a compositional method that could inform practical invariant construction for VASS-like systems.
Abstract
We study the reachability problem for one-counter automata in which transitions can carry disequality tests. A disequality test is a guard that prohibits a specified counter value. This reachability problem has been known to be NP-hard and in PSPACE, and characterising its computational complexity has been left as a challenging open question by Almagor, Cohen, Pérez, Shirmohammadi, and Worrell (2020). We reduce the complexity gap, placing the problem into the second level of the polynomial hierarchy, namely into the class $\mathsf{coNP}^{\mathsf{NP}}$. In the presence of both equality and disequality tests, our upper bound is at the third level, $\mathsf{P}^{\mathsf{NP}^{\mathsf{NP}}}$. To prove this result, we show that non-reachability can be witnessed by a pair of invariants (forward and backward). These invariants are almost inductive. They aim to over-approximate only a "core" of the reachability set instead of the entire set. The invariants are also leaky: it is possible to escape the set. We complement this with separate checks as the leaks can only occur in a controlled way.
