skip to main content
10.1145/2594291.2594294acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Expressing and verifying probabilistic assertions

Published: 09 June 2014 Publication History

Abstract

Traditional assertions express correctness properties that must hold on every program execution. However, many applications have probabilistic outcomes and consequently their correctness properties are also probabilistic (e.g., they identify faces in images, consume sensor data, or run on unreliable hardware). Traditional assertions do not capture these correctness properties. This paper proposes that programmers express probabilistic correctness properties with probabilistic assertions and describes a new probabilistic evaluation approach to efficiently verify these assertions. Probabilistic assertions are Boolean expressions that express the probability that a property will be true in a given execution rather than asserting that the property must always be true. Given either specific inputs or distributions on the input space, probabilistic evaluation verifies probabilistic assertions by first performing distribution extraction to represent the program as a Bayesian network. Probabilistic evaluation then uses statistical properties to simplify this representation to efficiently compute assertion probabilities directly or with sampling. Our approach is a mix of both static and dynamic analysis: distribution extraction statically builds and optimizes the Bayesian network representation and sampling dynamically interprets this representation. We implement our approach in a tool called Mayhap for C and C++ programs. We evaluate expressiveness, correctness, and performance of Mayhap on programs that use sensors, perform approximate computation, and obfuscate data for privacy. Our case studies demonstrate that probabilistic assertions describe useful correctness properties and that Mayhap efficiently verifies them.

Supplementary Material

ZIP File (p112-sampson-aux.zip)
This file, `passert-aux.pdf`, is a PDF of the addendum to our PLDI 2014 paper, "Expressing and Verifying Probabilistic Assertions," containing the full semantics for the ProbCore language and a proof of the associated theorem.

References

[1]
G. Barthe, B. Köpf, F. Olmedo, and S. Zanella Béguelin. Probabilistic relational reasoning for differential privacy. In POPL, 2012.
[2]
S. Bhat, J. Borgström, A. D. Gordon, and C. Russo. Deriving probability density functions from probabilistic functional programs. In TACAS. Springer, 2013.
[3]
J. Bornholt, T. Mytkowicz, and K. S. McKinley. Uncertain<T>: A first-order type for uncertain data. In ASPLOS, 2014.
[4]
M. Carbin, D. Kim, S. Misailovic, and M. C. Rinard. Proving acceptability properties of relaxed nondeterministic approximate programs. In PLDI, 2012.
[5]
M. Carbin, S. Misailovic, and M. Rinard. Verifying quantitative reliability of programs that execute on unreliable hardware. In OOPSLA, 2013.
[6]
A. T. Chaganty, A. V. Nori, and S. K. Rajamani. Efficiently sampling probabilistic programs via program analysis. In AISTATS, 2013.
[7]
L. N. Chakrapani, B. E. S. Akgul, S. Cheemalavagu, P. Korkmaz, K. V. Palem, and B. Seshasayee. Ultra-efficient (embedded) SOC architectures based on probabilistic CMOS (PCMOS) technology. In DATE, 2006.
[8]
S. Che, M. Boyer, J. Meng, D. Tarjan, J. W. Sheaffer, S.-H. Lee, and K. Skadron. Rodinia: A benchmark suite for heterogeneous computing. In IISWC, 2009.
[9]
H. Chernoff. A measure of asymptotic efficiency for tests of a hypothesis based on the sum of observations. The Annals of Mathematical Statistics, 23(4):493--507, 1952.
[10]
E. M. Clarke and E. A. Emerson. Design and synthesis of synchronization skeletons using branching-time temporal logic. In Workshop on Logic of Programs, pages 52--71, 1982.
[11]
H. Esmaeilzadeh, A. Sampson, L. Ceze, and D. Burger. Neural acceleration for general-purpose approximate programs. In MICRO, 2012.
[12]
H. Esmaeilzadeh, A. Sampson, L. Ceze, and D. Burger. Architecture support for disciplined approximate programming. In ASPLOS, 2012.
[13]
N. D. Goodman, V. K. Mansinghka, D. M. Roy, K. Bonawitz, and J. B. Tenenbaum. Church: A language for generative models. In UAI, 2008.
[14]
O. Kiselyov and C.-C. Shan. Embedded probabilistic programming. In Working Conference on Domain-Specific Languages, 2009.
[15]
D. Koller, D. McAllester, and A. Pfeffer. Effective Bayesian inference for stochastic programs. In AAAI, 1997.
[16]
D. Kozen. Semantics of probabilistic programs. In Symposium on Foundations of Computer Science, pages 101--114, Oct 1979.
[17]
M. Kwiatkowska, G. Norman, and D. Parker. PRISM 4.0: Verification of probabilistic real-time systems. CAV, pages 585--591, 2011.
[18]
C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis and transformation. In CGO, 2004.
[19]
A. Legay and B. Delahaye. Statistical model checking: A brief overview. Quantitative Models: Expressiveness and Analysis, 2010.
[20]
LLVM Project. LLVM interpreter, 2013. http://llvm.org/docs/doxygen/html/classllvm_1_1Interpreter.html.
[21]
F. D. McSherry. Privacy integrated queries: An extensible platform for privacy-preserving data analysis. In SIGMOD, 2009.
[22]
T. Minka, J. Winn, J. Guiver, and D. Knowles. Infer.NET 2.5, 2012. Microsoft Research Cambridge. http://research.microsoft.com/infernet.
[23]
S. Misailovic, D. M. Roy, and M. C. Rinard. Probabilistically accurate program transformations. In SAS, 2011.
[24]
P. Mohan, A. Thakurta, E. Shi, D. Song, and D. Culler. GUPT: Privacy preserving data analysis made easy. In SIGMOD, 2012.
[25]
S. Narayanan, J. Sartori, R. Kumar, and D. L. Jones. Scalable stochastic processors. In DATE, 2010.
[26]
S. Park, F. Pfenning, and S. Thrun. A probabilistic language based upon sampling functions. In POPL, 2005.
[27]
A. Pfeffer. A general importance sampling algorithm for probabilistic programs. Technical Report TR-12-07, Harvard University, 2007. ftp://ftp.deas.harvard.edu/techreports/tr-12-07.pdf.
[28]
N. Ramsey and A. Pfeffer. Stochastic lambda calculus and monads of probability distributions. In POPL, 2002.
[29]
J. Reed and B. C. Pierce. Distance makes the types grow stronger: A calculus for differential privacy. In ICFP, 2010.
[30]
I. Roy, S. T. V. Setty, A. Kilzer, V. Shmatikov, and E. Witchel. Airavat: Security and privacy for MapReduce. In NSDI, 2010.
[31]
A. Sampson, P. Panchekha, T. Mytkowicz, K. S. McKinley, D. Grossman, and L. Ceze. Probabilistic assertions: Extended semantics and proof. ACM Digital Library auxiliary materials accompanying this paper. http://dx.doi.org/10.1145/2594291.2594294.
[32]
A. Sampson, W. Dietl, E. Fortuna, D. Gnanapragasam, L. Ceze, and D. Grossman. EnerJ: Approximate data types for safe and general low-power computation. In PLDI, 2011.
[33]
S. Sankaranarayanan, A. Chakarov, and S. Gulwani. Static analysis for probabilistic programs: Inferring whole program properties from finitely many paths. In PLDI, 2013.
[34]
S. Sidiroglou-Douskos, S. Misailovic, H. Hoffmann, and M. Rinard. Managing performance vs. accuracy trade-offs with loop perforation. In FSE, 2011.
[35]
A. Wald. Sequential tests of statistical hypotheses. The Annals of Mathematical Statistics, 16(2):117--186, 1945.
[36]
D. Wingate, A. Stuhlmüller, and N. D. Goodman. Lightweight implementations of probabilistic programming languages via transformational compilation. In Artificial Intelligence and Statistics, 2011.
[37]
H. Younes. Error control for probabilistic model checking. Verification, Model Checking, and Abstract Interpretation, pages 142--156, 2006.
[38]
H. L. Younes and R. G. Simmons. Statistical probabilistic model checking with a focus on time-bounded properties. Information and Computation, 204(9):1368--1409, 2006.
[39]
Z. A. Zhu, S. Misailovic, J. A. Kelner, and M. Rinard. Randomized accuracy-aware program transformations for efficient approximate computations. In POPL, 2012.

