skip to main content
research-article

Expressing and verifying probabilistic assertions

Published:09 June 2014Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

References

  1. G. Barthe, B. Köpf, F. Olmedo, and S. Zanella Béguelin. Probabilistic relational reasoning for differential privacy. In POPL, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Bhat, J. Borgström, A. D. Gordon, and C. Russo. Deriving probability density functions from probabilistic functional programs. In TACAS. Springer, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Bornholt, T. Mytkowicz, and K. S. McKinley. Uncertain<T>: A first-order type for uncertain data. In ASPLOS, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Carbin, D. Kim, S. Misailovic, and M. C. Rinard. Proving acceptability properties of relaxed nondeterministic approximate programs. In PLDI, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Carbin, S. Misailovic, and M. Rinard. Verifying quantitative reliability of programs that execute on unreliable hardware. In OOPSLA, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. T. Chaganty, A. V. Nori, and S. K. Rajamani. Efficiently sampling probabilistic programs via program analysis. In AISTATS, 2013.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. H. Esmaeilzadeh, A. Sampson, L. Ceze, and D. Burger. Neural acceleration for general-purpose approximate programs. In MICRO, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. H. Esmaeilzadeh, A. Sampson, L. Ceze, and D. Burger. Architecture support for disciplined approximate programming. In ASPLOS, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. O. Kiselyov and C.-C. Shan. Embedded probabilistic programming. In Working Conference on Domain-Specific Languages, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. D. Koller, D. McAllester, and A. Pfeffer. Effective Bayesian inference for stochastic programs. In AAAI, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Kozen. Semantics of probabilistic programs. In Symposium on Foundations of Computer Science, pages 101--114, Oct 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Kwiatkowska, G. Norman, and D. Parker. PRISM 4.0: Verification of probabilistic real-time systems. CAV, pages 585--591, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis and transformation. In CGO, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Legay and B. Delahaye. Statistical model checking: A brief overview. Quantitative Models: Expressiveness and Analysis, 2010.Google ScholarGoogle ScholarCross RefCross Ref
  20. LLVM Project. LLVM interpreter, 2013. http://llvm.org/docs/doxygen/html/classllvm_1_1Interpreter.html.Google ScholarGoogle Scholar
  21. F. D. McSherry. Privacy integrated queries: An extensible platform for privacy-preserving data analysis. In SIGMOD, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. T. Minka, J. Winn, J. Guiver, and D. Knowles. Infer.NET 2.5, 2012. Microsoft Research Cambridge. http://research.microsoft.com/infernet.Google ScholarGoogle Scholar
  23. S. Misailovic, D. M. Roy, and M. C. Rinard. Probabilistically accurate program transformations. In SAS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. P. Mohan, A. Thakurta, E. Shi, D. Song, and D. Culler. GUPT: Privacy preserving data analysis made easy. In SIGMOD, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Narayanan, J. Sartori, R. Kumar, and D. L. Jones. Scalable stochastic processors. In DATE, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. Park, F. Pfenning, and S. Thrun. A probabilistic language based upon sampling functions. In POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  28. N. Ramsey and A. Pfeffer. Stochastic lambda calculus and monads of probability distributions. In POPL, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. Reed and B. C. Pierce. Distance makes the types grow stronger: A calculus for differential privacy. In ICFP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. I. Roy, S. T. V. Setty, A. Kilzer, V. Shmatikov, and E. Witchel. Airavat: Security and privacy for MapReduce. In NSDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. S. Sankaranarayanan, A. Chakarov, and S. Gulwani. Static analysis for probabilistic programs: Inferring whole program properties from finitely many paths. In PLDI, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. S. Sidiroglou-Douskos, S. Misailovic, H. Hoffmann, and M. Rinard. Managing performance vs. accuracy trade-offs with loop perforation. In FSE, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. A. Wald. Sequential tests of statistical hypotheses. The Annals of Mathematical Statistics, 16(2):117--186, 1945.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle Scholar
  37. H. Younes. Error control for probabilistic model checking. Verification, Model Checking, and Abstract Interpretation, pages 142--156, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Z. A. Zhu, S. Misailovic, J. A. Kelner, and M. Rinard. Randomized accuracy-aware program transformations for efficient approximate computations. In POPL, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Expressing and verifying probabilistic assertions

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!