Newtonian Program Analysis of Probabilistic Programs

07/18/2023
by   Di Wang, et al.
0

Due to their quantitative nature, probabilistic programs pose non-trivial challenges for designing compositional and efficient program analyses. Many analyses for probabilistic programs rely on iterative approximation. This article presents an interprocedural dataflow-analysis framework, called NPA-PMA, for designing and implementing (partially) non-iterative program analyses of probabilistic programs with unstructured control-flow, nondeterminism, and general recursion. NPA-PMA is based on Newtonian Program Analysis (NPA), a generalization of Newton's method to solve equation systems over semirings. The key challenge for developing NPA-PMA is to handle multiple kinds of confluences in both the algebraic structures that specify analyses and the equation systems that encode control flow: semirings support a single confluence operation, whereas NPA-PMA involves three confluence operations (conditional, probabilistic, and nondeterministic). Our work introduces ω-continuous pre-Markov algebras (ωPMAs) to factor out common parts of different analyses; adopts regular infinite-tree expressions to encode program-execution paths in control-flow hyper-graphs; and presents a linearization method that makes Newton's method applicable to the setting of regular-infinite-tree equations over ωPMAs. NPA-PMA allows analyses to supply a non-iterative strategy to solve linearized equations. Our experimental evaluation demonstrates that (i) NPA-PMA holds considerable promise for outperforming Kleene iteration, and (ii) provides great generality for designing program analyses.

READ FULL TEXT
research
01/20/2020

Probabilistic Output Analyses for Deterministic Programs — Reusing Existing Non-probabilistic Analyses

We consider reusing established non-probabilistic output analyses (eithe...
research
06/29/2018

Supercompiling String Programs Using Word Equations as Constraints

We describe a general parameterized scheme of program and constraint ana...
research
10/15/2018

Synthesizing Program-Specific Static Analyses

Designing a static analysis is generally a substantial undertaking, requ...
research
01/05/2021

Control-Data Separation and Logical Condition Propagation for Efficient Inference on Probabilistic Programs

We introduce a novel sampling algorithm for Bayesian inference on impera...
research
11/16/2018

Precondition Inference via Partitioning of Initial States

Precondition inference is a non-trivial task with several applications i...
research
01/29/2020

Optimal and Perfectly Parallel Algorithms for On-demand Data-flow Analysis

Interprocedural data-flow analyses form an expressive and useful paradig...
research
08/27/2021

Identifying Non-Control Security-Critical Data in Program Binaries with a Deep Neural Model

As control-flow protection methods get widely deployed it is difficult f...

Please sign up or login with your details

Forgot password? Click here to reset