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.
Supplemental Material
Available for Download
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.
- G. Barthe, B. Köpf, F. Olmedo, and S. Zanella Béguelin. Probabilistic relational reasoning for differential privacy. In POPL, 2012. Google Scholar
Digital Library
- S. Bhat, J. Borgström, A. D. Gordon, and C. Russo. Deriving probability density functions from probabilistic functional programs. In TACAS. Springer, 2013. Google Scholar
Digital Library
- J. Bornholt, T. Mytkowicz, and K. S. McKinley. Uncertain<T>: A first-order type for uncertain data. In ASPLOS, 2014. Google Scholar
Digital Library
- M. Carbin, D. Kim, S. Misailovic, and M. C. Rinard. Proving acceptability properties of relaxed nondeterministic approximate programs. In PLDI, 2012. Google Scholar
Digital Library
- M. Carbin, S. Misailovic, and M. Rinard. Verifying quantitative reliability of programs that execute on unreliable hardware. In OOPSLA, 2013. Google Scholar
Digital Library
- A. T. Chaganty, A. V. Nori, and S. K. Rajamani. Efficiently sampling probabilistic programs via program analysis. In AISTATS, 2013.Google Scholar
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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.Google Scholar
Cross Ref
- 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. Google Scholar
Digital Library
- H. Esmaeilzadeh, A. Sampson, L. Ceze, and D. Burger. Neural acceleration for general-purpose approximate programs. In MICRO, 2012. Google Scholar
Digital Library
- H. Esmaeilzadeh, A. Sampson, L. Ceze, and D. Burger. Architecture support for disciplined approximate programming. In ASPLOS, 2012. Google Scholar
Digital Library
- N. D. Goodman, V. K. Mansinghka, D. M. Roy, K. Bonawitz, and J. B. Tenenbaum. Church: A language for generative models. In UAI, 2008.Google Scholar
Digital Library
- O. Kiselyov and C.-C. Shan. Embedded probabilistic programming. In Working Conference on Domain-Specific Languages, 2009. Google Scholar
Digital Library
- D. Koller, D. McAllester, and A. Pfeffer. Effective Bayesian inference for stochastic programs. In AAAI, 1997. Google Scholar
Digital Library
- D. Kozen. Semantics of probabilistic programs. In Symposium on Foundations of Computer Science, pages 101--114, Oct 1979. Google Scholar
Digital Library
- M. Kwiatkowska, G. Norman, and D. Parker. PRISM 4.0: Verification of probabilistic real-time systems. CAV, pages 585--591, 2011. Google Scholar
Digital Library
- C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis and transformation. In CGO, 2004. Google Scholar
Digital Library
- A. Legay and B. Delahaye. Statistical model checking: A brief overview. Quantitative Models: Expressiveness and Analysis, 2010.Google Scholar
Cross Ref
- LLVM Project. LLVM interpreter, 2013. http://llvm.org/docs/doxygen/html/classllvm_1_1Interpreter.html.Google Scholar
- F. D. McSherry. Privacy integrated queries: An extensible platform for privacy-preserving data analysis. In SIGMOD, 2009. Google Scholar
Digital Library
- T. Minka, J. Winn, J. Guiver, and D. Knowles. Infer.NET 2.5, 2012. Microsoft Research Cambridge. http://research.microsoft.com/infernet.Google Scholar
- S. Misailovic, D. M. Roy, and M. C. Rinard. Probabilistically accurate program transformations. In SAS, 2011. Google Scholar
Digital Library
- P. Mohan, A. Thakurta, E. Shi, D. Song, and D. Culler. GUPT: Privacy preserving data analysis made easy. In SIGMOD, 2012. Google Scholar
Digital Library
- S. Narayanan, J. Sartori, R. Kumar, and D. L. Jones. Scalable stochastic processors. In DATE, 2010. Google Scholar
Digital Library
- S. Park, F. Pfenning, and S. Thrun. A probabilistic language based upon sampling functions. In POPL, 2005. Google Scholar
Digital Library
- 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.Google Scholar
- N. Ramsey and A. Pfeffer. Stochastic lambda calculus and monads of probability distributions. In POPL, 2002. Google Scholar
Digital Library
- J. Reed and B. C. Pierce. Distance makes the types grow stronger: A calculus for differential privacy. In ICFP, 2010. Google Scholar
Digital Library
- I. Roy, S. T. V. Setty, A. Kilzer, V. Shmatikov, and E. Witchel. Airavat: Security and privacy for MapReduce. In NSDI, 2010. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- S. Sankaranarayanan, A. Chakarov, and S. Gulwani. Static analysis for probabilistic programs: Inferring whole program properties from finitely many paths. In PLDI, 2013. Google Scholar
Digital Library
- S. Sidiroglou-Douskos, S. Misailovic, H. Hoffmann, and M. Rinard. Managing performance vs. accuracy trade-offs with loop perforation. In FSE, 2011. Google Scholar
Digital Library
- A. Wald. Sequential tests of statistical hypotheses. The Annals of Mathematical Statistics, 16(2):117--186, 1945.Google Scholar
Cross Ref
- D. Wingate, A. Stuhlmüller, and N. D. Goodman. Lightweight implementations of probabilistic programming languages via transformational compilation. In Artificial Intelligence and Statistics, 2011.Google Scholar
- H. Younes. Error control for probabilistic model checking. Verification, Model Checking, and Abstract Interpretation, pages 142--156, 2006. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- Z. A. Zhu, S. Misailovic, J. A. Kelner, and M. Rinard. Randomized accuracy-aware program transformations for efficient approximate computations. In POPL, 2012. Google Scholar
Digital Library
Index Terms
Expressing and verifying probabilistic assertions
Recommendations
Expressing and verifying probabilistic assertions
PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and ImplementationTraditional 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 ...
Static analysis for probabilistic programs: inferring whole program properties from finitely many paths
PLDI '13: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and ImplementationWe propose an approach for the static analysis of probabilistic programs that sense, manipulate, and control based on uncertain data. Examples include programs used in risk analysis, medical decision making and cyber-physical systems. Correctness ...
Verifying concurrent probabilistic systems using probabilistic-epistemic logic specifications
In this paper, we address the problem of verifying probabilistic and epistemic properties in concurrent probabilistic systems expressed in PCTLK. PCTLK is an extension of the Probabilistic Computation Tree Logic (PCTL) augmented with Knowledge (K). In ...







Comments