DeepAI
Log In Sign Up

Modular Runtime Complexity Analysis of Probabilistic While Programs

We are concerned with the average case runtime complexity analysis of a prototypical imperative language endowed with primitives for sampling and probabilistic choice. Taking inspiration from known approaches from to the modular resource analysis of non-probabilistic programs, we investigate how a modular runtime analysis is obtained for probabilistic programs.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

05/18/2022

Automatic Complexity Analysis of Integer Programs via Triangular Weakly Non-Linear Loops

There exist several results on deciding termination and computing runtim...
10/13/2020

Inferring Expected Runtimes of Probabilistic Integer Programs Using Expected Sizes

We present a novel modular approach to infer upper bounds on the expecte...
11/25/2019

Runtime Analysis of Quantum Programs: A Formal Approach

In this extended abstract we provide a first step towards a tool to esti...
02/12/2019

Cost Analysis of Nondeterministic Probabilistic Programs

We consider the problem of expected cost analysis over nondeterministic ...
11/22/2018

Automated Amortised Resource Analysis for Term Rewrite Systems

In this paper we establish an automated amortised resource analysis for ...
09/07/2015

C3: Lightweight Incrementalized MCMC for Probabilistic Programs using Continuations and Callsite Caching

Lightweight, source-to-source transformation approaches to implementing ...
05/07/2022

Slicing of Probabilistic Programs based on Specifications

This paper presents the first slicing approach for probabilistic program...

1 Preliminaries

Multisets

A (possibly infinite) multiset over a set is a mapping . The union of a countably many multisets is defined by

which forms a multiset if and only if is finite for every . The sum of a multiset with respect to is defined by

We use set-like notations for multisets: denotes the empty multiset , is the multiset with , and is its special case where is finite.

Weighted Abstract Reduction Systems

A weighted ARS over state space is a ternary relation . We write meaning . We define the ARS induced by at cost , by the following inference rules:

We say is a normal form with respect to if there exists no with . The set of normal forms with respect to is denoted by . The potential of with respect to is defined by . The weighted ARS is called strongly bounded on , , if for every , there exists such that implies ; This is equivalent to saying that for every .

Weighted Probabilistic Abstract Reduction Systems

A multidistribution on a set is a multiset of pairs of and , written , satisfying . We denote the set of multidistributions on by . Multidistributions are closed under convex multiset unions for every finite or countable infinite index set

and probabilities

with , where scalar multiplication is defined by for .

The restriction of a multidistribution to a set is defined by . For a function , we denote by its homomorphic extension defined by

For , we define the expectation of a function as . Notice that .

Definition 1.

A weighted probabilistic ARS over is a set . As before, we may write for . We define the weighted ARS over induced by as follows:

For a weighted probabilistic ARS , let us define . A weighted probabilistic ARS over is strongly bounded on a set if , i.e., for all .

2 Probabilistic While

We consider an imperative language in the spirit of Dijkstra’s Guarded Command Language [Dijkstra75], endowed with primitives for sampling from discrete distributions as well as non-deterministic and probabilistic choice. Let denote a finite set of integer-valued variables . We denote by the set of stores, that associate variables with their integer contents. The syntax of program commands over is given by the following grammar.

effectless operation
resource consumption
termination
probabilistic assignment