# Static analysis for probabilistic programs: inferring whole program properties from finitely many paths

@article{Sankaranarayanan2013StaticAF, title={Static analysis for probabilistic programs: inferring whole program properties from finitely many paths}, author={Sriram Sankaranarayanan and Aleksandar Chakarov and Sumit Gulwani}, journal={Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation}, year={2013} }

We propose an approach for the static analysis of probabilistic programs that sense, manipulate, and control based on uncertain data. Examples include programs used in risk analysis, medical decision making and cyber-physical systems. Correctness properties of such programs take the form of queries that seek the probabilities of assertions over program variables. We present a static analysis approach that provides guaranteed interval bounds on the values (assertion probabilities) of such…

## Figures and Tables from this paper

## 118 Citations

Bounded expectations: resource analysis for probabilistic programs

- Computer ScienceProceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation
- 2018

A new static analysis for deriving upper bounds on the expected resource consumption of probabilistic programs that combines the clarity and compositionality of a weakest-precondition calculus with the efficient automation of AARA.

Bounded expectations: resource analysis for probabilistic programs

- Computer SciencePLDI
- 2018

A new static analysis for deriving upper bounds on the expected resource consumption of probabilistic programs that combines the clarity and compositionality of a weakest-precondition calculus with the efficient automation of AARA.

Exact and approximate probabilistic symbolic execution for nondeterministic programs

- Computer ScienceASE
- 2014

These algorithms significantly improve upon a state-of-the-art statistical model checking algorithm, originally developed for Markov Decision Processes, and introduce approximate algorithms to search for good schedulers that resolve nondeterminism to maximize the probability of reaching a target event.

Expectation Invariants for Probabilistic Program Loops as Fixed Points

- Computer ScienceSAS
- 2014

This work defines the notion of expectation invariants, and demonstrates their usefulness in analyzing probabilistic program loops, and uses existing concepts from abstract interpretation theory to present an iterative analysis that synthesizes expectation invariant inequalities involving the expected values of program expressions at the loop head.

PMAF: an algebraic framework for static analysis of probabilistic programs

- Computer SciencePLDI
- 2018

This paper presents a framework, called PMAF, for designing, implementing, and proving the correctness of static analyses of probabilistic programs with challenging features such as recursion, unstructured control-flow, divergence, nondeterminism, and continuous distributions.

PMAF: an algebraic framework for static analysis of probabilistic programs

- Computer ScienceProceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation
- 2018

This paper presents a framework, called PMAF, for designing, implementing, and proving the correctness of static analyses of probabilistic programs with challenging features such as recursion, unstructured control-flow, divergence, nondeterminism, and continuous distributions.

Stochastic invariants for probabilistic termination

- Computer Science, MathematicsPOPL 2017
- 2016

The notion of stochastic invariants, which are constraints along with a probability bound that the constraints hold, are formally defined and a concept of repulsing supermartingales is introduced, which can be used to obtain bounds on the probability of the stochastics invariants.

Expressing and verifying probabilistic assertions

- Computer SciencePLDI 2014
- 2014

The proposed approach is a mix of both static and dynamic analysis: distribution extraction statically builds and optimizes the Bayesian network representation and sampling dynamically interprets this representation and demonstrates that Mayhap efficiently verifies probabilistic assertions.

Iterative distribution-aware sampling for probabilistic symbolic execution

- Computer ScienceESEC/SIGSOFT FSE
- 2015

An iterative distribution-aware sampling approach to support probabilistic symbolic execution for arbitrarily complex mathematical constraints and continuous input distributions is proposed, where the symbolic constraints are decomposed into sub-problems whose solution can be solved independently.

Slicing probabilistic programs

- Computer SciencePLDI 2014
- 2014

By applying the Sli transformation as a pre-pass, this work can improve the efficiency of probabilistic inference, not only in its own inference tool R2, but also in other systems for performing inference such as Church and Infer.NET.

## References

SHOWING 1-10 OF 43 REFERENCES

Probabilistic symbolic execution

- Computer ScienceISSTA 2012
- 2012

An extension of the widely used Symbolic PathFinder symbolic execution system that calculates path probabilities is presented, exploiting state-of-the-art computational algebra techniques to count the number of solutions to path conditions, yielding exact results for path probabilities.

Abstract Interpretation of Programs as Markov Decision Processes

- Computer ScienceSAS
- 2003

A formal language for the specification of trace properties of probabilistic, nondeterministic transition systems, encompassing the properties expressible in Linear Time Logic, and an enhancement of this technique when the state space is partitioned, allowing the use of faster iteration methods.

Probabilistically Accurate Program Transformations

- Computer ScienceSAS
- 2011

The standard approach to program transformation involves the use of discrete logical reasoning to prove that the transformation does not change the observable semantics of the program. We propose a…

Path slicing

- Computer SciencePLDI '05
- 2005

The method combines the ability of program slicing to look at several program paths, with the precision that dynamic slicing enjoys by focusing on a single path, to analyze possible counterexamples returned by the software model checker Blast.

Statistical probabilistic model checking with a focus on time-bounded properties

- Computer ScienceInf. Comput.
- 2006

A Framework for Verification of Software with Time and Probabilities

- Computer ScienceFORMATS
- 2010

A framework for quantitative verification of software that exhibits both real-time and probabilistic behaviour, and an outline of a quantitative abstraction refinement approach, which can be used to automatically construct and analyse abstractions of Probabilistic, real- time programs.

PRISM 4.0: Verification of Probabilistic Real-Time Systems

- Computer ScienceCAV
- 2011

A major new release of the PRISMprobabilistic model checker is described, adding, in particular, quantitative verification of (priced) probabilistic timed automata.

Abstraction, Refinement and Proof for Probabilistic Systems

- Computer ScienceMonographs in Computer Science
- 2005

Probabilistic guarded commands and their refinement logic.- to pGCL: Its logic and its model.- Probabilistic loops: Invariants and variants.- Case studies in termination: Choice coordination, the…

Probabilistic Abstract Interpretation

- Computer ScienceESOP
- 2012

The probabilistic abstraction framework that is proposed allows us to systematically lift any classical analysis or verification method to the Probabilistic setting by separating in the program semantics the probabilism behavior from the (non-)deterministic behavior.

Dynamic Enforcement of Knowledge-Based Security Policies

- Computer Science2011 IEEE 24th Computer Security Foundations Symposium
- 2011

This paper explores the idea of knowledge-based security policies, which are used to decide whether to answer queries over secret data based on an estimation of the querier's (possibly increased) knowledge given the results, using a novel probabilistic polyhedral domain.