Intersection Types and (Positive) Almost-Sure Termination

10/23/2020
by   Ugo Dal Lago, et al.
0

Randomized higher-order computation can be seen as being captured by a lambda calculus endowed with a single algebraic operation, namely a construct for binary probabilistic choice. What matters about such computations is the probability of obtaining any given result, rather than the possibility or the necessity of obtaining it, like in (non)deterministic computation. Termination, arguably the simplest kind of reachability problem, can be spelled out in at least two ways, depending on whether it talks about the probability of convergence or about the expected evaluation time, the second one providing a stronger guarantee. In this paper, we show that intersection types are capable of precisely characterizing both notions of termination inside a single system of types: the probability of convergence of any lambda-term can be underapproximated by its type, while the underlying derivation's weight gives a lower bound to the term's expected number of steps to normal form. Noticeably, both approximations are tight – not only soundness but also completeness holds. The crucial ingredient is non-idempotency, without which it would be impossible to reason on the expected number of reduction steps which are necessary to completely evaluate any term. Besides, the kind of approximation we obtain is proved to be optimal recursion theoretically: no recursively enumerable formal system can do better than that.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/15/2019

Types by Need (Extended Version)

A cornerstone of the theory of lambda-calculus is that intersection type...
research
07/20/2019

Factoring Derivation Spaces via Intersection Types (Extended Version)

In typical non-idempotent intersection type systems, proof normalization...
research
03/21/2022

Curry and Howard Meet Borel

We show that an intuitionistic version of counting propositional logic c...
research
04/23/2019

Intersection Types for Unboundedness Problems

Intersection types have been originally developed as an extension of sim...
research
04/11/2021

On Probabilistic Termination of Functional Programs with Continuous Distributions

We study termination of higher-order probabilistic functional programs w...
research
04/19/2022

Strategies for Asymptotic Normalization

We present a technique to study normalizing strategies when termination ...
research
09/15/2017

Confluence and Convergence in Probabilistically Terminating Reduction Systems

Convergence of an abstract reduction system (ARS) is the property that a...

Please sign up or login with your details

Forgot password? Click here to reset