Cited By

View all
  • (2023)Approximate Computing: Hardware and Software Techniques, Tools and Their ApplicationsJournal of Circuits, Systems and Computers10.1142/S021812662430001033:04Online publication date: 20-Sep-2023
  • (2023)Symbolic Semantics for Probabilistic ProgramsQuantitative Evaluation of Systems10.1007/978-3-031-43835-6_23(329-345)Online publication date: 15-Sep-2023
  • (2022)Symbolic execution for randomized programsProceedings of the ACM on Programming Languages10.1145/35633446:OOPSLA2(1583-1612)Online publication date: 31-Oct-2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2014
619 pages
ISBN:9781450327848
DOI:10.1145/2594291
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 49, Issue 6
    PLDI '14
    June 2014
    598 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2666356
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 June 2014

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. approximate computing
  2. data obfuscation
  3. differential privacy
  4. probabilistic programming
  5. sensors
  6. symbolic execution

Qualifiers

  • Research-article

Funding Sources

Conference

PLDI '14
Sponsor:

Acceptance Rates

PLDI '14 Paper Acceptance Rate 52 of 287 submissions, 18%;
Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)62
  • Downloads (Last 6 weeks)4
Reflects downloads up to 04 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Approximate Computing: Hardware and Software Techniques, Tools and Their ApplicationsJournal of Circuits, Systems and Computers10.1142/S021812662430001033:04Online publication date: 20-Sep-2023
  • (2023)Symbolic Semantics for Probabilistic ProgramsQuantitative Evaluation of Systems10.1007/978-3-031-43835-6_23(329-345)Online publication date: 15-Sep-2023
  • (2022)Symbolic execution for randomized programsProceedings of the ACM on Programming Languages10.1145/35633446:OOPSLA2(1583-1612)Online publication date: 31-Oct-2022
  • (2022)Effectful program distancingProceedings of the ACM on Programming Languages10.1145/34986806:POPL(1-30)Online publication date: 12-Jan-2022
  • (2021)ProbNV: probabilistic verification of network control planesProceedings of the ACM on Programming Languages10.1145/34735955:ICFP(1-30)Online publication date: 19-Aug-2021
  • (2021)Fluid: a framework for approximate concurrency via controlled dependency relaxationProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454042(252-267)Online publication date: 19-Jun-2021
  • (2021)Diamont: Dynamic Monitoring of Uncertainty for Distributed Asynchronous ProgramsRuntime Verification10.1007/978-3-030-88494-9_10(184-206)Online publication date: 6-Oct-2021
  • (2021)Probabilistic Lipschitz Analysis of Neural NetworksStatic Analysis10.1007/978-3-030-65474-0_13(274-309)Online publication date: 13-Jan-2021
  • (2020)A general framework for pearlescent materialsACM Transactions on Graphics10.1145/3414685.341778239:6(1-15)Online publication date: 27-Nov-2020
  • (2020)A Methodology for Principled Approximation in Visual SLAMProceedings of the ACM International Conference on Parallel Architectures and Compilation Techniques10.1145/3410463.3414636(373-386)Online publication date: 30-Sep-2020
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media