Skip to main content
QUICK REVIEW

[Paper Review] Lexicographic Ranking Supermartingales: An Efficient Approach to Termination of Probabilistic Programs

Sheshansh Agrawal, Krishnendu Chatterjee|arXiv (Cornell University)|Sep 12, 2017
Decision-Making and Behavioral EconomicsDecision Sciences30 citations
TL;DR

This paper introduces lexicographic ranking supermartingales (Lex-RSMs), a novel method for proving almost-sure termination of probabilistic programs with nondeterminism. It extends lexicographic ranking functions—widely used in non-probabilistic program analysis—to probabilistic settings, enabling efficient, compositional, and polynomial-time synthesis for linear arithmetic programs, with applications to real-world abstractions.

ABSTRACT

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.

Motivation & Objective

  • Address the lack of practical, compositional methods for almost-sure termination analysis in probabilistic programs with nondeterminism.
  • Extend the successful paradigm of lexicographic ranking functions from non-probabilistic to probabilistic programs.
  • Develop algorithmic techniques for synthesizing lexicographic RSMs efficiently, particularly for linear arithmetic programs.
  • Enable compositional reasoning about termination by leveraging lexicographic structures in probabilistic systems.
  • Provide a foundation for synthesizing bounds on expected termination time using restricted lexicographic RSMs.

Proposed method

  • Introduce lexicographic ranking supermartingales (Lex-RSMs) as a generalization of standard RSMs, where a vector of supermartingales is used to track progress across multiple dimensions.
  • Define a lexicographic ordering on the components of the supermartingale vector to ensure strict decrease in expectation under the program’s transition relation.
  • Use linear programming techniques to synthesize linear lexicographic RSMs in polynomial time for programs with linear arithmetic.
  • Introduce a compositional proof rule based on Lex-RSMs that allows modular verification of termination across program components.
  • Apply additional constraints to Lex-RSMs to derive asymptotic upper bounds on expected termination time.
  • Evaluate the approach on abstractions of real-world probabilistic programs to demonstrate practical effectiveness.

Experimental results

Research questions

  • RQ1Can lexicographic ranking supermartingales provide a sound and complete method for almost-sure termination in probabilistic programs with nondeterminism?
  • RQ2Can Lex-RSMs be synthesized efficiently (e.g., in polynomial time) for programs with linear arithmetic?
  • RQ3To what extent can Lex-RSMs support compositional reasoning in the verification of probabilistic programs?
  • RQ4Can restricted forms of Lex-RSMs yield asymptotic bounds on expected termination time?
  • RQ5How effective are Lex-RSMs in practice when applied to real-world program abstractions?

Key findings

  • Lexicographic ranking supermartingales provide a sound method for proving almost-sure termination in probabilistic programs with nondeterminism.
  • For probabilistic programs with linear arithmetic, lexicographic RSMs can be synthesized in polynomial time using linear programming.
  • The method supports compositional reasoning, enabling modular verification of program components.
  • With additional structural constraints, Lex-RSMs can be used to derive asymptotic upper bounds on expected termination time.
  • Experimental evaluation on abstractions of real-world programs demonstrates the practical effectiveness and scalability of the approach.
  • The framework extends the applicability of RSM-based termination analysis beyond academic examples to realistic, non-trivial probabilistic programs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.