Abstract
We present a new inductive rule for verifying lower bounds on expected values of random variables after execution of probabilistic loops as well as on their expected runtimes. Our rule is simple in the sense that loop body semantics need to be applied only finitely often in order to verify that the candidates are indeed lower bounds. In particular, it is not necessary to find the limit of a sequence as in many previous rules.
Supplemental Material
- Sheshansh Agrawal, Krishnendu Chatterjee, and Petr Novotný. 2018. Lexicographic Ranking Supermartingales: An Efficient Approach to Termination of Probabilistic Programs. PACMPL 2, POPL (2018), 34:1–34:32.Google Scholar
Digital Library
- Philippe Audebaud and Christine Paulin-Mohring. 2009. Proofs of Randomized Algorithms in Coq. Science of Computer Programming 74, 8 (2009), 568–589.Google Scholar
Digital Library
- Ralph-Johan Back and Joakim von Wright. 1998. Refinement Calculus - A Systematic Introduction. Springer.Google Scholar
- Andrei Baranga. 1991. The Contraction Principle as a Particular Case of Kleene’s Fixed Point Theorem. Discrete Mathematics 98, 1 (1991), 75–79.Google Scholar
Digital Library
- Gilles Barthe, Thomas Espitau, Luis María Ferrer Fioriti, and Justin Hsu. 2016. Synthesizing Probabilistic Invariants via Doob’s Decomposition. In Proc. of the International Conference on Computer–Aided Verification (CAV) (Lecture Notes in Computer Science), Vol. 9779. Springer, 43–61.Google Scholar
- Kevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Thomas Noll. 2019. Quantitative Separation Logic: a Logic for Reasoning about Probabilistic Pointer Programs. PACMPL 3, POPL (2019), 34:1–34:29.Google Scholar
- Kevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Christoph Matheja. 2018. How Long, O Bayesian Network, will I Sample Thee? - A Program Analysis Perspective on Expected Sampling Times. In Proc. of the European Symposium on Programming Languages and Systems (ESOP) (Lecture Notes in Computer Science), Vol. 10801. Springer, 186–213.Google Scholar
- Heinz Bauer. 1971. Probability Theory and Elements of Measure Theory (first english ed.). Holt, Rinehart and Winston, Inc., New York.Google Scholar
- Aleksandar Chakarov and Sriram Sankaranarayanan. 2013. Probabilistic Program Analysis with Martingales. In Proc. of the International Conference on Computer–Aided Verification (CAV) (Lecture Notes in Computer Science), Vol. 8044. Springer, 511–526.Google Scholar
Cross Ref
- Aleksandar Chakarov and Sriram Sankaranarayanan. 2014. Expectation Invariants for Probabilistic Program Loops as Fixed Points. In Proc. of the Static Analysis Symposium (SAS) (Lecture Notes in Computer Science), Vol. 8723. Springer, 85–100.Google Scholar
Cross Ref
- Krishnendu Chatterjee, Hongfei Fu, Petr Novotný, and Rouzbeh Hasheminezhad. 2016. Algorithmic Analysis of Qualitative and Quantitative Termination Problems for Affine Probabilistic Programs. In Proc. of the Symposium on Principles of Programming Languages (POPL). ACM, 327–342.Google Scholar
Digital Library
- Krishnendu Chatterjee, Petr Novotný, and Dorde Zikelic. 2017. Stochastic Invariants for Probabilistic Termination. In Proc. of the Symposium on Principles of Programming Languages (POPL). ACM, 145–160.Google Scholar
Digital Library
- Yu-Fang Chen, Chih-Duo Hong, Bow-Yaw Wang, and Lijun Zhang. 2015. Counterexample–Guided Polynomial Loop Invariant Generation by Lagrange Interpolation. In Proc. of the International Conference on Computer–Aided Verification (CAV) (Lecture Notes in Computer Science), Vol. 9206. Springer, 658–674.Google Scholar
Cross Ref
- David Cock. 2014. pGCL for Isabelle. Archive of Formal Proofs (2014).Google Scholar
- Edsger Wybe Dijkstra. 1975. Guarded Commands, Nondeterminacy and Formal Derivation of Programs. Commun. ACM 18, 8 (1975), 453–457.Google Scholar
Digital Library
- Edsger Wybe Dijkstra. 1976. A Discipline of Programming. Prentice–Hall.Google Scholar
- William Feller. 1971. An Introduction to Probability Theory and its Applications. Vol. II. John Wiley & Sons.Google Scholar
- Yijun Feng, Lijun Zhang, David Nicolaas Jansen, Naijun Zhan, and Bican Xia. 2017. Finding Polynomial Loop Invariants for Probabilistic Programs. In Proc. of the International Symposium on Automated Technology for Verification and Analysis (ATVA) (Lecture Notes in Computer Science), Vol. 10482. Springer, 400–416.Google Scholar
Cross Ref
- Luis María Ferrer Fioriti and Holger Hermanns. 2015. Probabilistic Termination: Soundness, Completeness, and Compositionality. In Proc. of the Symposium on Principles of Programming Languages (POPL). ACM, 489–501.Google Scholar
Digital Library
- Florian Frohn, Matthias Naaf, Jera Hensel, Marc Brockschmidt, and Jürgen Giesl. 2016. Lower Runtime Bounds for Integer Programs. In Proc. of the International Joint Conference on Automated Reasoning (IJCAR) (Lecture Notes in Computer Science), Vol. 9706. Springer, 550–567.Google Scholar
Digital Library
- Hongfei Fu and Krishnendu Chatterjee. 2019. Termination of Nondeterministic Probabilistic Programs. In Proc. of the International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI) (Lecture Notes in Computer Science), Vol. 11388. Springer, 468–490.Google Scholar
Cross Ref
- Andrew D. Gordon, Thomas A. Henzinger, Aditya Vithal Nori, and Sriram K. Rajamani. 2014. Probabilistic Programming. In Proc. of Future of Software Engineering (FOSE). ACM, 167–181.Google Scholar
- Geoffrey Grimmett and David Stirzaker. 2001. Probability and Random Processes. Oxford University Press, Oxford; New York.Google Scholar
- Marcel Hark, Benjamin Lucien Kaminski, Jürgen Giesl, and Joost-Pieter Katoen. 2019. Aiming Low Is Harder - Inductive Proof Rules for Lower Bounds on Weakest Preexpectations in Probabilistic Program Verification. CoRR abs/1904.01117 (2019). arXiv: 1904.01117Google Scholar
- Eric Charles Roy Hehner. 2011. A Probability Perspective. Formal Aspects of Computing 23, 4 (2011), 391–419.Google Scholar
Cross Ref
- Wataru Hino, Hiroki Kobayashi, Ichiro Hasuo, and Bart Jacobs. 2016. Healthiness from Duality. In Proc. of the Annual Symposium on Logic in Computer Science (LICS). ACM, 682–691.Google Scholar
Digital Library
- Mingzhang Huang, Hongfei Fu, and Krishnendu Chatterjee. 2018. New Approaches for Almost–Sure Termination of Probabilistic Programs (Lecture Notes in Computer Science), Vol. 11275. Springer, 181–201.Google Scholar
- Jacek Jachymski, Leslaw Gajek, and Piotr Pokarowski. 2000. The Tarski–Kantorovitch Principle and the Theory of Iterated Function Systems. Bulletin of the Australian Mathematical Society 61, 2 (2000), 247–261.Google Scholar
Cross Ref
- Nils Jansen, Christian Dehnert, Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Lukas Westhofen. 2016. Bounded Model Checking for Probabilistic Programs. In Proc. of the International Symposium on Automated Technology for Verification and Analysis (ATVA) (Lecture Notes in Computer Science), Vol. 9938. Springer, 68–85.Google Scholar
Cross Ref
- Claire Jones. 1990. Probabilistic Non–Determinism. Ph.D. Dissertation. University of Edinburgh, UK.Google Scholar
- Benjamin Lucien Kaminski. 2019. Advanced Weakest Precondition Calculi for Probabilistic Programs. Ph.D. Dissertation. RWTH Aachen University, Germany. http://publications.rwth-aachen.de/record/755408/files/755408.pdfGoogle Scholar
- Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Christoph Matheja. 2019. On the Hardness of Analyzing Probabilistic Programs. Acta Inf. 56, 3 (2019), 255–285.Google Scholar
Digital Library
- Benjamin Lucien Kaminski and Joost-Pieter Katoen. 2017. A Weakest Pre–expectation Semantics for Mixed–sign Expectations. In Proc. of the Annual Symposium on Logic in Computer Science (LICS). IEEE Computer Society, 1–12.Google Scholar
Cross Ref
- Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Federico Olmedo. 2016. Weakest Precondition Reasoning for Expected Run–Times of Probabilistic Programs. In Proc. of the European Symposium on Programming Languages and Systems (ESOP) (Lecture Notes in Computer Science), Vol. 9632. Springer, 364–389.Google Scholar
Digital Library
- Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Federico Olmedo. 2018. Weakest Precondition Reasoning for Expected Runtimes of Randomized Algorithms. Journal of the ACM 65 (2018).Google Scholar
- Joost-Pieter Katoen, Annabelle McIver, Larissa Meinicke, and Carroll Morgan. 2010. Linear-Invariant Generation for Probabilistic Programs: Automated Support for Proof–Based Methods. In Proc. of the Static Analysis Symposium (SAS) (Lecture Notes in Computer Science), Vol. 6337. Springer, 390–406.Google Scholar
Cross Ref
- Klaus Keimel. 2015. Healthiness Conditions for Predicate Transformers. Electr. Notes Theor. Comput. Sci. 319 (2015), 255–270.Google Scholar
Digital Library
- Naoki Kobayashi, Ugo Dal Lago, and Charles Grellois. 2018. On the Termination Problem for Probabilistic Higher-Order Recursive Programs. CoRR abs/1811.02133 (2018). arXiv: 1811.02133Google Scholar
- Dexter Kozen. 1983. A Probabilistic PDL. In Proc. of the Annual Symposium on Theory of Computing (STOC). 291–297.Google Scholar
Digital Library
- Dexter Kozen. 1985. A Probabilistic PDL. J. Comput. System Sci. 30, 2 (1985), 162–178.Google Scholar
Cross Ref
- Jean-Louis Lassez, V. L. Nguyen, and Liz Sonenberg. 1982. Fixed Point Theorems and Semantics: A Folk Tale. Inform. Process. Lett. 14, 3 (1982), 112–116.Google Scholar
Cross Ref
- Annabelle McIver and Carroll Morgan. 2001. Partial Correctness for Probabilistic Demonic Programs. Theoretical Computer Science 266, 1-2 (2001), 513–541.Google Scholar
Digital Library
- Annabelle McIver and Carroll Morgan. 2005. Abstraction, Refinement and Proof for Probabilistic Systems. Springer.Google Scholar
- David Monniaux. 2005. Abstract Interpretation of Programs as Markov Decision Processes. Science of Computer Programming 58, 1–2 (2005), 179–205.Google Scholar
Digital Library
- Carroll Morgan. 1996. Proof Rules for Probabilistic Loops. In Proc. of BCS–FACS 7th Refinement Workshop.Google Scholar
Cross Ref
- Carroll Morgan and Annabelle McIver. 1999. An Expectation–Transformer Model for Probabilistic Temporal Logic. Logic Journal of the Interest Group in Pure and Applied Logics 7, 6 (1999), 779–804.Google Scholar
- Carroll Morgan, Annabelle McIver, and Karen Seidel. 1996. Probabilistic Predicate Transformers. ACM Trans. on Programming Languages and Systems 18, 3 (1996), 325–353.Google Scholar
Digital Library
- Rajeev Motwani and Prabhakar Raghavan. 1995. Randomized Algorithms. Cambridge University Press.Google Scholar
Digital Library
- Van Chan Ngo, Quentin Carbonneaux, and Jan Hoffmann. 2018. Bounded Expectations: Resource Analysis for Probabilistic Programs. In Proc. of the Conference on Programming Language Design and Implementation (PLDI). ACM, 496–512.Google Scholar
Digital Library
- Federico Olmedo, Friedrich Gretz, Nils Jansen, Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Annabelle McIver. 2018. Conditioning in Probabilistic Programming. ACM Trans. on Programming Languages and Systems 40, 1 (2018), 4:1–4:50.Google Scholar
Digital Library
- Federico Olmedo, Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Christoph Matheja. 2016. Reasoning about Recursive Probabilistic Programs. In Proc. of the Annual Symposium on Logic in Computer Science (LICS). ACM, 672–681.Google Scholar
Digital Library
- David Park. 1969. Fixpoint Induction and Proofs of Program Properties. Machine Intelligence 5 (1969).Google Scholar
- George Pólya. 1930. Eine Wahrscheinlichkeitsaufgabe in der Kundenwerbung. Zeitschrift für Angewandte Mathematik und Mechanik 10, 1 (1930), 96–97.Google Scholar
Cross Ref
- Moshe Ya’akov Vardi. 1985. Automatic Verification of Probabilistic Concurrent Finite–State Programs. In Proc. of the Annual Symposium on Foundations of Computer Science (FOCS). IEEE Computer Society, 327–338.Google Scholar
Digital Library
- Peixin Wang, Hongfei Fu, Amir Kafshdar Goharshady, Krishnendu Chatterjee, Xudong Qin, and Wenjun Shi. 2019. Cost Analysis of Nondeterministic Probabilistic Programs. In Proc. of the Conference on Programming Language Design and Implementation (PLDI). ACM, 204–220.Google Scholar
Digital Library
Index Terms
Aiming low is harder: induction for lower bounds in probabilistic program verification
Recommendations
Relatively complete verification of probabilistic programs: an expressive language for expectation-based reasoning
We study a syntax for specifying quantitative assertions—functions mapping program states to numbers—for probabilistic program verification. We prove that our syntax is expressive in the following sense: Given any probabilistic program C, if a function ...
Quantitative separation logic: a logic for reasoning about probabilistic pointer programs
We present quantitative separation logic (QSL). In contrast to classical separation logic, QSL employs quantities which evaluate to real numbers instead of predicates which evaluate to Boolean values. The connectives of classical separation logic, ...
Weakest Precondition Reasoning for Expected Runtimes of Randomized Algorithms
This article presents a wp--style calculus for obtaining bounds on the expected runtime of randomized algorithms. Its application includes determining the (possibly infinite) expected termination time of a randomized algorithm and proving positive ...






Comments