Newtonian Program Analysis of Probabilistic Programs
Di Wang, Thomas W. Reps
Abstract
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 probabilistic programs with unstructured control-flow; 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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 50a88a8c-2cc3-4157-9d61-25e69c939375Cited by top-tier papers3
- Inference Plans for Hybrid Particle FilteringEllie Y. Cheng, Eric Atkinson, Guillaume Baudart, Louis Mandel et al.POPL 2025 · 2 citations
- An Incremental Algorithm for Algebraic Program AnalysisChenyu Zhou, Yuzhou Fang, Jingbo Wang, Chao WangPOPL 2025 · 2 citations
- Mechanically Translating Iterative Dataflow Analysis to Algebraic Program AnalysisChenyu Zhou, Jingbo Wang, Chao WangOOPSLA 2026
Builds on7
- Scaling exact inference for discrete probabilistic programsSteven Holtzen, Guy Van den Broeck, Todd D. MillsteinOOPSLA 2020 · 85 citations
- A modular cost analysis for probabilistic programsMartin Avanzini, Georg Moser, Michael SchaperOOPSLA 2020 · 41 citations
- This is the moment for probabilistic loopsMarcel Moosbrugger, Miroslav Stankovic, Ezio Bartocci, Laura KovácsOOPSLA 2022 · 30 citations
- Templates and recurrences: better togetherJason Breck, John Cyphert, Zachary Kincaid, Thomas W. RepsPLDI 2020 · 30 citations
- Central moment analysis for cost accumulators in probabilistic programsDi Wang, Jan Hoffmann, Thomas W. RepsPLDI 2021 · 18 citations
Related papers
- Nonparametric Hamiltonian Monte CarloCarol Mak, Fabian Zaiser, Luke OngICML 2021 · 7 citations
- Exact Bayesian Inference for Loopy Probabilistic Programs using Generating FunctionsLutz Klinkenberg, Christian Blumenthal, Mingshuai Chen, Darion Haase et al.OOPSLA 2024 · 11 citations
- Structural Abstraction and Refinement for Probabilistic ProgramsGuanyan Li, Juanen Li, Zhilei Han, Peixin Wang et al.OOPSLA 2025
- Exploiting the Sparseness of Control-Flow and Call Graphs for Efficient and On-Demand Algebraic Program AnalysisGiovanna Kobus Conrado, Amir Kafshdar Goharshady, Kerim Kochekov, Yun Chen Tsai et al.OOPSLA 2023 · 12 citations
- Compiling Probabilistic Programs for Variable Elimination with Information FlowJianlin Li, Eric Wang, Yizhou ZhangPLDI 2024 · 6 citations
