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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
This contrasts MCMC–based analysis, as this is restricted to bounded programs.
- 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.
Notice that \(\mathbb {S}\) is countable and computably enumerable as \(\mathbb {V}\) is finite.
- 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.
Note that, for obvious reasons, we restrict to computable expectations f, g only.
- 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.
We write v for the expectation that in state \(\sigma \) returns \(\sigma (v)\).
- 8.
Here \(F_h^k(X)\) stands for k–fold application of \(F_h\) to X.
- 9.
Again, we stick to the convention that \(\frac{0}{0} = 0\).
References
Baier, C., Katoen, J.P.: Principles of Model Checking. MIT Press, Cambridge (2008)
Davis, M.D.: Computability, Complexity, and Languages: Fundamentals of Theoretical Computer Science. Academic Press, Cambridge (1994)
Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)
Fioriti, L.M.F., Hermanns, H.: Probabilistic termination: soundness, completeness, and compositionality. In: POPL 2015, pp. 489–501. ACM (2015)
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)
Jansen, N., Kaminski, B.L., Katoen, J.P., Olmedo, F., Gretz, F., McIver, A.: Conditioning in probabilistic programming. ENTCS 319, 199–216 (2015)
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)
Kaminski, B.L., Katoen, J.P., Christoph, M.: Inferring covariances for probabilistic programs. ArXiv e-prints, June 2016
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
Kleene, S.C.: Recursive predicates and quantifiers. Trans. AMS 53(1), 41–73 (1943)
McIver, A., Morgan, C.: Abstraction, Refinement and Proof for Probabilistic Systems. Springer, Heidelberg (2004)
Odifreddi, P.: Classical Recursion Theory: The Theory of Functions and Sets of Natural Numbers. Elsevier, Amsterdam (1992)
Odifreddi, P.: Classical Recursion Theory, vol. II. Elsevier, Amsterdam (1999)
Post, E.L.: Recursively enumerable sets of positive integers and their decision problems. Bull. AMS 50(5), 284–316 (1944)
Wechler, W.: Universal Algebra for Computer Scientists. EATCS Monographs on Theoretical Computer Science, vol. 25. Springer, Heidelberg (1992)
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights 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)