Bounded Expectations: Resource Analysis for Probabilistic Programs

11/24/2017
by   Van Chan Ngo, et al.
0

This paper presents a new static analysis for deriving upper bounds on the expected resource consumption of probabilistic programs. The analysis is fully automatic and derives symbolic bounds that are multivariate polynomials of the inputs. The new technique combines manual state-of-the-art reasoning techniques for probabilistic programs with an effective method for automatic resource-bound analysis of deterministic programs. It can be seen as both, an extension of automatic amortized resource analysis (AARA) to probabilistic programs and an automation of manual reasoning for probabilistic programs that is based on weakest preconditions. As a result, bound inference can be reduced to off-the-shelf LP solving in many cases and automatically-derived bounds can be interactively extended with standard program logics if the automation fails. Building on existing work, the soundness of the analysis is proved with respect to an operational semantics that is based on Markov decision processes. The effectiveness of the technique is demonstrated with a prototype implementation that is used to automatically analyze 39 challenging probabilistic programs and randomized algorithms. Experimental results indicate that the derived constant factors in the bounds are very precise and even optimal for many programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/24/2020

Raising Expectations: Automating Expected Cost Analysis with Types

This article presents a type-based analysis for deriving upper bounds on...
research
08/02/2020

Concentration-Bound Analysis for Probabilistic Programs and Probabilistic Recurrence Relations

Analyzing probabilistic programs and randomized algorithms are classical...
research
02/21/2020

Exponential Amortized Resource Analysis

Automatic amortized resource analysis (AARA) is a type-based technique f...
research
01/05/2018

Verifying and Synthesizing Constant-Resource Implementations with Types

We propose a novel type system for verifying that programs correctly imp...
research
08/18/2021

Selectively-Amortized Resource Bounding (Extended Version)

We consider the problem of automatically proving resource bounds. That i...
research
04/03/2023

Automated Expected Value Analysis of Recursive Programs

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

Exponential Automatic Amortized Resource Analysis

Automatic amortized resource analysis (AARA) is a type-based technique f...

Please sign up or login with your details

Forgot password? Click here to reset