On the Almost-Sure Termination of Probabilistic Counter Programs

Abstract

This paper introduces $k$-d PCPs – the class of probabilistic counter programs with $k \in \mathbb{N}$ counter variables inducing possibly infinite-state Markov chains. We show that the universal (positive) almost-sure termination problem is undecidable for $k$-d PCPs in general, yet decidable for $1$-d PCPs. We present an efficient decision procedure for the latter leveraging the technique of Markov chain finitization. Moreover, we identify several classes of $k$-d PCPs that are reducible to $1$-d PCPs – thus their termination properties can be inferred automatically. Experiments demonstrate that our decision procedure can certify (positive) almost-sure termination – without resorting to invariants or supermartingales – of non-trivial probabilistic programs beyond the scope of existing tools.

Publication
In CAV 2025
Sergei Novozhilov
Sergei Novozhilov
Visitors

My research interests include verification, synthesis, and cyber-physical systems.

Mingqi Yang
Mingqi Yang
Ph.D. Candidate

My research interests include formal verification, programming theory, and mathematical aspects of computer science.

Mingshuai Chen
Mingshuai Chen
ZJU100 Young Professor

My research interests include formal verification, programming theory, and logical aspects of computer science.

Zhiyang Li
Zhiyang Li
M.Sc. Candidate

My research interests include formal verification, programming theory, and Quantum Computation.