Skip to main content

Inferring Covariances for Probabilistic Programs

  • Conference paper
  • First Online:
Quantitative Evaluation of Systems (QEST 2016)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9826))

Included in the following conference series:

Abstract

We study weakest precondition reasoning about the (co)variance of outcomes and the variance of run–times of probabilistic programs with conditioning. For outcomes, we show that approximating (co)variances is computationally more difficult than approximating expected values. In particular, we prove that computing both lower and upper bounds for (co)variances is \(\varSigma _2^0\)–complete. As a consequence, neither lower nor upper bounds are computably enumerable. We therefore present invariant–based techniques that do enable enumeration of both upper and lower bounds, once appropriate invariants are found. Finally, we extend this approach to reasoning about run–time variances.

This work was supported by the Excellence Initiative of the German federal and state government.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    This contrasts MCMC–based analysis, as this is restricted to bounded programs.

  2. 2.

    We restrict ourselves to a finite set of program variables for reasons of cleanness of the presentation. In principle, a countable set of program variables could be allowed.

  3. 3.

    Notice that \(\mathbb {S}\) is countable and computably enumerable as \(\mathbb {V}\) is finite.

  4. 4.

    We make use of the convention that \(\frac{0}{0} = 0\). Note that since our probabilistic choice is a discrete choice and our language does not support sampling from continuous distributions, the problematic case of “\(\frac{0}{0}\)” can only occur if executing C on input \(\sigma \) will result in a violation of an observation with probability 1.

  5. 5.

    Note that, for obvious reasons, we restrict to computable expectations fg only.

  6. 6.

    Note that by “complement” we mean not exactly a set theoretic complement but rather all pairs \((C,\, \sigma )\) such that C does not terminate almost–surely on \(\sigma \).

  7. 7.

    We write v for the expectation that in state \(\sigma \) returns \(\sigma (v)\).

  8. 8.

    Here \(F_h^k(X)\) stands for k–fold application of \(F_h\) to X.

  9. 9.

    Again, we stick to the convention that \(\frac{0}{0} = 0\).

References

  1. Baier, C., Katoen, J.P.: Principles of Model Checking. MIT Press, Cambridge (2008)

    MATH  Google Scholar 

  2. Davis, M.D.: Computability, Complexity, and Languages: Fundamentals of Theoretical Computer Science. Academic Press, Cambridge (1994)

    Google Scholar 

  3. Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)

    MATH  Google Scholar 

  4. Fioriti, L.M.F., Hermanns, H.: Probabilistic termination: soundness, completeness, and compositionality. In: POPL 2015, pp. 489–501. ACM (2015)

    Google Scholar 

  5. Gordon, A.D., Henzinger, T.A., Nori, A.V., Rajamani, S.K.: Probabilistic programming. In: Future of Software Engineering (FOSE), pp. 167–181. ACM (2014)

    Google Scholar 

  6. Jansen, N., Kaminski, B.L., Katoen, J.P., Olmedo, F., Gretz, F., McIver, A.: Conditioning in probabilistic programming. ENTCS 319, 199–216 (2015)

    MathSciNet  Google Scholar 

  7. Kaminski, B.L., Katoen, J.-P.: On the hardness of almost–sure termination. In: Italiano, G.F., Pighizzini, G., Sannella, D.T. (eds.) MFCS 2015. LNCS, vol. 9234, pp. 307–318. Springer, Heidelberg (2015)

    Chapter  Google Scholar 

  8. Kaminski, B.L., Katoen, J.P., Christoph, M.: Inferring covariances for probabilistic programs. ArXiv e-prints, June 2016

    Google Scholar 

  9. Kaminski, B.L., Katoen, J.-P., Matheja, C., Olmedo, F.: Weakest precondition reasoning for expected run–times of probabilistic programs. In: Thiemann, P. (ed.) ESOP 2016. LNCS, vol. 9632, pp. 364–389. Springer, Heidelberg (2016). doi:10.1007/978-3-662-49498-1_15

    Chapter  Google Scholar 

  10. Kleene, S.C.: Recursive predicates and quantifiers. Trans. AMS 53(1), 41–73 (1943)

    Article  MathSciNet  MATH  Google Scholar 

  11. McIver, A., Morgan, C.: Abstraction, Refinement and Proof for Probabilistic Systems. Springer, Heidelberg (2004)

    MATH  Google Scholar 

  12. Odifreddi, P.: Classical Recursion Theory: The Theory of Functions and Sets of Natural Numbers. Elsevier, Amsterdam (1992)

    MATH  Google Scholar 

  13. Odifreddi, P.: Classical Recursion Theory, vol. II. Elsevier, Amsterdam (1999)

    MATH  Google Scholar 

  14. Post, E.L.: Recursively enumerable sets of positive integers and their decision problems. Bull. AMS 50(5), 284–316 (1944)

    Article  MathSciNet  MATH  Google Scholar 

  15. Wechler, W.: Universal Algebra for Computer Scientists. EATCS Monographs on Theoretical Computer Science, vol. 25. Springer, Heidelberg (1992)

    Book  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Benjamin Lucien Kaminski , Joost-Pieter Katoen or Christoph Matheja .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Kaminski, B.L., Katoen, JP., Matheja, C. (2016). Inferring Covariances for Probabilistic Programs. In: Agha, G., Van Houdt, B. (eds) Quantitative Evaluation of Systems. QEST 2016. Lecture Notes in Computer Science(), vol 9826. Springer, Cham. https://doi.org/10.1007/978-3-319-43425-4_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-43425-4_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-43424-7

  • Online ISBN: 978-3-319-43425-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics