Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
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
  • (2022)Conditional Quantitative Program AnalysisIEEE Transactions on Software Engineering10.1109/TSE.2020.301677848:4(1212-1227)Online publication date: 1-Apr-2022
  • (2021)Uncertainty-aware specification and analysis for hardware-in-the-loop testing of cyber-physical systemsJournal of Systems and Software10.1016/j.jss.2020.110813171(110813)Online publication date: Jan-2021
  • (2020)A Survey of Testing Techniques for Approximate Integrated CircuitsProceedings of the IEEE10.1109/JPROC.2020.2999613108:12(2178-2194)Online publication date: Dec-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

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
  • 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
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 June 2014
Published in SIGPLAN Volume 49, Issue 6

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

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)67
  • Downloads (Last 6 weeks)9
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Conditional Quantitative Program AnalysisIEEE Transactions on Software Engineering10.1109/TSE.2020.301677848:4(1212-1227)Online publication date: 1-Apr-2022
  • (2021)Uncertainty-aware specification and analysis for hardware-in-the-loop testing of cyber-physical systemsJournal of Systems and Software10.1016/j.jss.2020.110813171(110813)Online publication date: Jan-2021
  • (2020)A Survey of Testing Techniques for Approximate Integrated CircuitsProceedings of the IEEE10.1109/JPROC.2020.2999613108:12(2178-2194)Online publication date: Dec-2020
  • (2019)Fairness-Aware ProgrammingProceedings of the Conference on Fairness, Accountability, and Transparency10.1145/3287560.3287588(211-219)Online publication date: 29-Jan-2019
  • (2019)Statistical algorithmic profiling for randomized approximate programsProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00071(608-618)Online publication date: 25-May-2019
  • (2019)Approximate Computing: A Survey of Recent Trends—Bringing Greenness to Computing and CommunicationJournal of The Institution of Engineers (India): Series B10.1007/s40031-019-00418-8Online publication date: 20-Jun-2019
  • (2018)Uncertainty Propagation in Data Processing SystemsProceedings of the ACM Symposium on Cloud Computing10.1145/3267809.3267833(95-106)Online publication date: 11-Oct-2018
  • (2018)Conditioning in Probabilistic ProgrammingACM Transactions on Programming Languages and Systems10.1145/315601840:1(1-50)Online publication date: 3-Jan-2018
  • (2018)A Taxonomy of General Purpose Approximate Computing TechniquesIEEE Embedded Systems Letters10.1109/LES.2017.275867910:1(2-5)Online publication date: 1-Mar-2018
  • (2018)Verifying Relative Safety, Accuracy, and Termination for Program ApproximationsJournal of Automated Reasoning10.1007/s10817-017-9421-960:1(23-42)Online publication date: 1-Jan-2018
  • 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