Lexicographic Ranking Supermartingales: An Efficient Approach to Termination of Probabilistic Programs

09/12/2017
by   Sheshansh Agrawal, et al.
0

Probabilistic programs extend classical imperative programs with real-valued random variables and random branching. The most basic liveness property for such programs is the termination property. The qualitative (aka almost-sure) termination problem given a probabilistic program asks whether the program terminates with probability 1. While ranking functions provide a sound and complete method for non-probabilistic programs, the extension of them to probabilistic programs is achieved via ranking supermartingales (RSMs). While deep theoretical results have been established about RSMs, their application to probabilistic programs with nondeterminism has been limited only to academic examples. For non-probabilistic programs, lexicographic ranking functions provide a compositional and practical approach for termination analysis of real-world programs. In this work we introduce lexicographic RSMs and show that they present a sound method for almost-sure termination of probabilistic programs with nondeterminism. We show that lexicographic RSMs provide a tool for compositional reasoning about almost sure termination, and for probabilistic programs with linear arithmetic they can be synthesized efficiently (in polynomial time). We also show that with additional restrictions even asymptotic bounds on expected termination time can be obtained through lexicographic RSMs. Finally, we present experimental results on abstractions of real-world programs to demonstrate the effectiveness of our approach.

READ FULL TEXT

page 1

page 2

page 3

page 4

01/18/2019

Compositional Analysis for Almost-Sure Termination of Probabilistic Programs

In this work, we consider the almost-sure termination problem for probab...
08/04/2021

On Lexicographic Proof Rules for Probabilistic Termination

We consider the almost-sure (a.s.) termination problem for probabilistic...
08/14/2020

Proving Almost-Sure Termination of Probabilistic Programs via Incremental Pruning

The extension of classical imperative programs with real-valued random v...
02/12/2019

Cost Analysis of Nondeterministic Probabilistic Programs

We consider the problem of expected cost analysis over nondeterministic ...
10/27/2020

Relatively Complete Verification of Probabilistic Programs

We study a syntax for specifying quantitative "assertions" - functions m...
08/29/2017

Efficient Algorithms for Checking Fast Termination in VASS

Vector Addition Systems with States (VASS) consists of a finite state sp...
07/25/2019

Deciding Fast Termination for Probabilistic VASS with Nondeterminism

A probabilistic vector addition system with states (pVASS) is a finite s...