Newtonian Program Analysis of Probabilistic Programs

被引:0
|
作者
Wang, Di [1 ]
Reps, Thomas [2 ]
机构
[1] Peking Univ, Key Lab High Confidence Software Technol, Minist Educ,Dept Comp Sci & Technol, Sch Comp Sci, Beijing, Peoples R China
[2] Univ Wisconsin, Dept Comp Sci, Madison, WI USA
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2024年 / 8卷 / OOPSLA期
关键词
Probabilistic Programs; Algebraic Program Analysis; Newton's Method; Interprocedural Program Analysis; SYSTEMS;
D O I
10.1145/3649822
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 omega-continuous pre-Markov algebras (l 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 l 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.
引用
收藏
页数:29
相关论文
共 50 条
  • [1] Tensor Program Optimization with Probabilistic Programs
    Shao, Junru
    Zhou, Xiyou
    Feng, Siyuan
    Hou, Bohan
    Lai, Ruihang
    Jin, Hongyi
    Lin, Wuwei
    Masuda, Masahiro
    Yu, Cody Hao
    Chen, Tianqi
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 35 (NEURIPS 2022), 2022,
  • [2] Newtonian Program Analysis
    Esparza, Javier
    Kiefer, Stefan
    Luttenberger, Michael
    JOURNAL OF THE ACM, 2010, 57 (06)
  • [3] Newtonian Program Analysis - An Introduction
    Esparza, Javier
    Luttenberger, Michael
    LOGICS AND LANGUAGES FOR RELIABILITY AND SECURITY, 2010, 25 : 31 - 72
  • [4] A PROBABILISTIC ANALYSIS OF LOOP PROGRAMS
    SZABO, ME
    FARKAS, EJ
    COMPUTER LANGUAGES, 1989, 14 (02): : 125 - 136
  • [5] Incremental Analysis for Probabilistic Programs
    Zhang, Jieyuan
    Sui, Yulei
    Xue, Jingling
    STATIC ANALYSIS (SAS 2017), 2017, 10422 : 450 - 472
  • [6] Probabilistic Program Analysis
    Dwyer, Matthew B.
    Filieri, Antonio
    Geldenhuys, Jaco
    Gerrard, Mitchell
    Pasareanu, Corina S.
    Visser, Willem
    GRAND TIMELY TOPICS IN SOFTWARE ENGINEERING, 2017, 10223 : 1 - 25
  • [7] A Modular Cost Analysis for Probabilistic Programs
    Avanzini, Martin
    Moser, Georg
    Schaper, Michael
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (OOPSLA):
  • [8] Cost Analysis of Nondeterministic Probabilistic Programs
    Wang, Peixin
    Fu, Hongfei
    Goharshady, Amir Kafshdar
    Chatterjee, Krishnendu
    Qin, Xudong
    Shi, Wenjun
    PROCEEDINGS OF THE 40TH ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '19), 2019, : 204 - 220
  • [9] An abstract analysis of the probabilistic termination of programs
    Monniaux, D
    STATIC ANALYSIS, PROCEEDINGS, 2001, 2126 : 111 - 126
  • [10] Probabilistic pointer analysis for multithreaded programs
    El-Zawawy, Mohamed A.
    SCIENCEASIA, 2011, 37 (04): : 344 - 354