Bounded expectations: Resource analysis for probabilistic programs

被引:12
|
作者
Ngo V.C. [1 ]
Carbonneaux Q. [2 ]
Hoffmann J. [1 ]
机构
[1] Ngo, Van Chan
[2] Carbonneaux, Quentin
[3] Hoffmann, Jan
来源
| 2018年 / Association for Computing Machinery, 2 Penn Plaza, Suite 701, New York, NY 10121-0701, United States卷 / 53期
关键词
Probabilistic programming; Resource bound analysis; Static analysis;
D O I
10.1145/3192366.3192394
中图分类号
学科分类号
摘要
This paper presents a new static analysis for deriving upper bounds on the expected resource consumption of probabilistic programs. The analysis is fully automatic and derives symbolic bounds that are multivariate polynomials in the inputs. The new technique combines manual state-of-the-art reasoning techniques for probabilistic programs with an effective method for automatic resource-bound analysis of deterministic programs. It can be seen as both, an extension of automatic amortized resource analysis (AARA) to probabilistic programs and an automation of manual reasoning for probabilistic programs that is based on weakest preconditions. An advantage of the technique is that it combines the clarity and compositionality of a weakest-precondition calculus with the efficient automation of AARA. As a result, bound inference can be reduced to off-the-shelf LP solving in many cases and automatically-derived bounds can be interactively extended with standard program logics if the automation fails. Building on existing work, the soundness of the analysis is proved with respect to an operational semantics that is based on Markov decision processes. The effectiveness of the technique is demonstrated with a prototype implementation that is used to automatically analyze 39 challenging probabilistic programs and randomized algorithms. Experiments indicate that the derived constant factors in the bounds are very precise and even optimal for some programs. © 2018 ACM.
引用
收藏
页码:496 / 512
页数:16
相关论文
共 50 条
  • [21] Probabilistic mechanism analysis with bounded random dimension variables
    Luo, Kang
    Du, Xiaoping
    MECHANISM AND MACHINE THEORY, 2013, 60 : 112 - 121
  • [22] Quantitative Analysis of Assertion Violations in Probabilistic Programs
    Wang, Jinyi
    Sun, Yican
    Fu, Hongfei
    Chatterjee, Krishnendu
    Goharshady, Amir Kafshdar
    PROCEEDINGS OF THE 42ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '21), 2021, : 1171 - 1186
  • [23] Runtime analysis of probabilistic programs with unbounded recursion
    Brazdil, Tomas
    Kiefer, Stefan
    Kucera, Antonin
    Varekova, Ivana Hutarova
    JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 2015, 81 (01) : 288 - 310
  • [24] PSense: Automatic Sensitivity Analysis for Probabilistic Programs
    Huang, Zixin
    Wang, Zhenbang
    Misailovic, Sasa
    AUTOMATED TECHNOLOGY FOR VERIFICATION AND ANALYSIS (ATVA 2018), 2018, 11138 : 387 - 403
  • [25] Efficient Analysis of Probabilistic Programs with an Unbounded Counter
    Brazdil, Tomas
    Kiefer, Stefan
    Kucera, Antonin
    JOURNAL OF THE ACM, 2014, 61 (06) : 1 - 35
  • [26] Runtime Analysis of Probabilistic Programs with Unbounded Recursion
    Brazdil, Tomas
    Kiefer, Stefan
    Kucera, Antonin
    Varekova, Ivana Hutarova
    AUTOMATA, LANGUAGES AND PROGRAMMING, ICALP, PT II, 2011, 6756 : 319 - 331
  • [27] Automated Termination Analysis of Polynomial Probabilistic Programs
    Moosbrugger, Marcel
    Bartocci, Ezio
    Katoen, Joost-Pieter
    Kovacs, Laura
    PROGRAMMING LANGUAGES AND SYSTEMS, ESOP 2021, 2021, 12648 : 491 - 518
  • [28] Probabilistic Analysis of Programs: A Weak Limit Approach
    Di Pierro, Alessandra
    Wiklicky, Herbert
    FOUNDATIONAL AND PRACTICAL ASPECTS OF RESOURCE ANALYSIS, FOPARA 2013, 2014, 8552 : 58 - 76
  • [29] Resource Analysis of Distributed and Concurrent Programs
    Albert, Elvira
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2017, (248): : 1 - 1
  • [30] Bounded delay timing analysis of a class of CSP programs
    Hulgaard, H
    Burns, SM
    FORMAL METHODS IN SYSTEM DESIGN, 1997, 11 (03) : 265 - 294