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 条
  • [41] Ordered quantum branching programs are more powerful than ordered probabilistic branching programs under a bounded-width restriction
    Nakanishi, M
    Hamaguchi, K
    Kashiwabara, T
    COMPUTING AND COMBINATORICS, PROCEEDINGS, 2000, 1858 : 467 - 476
  • [42] PMAF: An Algebraic Framework for Static Analysis of Probabilistic Programs
    Wang, Di
    Hoffmann, Jan
    Reps, Thomas
    PROCEEDINGS OF THE 39TH ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, PLDI 2018, 2018, : 513 - 528
  • [43] PMAF: An algebraic framework for static analysis of probabilistic programs
    Wang D.
    Hoffmann J.
    Reps T.
    ACM SIGPLAN Notices, 2018, 53 (04): : 513 - 528
  • [44] Symbolic Side-Channel Analysis for Probabilistic Programs
    Malacaria, Pasquale
    Khouzani, M. H. R.
    Pasareanu, Corina S.
    Quoc-Sang Phan
    Luckow, Kasper
    IEEE 31ST COMPUTER SECURITY FOUNDATIONS SYMPOSIUM (CSF 2018), 2018, : 313 - 327
  • [45] Termination Analysis of Probabilistic Programs Through Positivstellensatz's
    Chatterjee, Krishnendu
    Fu, Hongfei
    Goharshady, Amir Kafshdar
    COMPUTER AIDED VERIFICATION, (CAV 2016), PT I, 2016, 9779 : 3 - 22
  • [46] Central Moment Analysis for Cost Accumulators in Probabilistic Programs
    Wang, Di
    Hoffmann, Jan
    Reps, Thomas
    PROCEEDINGS OF THE 42ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '21), 2021, : 559 - 573
  • [47] Modular Runtime Complexity Analysis of Probabilistic While Programs
    Avanzini, Martin
    Schaper, Michael
    Moser, Georg
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2019, (298): : 76 - +
  • [48] PMAF: An Algebraic Framework for Static Analysis of Probabilistic Programs
    Wang, Di
    Hoffmann, Jan
    Reps, Thomas
    ACM SIGPLAN NOTICES, 2018, 53 (04) : 513 - 528
  • [49] Probabilistic Expectations on Unstructured Spaces
    Beam, John
    COMMUNICATING MATHEMATICS, 2009, 479 : 11 - 24
  • [50] Adaptive risk analysis for resource conservation programs
    Meekhof, R
    Kuzma, J
    Mauriello, D
    Osborn, T
    Powell, M
    Rice, C
    Shafer, S
    RISK-BASED DECISION MAKING IN WATER RESOURCES VIII, 1998, : 172 - 186