On Probabilistic Termination of Functional Programs with Continuous Distributions

04/11/2021
by   Raven Beutner, et al.
0

We study termination of higher-order probabilistic functional programs with recursion, stochastic conditioning and sampling from continuous distributions. Reasoning about the termination probability of programs with continuous distributions is hard, because the enumeration of terminating executions cannot provide any non-trivial bounds. We present a new operational semantics based on traces of intervals, which is sound and complete with respect to the standard sampling-based semantics, in which (countable) enumeration can provide arbitrarily tight lower bounds. Consequently we obtain the first proof that deciding almost-sure termination (AST) for programs with continuous distributions is Π^0_2-complete. We also provide a compositional representation of our semantics in terms of an intersection type system. In the second part, we present a method of proving AST for non-affine programs, i.e., recursive programs that can, during the evaluation of the recursive body, make multiple recursive calls (of a first-order function) from distinct call sites. Unlike in a deterministic language, the number of recursion call sites has direct consequences on the termination probability. Our framework supports a proof system that can verify AST for programs that are well beyond the scope of existing methods. We have constructed prototype implementations of our method of computing lower bounds of termination probability, and AST verification.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/14/2018

New Approaches for Almost-Sure Termination of Probabilistic Programs

We study the almost-sure termination problem for probabilistic programs....
research
02/13/2023

Lower Bounds for Possibly Divergent Probabilistic Programs

We present a new proof rule for verifying lower bounds on quantities of ...
research
04/06/2019

System FR as Foundations for Stainless

We present the design, implementation, and foundation of a verifier for ...
research
08/04/2021

On Lexicographic Proof Rules for Probabilistic Termination

We consider the almost-sure (a.s.) termination problem for probabilistic...
research
07/27/2021

The Probabilistic Termination Tool Amber

We describe the Amber tool for proving and refuting the termination of a...
research
04/03/2023

Automated Expected Value Analysis of Recursive Programs

In this work, we study the fully automated inference of expected result ...
research
10/23/2020

Intersection Types and (Positive) Almost-Sure Termination

Randomized higher-order computation can be seen as being captured by a l...

Please sign up or login with your details

Forgot password? Click here to reset