Supermartingales, Ranking Functions and Probabilistic Lambda Calculus

02/22/2021
by   Andrew Kenyon-Roberts, et al.
0

We introduce a method for proving almost sure termination in the context of lambda calculus with continuous random sampling and explicit recursion, based on ranking supermartingales. This result is extended in three ways. Antitone ranking functions have weaker restrictions on how fast they must decrease, and are applicable to a wider range of programs. Sparse ranking functions take values only at a subset of the program's reachable states, so they are simpler to define and more flexible. Ranking functions with respect to alternative reduction strategies give yet more flexibility, and significantly increase the applicability of the ranking supermartingale approach to proving almost sure termination, thanks to a novel (restricted) confluence result which is of independent interest. The notion of antitone ranking function was inspired by similar work by McIver, Morgan, Kaminski and Katoen in the setting of a first-order imperative language, but adapted to a higher-order functional language. The sparse ranking function and confluent semantics extensions are unique to the higher-order setting. Our methods can be used to prove almost sure termination of programs that are beyond the reach of methods in the literature, including higher-order and non-affine recursion.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/15/2019

A static higher-order dependency pair framework

We revisit the static dependency pair method for proving termination of ...
research
09/10/2021

Termination Analysis of Programs with Multiphase Control-Flow

Programs with multiphase control-flow are programs where the execution p...
research
04/22/2023

Fairness in Ranking Supermartingales

Lexicographic Ranking SuperMartingale (LexRSM) is a generalization of Ra...
research
08/07/2020

Distilling Programs to Prove Termination

The problem of determining whether or not any program terminates was sho...
research
02/07/2021

Neural Termination Analysis

We introduce a novel approach to the automated termination analysis of c...
research
02/02/2023

A Typed Lambda-Calculus for Establishing Trust in Probabilistic Programs

The extensive deployment of probabilistic algorithms has radically chang...
research
05/21/2019

Termination of Triangular Integer Loops is Decidable

We consider the problem whether termination of affine integer loops is d...

Please sign up or login with your details

Forgot password? Click here to reset