Abstract
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 f is expressible in our syntax, then the function mapping each initial state σ to the expected value of evaluated in the final states reached after termination of C on σ (also called the weakest preexpectation wp[C](f)) is also expressible in our syntax.
As a consequence, we obtain a relatively complete verification system for reasoning about expected values and probabilities in the sense of Cook: Apart from proving a single inequality between two functions given by syntactic expressions in our language, given f, g, and C, we can check whether g ≼ wp[C](f).
- Krzysztof R. Apt and Ernst-Rüdiger Olderog. 2019. Fifty years of Hoare's logic. Formal Asp. Comput. 31, 6 ( 2019 ), 751-807. https://doi.org/10.1007/s00165-019-00501-3 Google Scholar
Digital Library
- Kevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Christoph Matheja. 2020. Relatively Complete Verification of Probabilistic Programs-Extended Version. CoRR ( 2020 ). to appear.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. Proc. ACM Program. Lang. 3, POPL ( 2019 ), 34 : 1-34 : 29.Google Scholar
Digital Library
- Joseph Bertrand. 1849. Traité d'Arithmétique. Libraire de L. Hachette et Cie.Google Scholar
- Olivier Bournez and Florent Garnier. 2005. Proving Positive Almost-Sure Termination. In Term Rewriting and Applications, 16th International Conference, RTA 2005, Nara, Japan, April 19-21, 2005, Proceedings (Lecture Notes in Computer Science, Vol. 3467 ), Jürgen Giesl (Ed.). Springer, 323-337. https://doi.org/10.1007/978-3-540-32033-3_24 Google Scholar
Digital Library
- Georg Cantor. 1878. Ein Beitrag zur Mannigfaltigkeitslehre. Journal für die reine und angewandte Mathematik 1878, 84 ( 1878 ), 242-258.Google Scholar
- Aleksandar Chakarov and Sriram Sankaranarayanan. 2013. Probabilistic Program Analysis with Martingales. In Computer Aided Verification-25th International Conference, CAV 2013, Saint Petersburg, Russia, July 13-19, 2013. Proceedings (Lecture Notes in Computer Science, Vol. 8044 ), Natasha Sharygina and Helmut Veith (Eds.). Springer, 511-526.Google Scholar
Cross Ref
- Krishnendu Chatterjee, Hongfei Fu, and Amir Kafshdar Goharshady. 2016a. Termination Analysis of Probabilistic Programs Through Positivstellensatz's. In Computer Aided Verification-28th International Conference, CAV 2016, Toronto, ON, Canada, July 17-23, 2016, Proceedings, Part I (Lecture Notes in Computer Science, Vol. 9779 ), Swarat Chaudhuri and Azadeh Farzan (Eds.). Springer, 3-22.Google Scholar
Cross Ref
- Krishnendu Chatterjee, Hongfei Fu, Petr Novotný, and Rouzbeh Hasheminezhad. 2016b. Algorithmic analysis of qualitative and quantitative termination problems for afine probabilistic programs. In Proceedings of the 43rd Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, POPL 2016, St. Petersburg, FL, USA, January 20-22, 2016, Rastislav Bodík and Rupak Majumdar (Eds.). ACM, 327-342.Google Scholar
- Krishnendu Chatterjee, Hongfei Fu, Petr Novotný, and Rouzbeh Hasheminezhad. 2018. Algorithmic Analysis of Qualitative and Quantitative Termination Problems for Afine Probabilistic Programs. ACM Trans. Program. Lang. Syst. 40, 2 ( 2018 ), 7 : 1-7 : 45.Google Scholar
Digital Library
- Krishnendu Chatterjee, Petr Novotný, and Dorde Zikelic. 2017. Stochastic invariants for probabilistic termination. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017, Giuseppe Castagna and Andrew D. Gordon (Eds.). ACM, 145-160.Google Scholar
Digital Library
- Stephen A. Cook. 1978. Soundness and Completeness of an Axiom System for Program Verification. SIAM J. Comput. 7 ( 1978 ), 70-90.Google Scholar
- Patrick Cousot and Michael Monerau. 2012. Probabilistic Abstract Interpretation. In Programming Languages and Systems-21st European Symposium on Programming, ESOP 2012, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2012, Tallinn, Estonia, March 24-April 1, 2012. Proceedings (Lecture Notes in Computer Science, Vol. 7211 ), Helmut Seidl (Ed.). Springer, 169-193.Google Scholar
Digital Library
- Jerry den Hartog and Erik P. de Vink. 2002. Verifying Probabilistic Programs Using a Hoare Like Logic. Int. J. Found. Comput. Sci. 13, 3 ( 2002 ), 315-340.Google Scholar
- Alessandra Di Pierro and Herbert Wiklicky. 2016. Probabilistic Abstract Interpretation: From Trace Semantics to DTMC's and Linear Regression. In Semantics, Logics, and Calculi-Essays Dedicated to Hanne Riis Nielson and Flemming Nielson on the Occasion of Their 60th Birthdays (Lecture Notes in Computer Science, Vol. 9560 ), Christian W. Probst, Chris Hankin, and René Rydhof Hansen (Eds.). Springer, 111-139.Google Scholar
- Edsger W. Dijkstra. 1976. A Discipline of Programming. Prentice-Hall. http://www.worldcat.org/oclc/01958445Google Scholar
- Yijun Feng, Lijun Zhang, David N. Jansen, Naijun Zhan, and Bican Xia. 2017. Finding Polynomial Loop Invariants for Probabilistic Programs. In Automated Technology for Verification and Analysis-15th International Symposium, ATVA 2017, Pune, India, October 3-6, 2017, Proceedings (Lecture Notes in Computer Science, Vol. 10482 ), Deepak D'Souza and K. Narayan Kumar (Eds.). Springer, 400-416. https://doi.org/10.1007/978-3-319-68167-2_26 Google Scholar
Cross Ref
- Luis María Ferrer Fioriti and Holger Hermanns. 2015. Probabilistic Termination: Soundness, Completeness, and Compositionality. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, Mumbai, India, January 15-17, 2015, Sriram K. Rajamani and David Walker (Eds.). ACM, 489-501.Google Scholar
Digital Library
- Philippe Flajolet, Maryse Pelletier, and Michèle Soria. 2011. On Bufon Machines and Numbers. In Proceedings of the Twenty-Second Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2011, San Francisco, California, USA, January 23-25, 2011, Dana Randall (Ed.). SIAM, 172-183. https://doi.org/10.1137/1.9781611973082.15 Google Scholar
Cross Ref
- Robert W Floyd. 1967. Assigning Meanings to Programs. In Mathematical Aspects of Computer Science, J.T. Schwarz (Ed.), Vol. 19. American Mathematical Society, 19-32.Google Scholar
- Hongfei Fu and Krishnendu Chatterjee. 2019. Termination of Nondeterministic Probabilistic Programs. In Verification, Model Checking, and Abstract Interpretation-20th International Conference, VMCAI 2019, Cascais, Portugal, January 13-15, 2019, Proceedings (Lecture Notes in Computer Science, Vol. 11388 ), Constantin Enea and Ruzica Piskac (Eds.). Springer, 468-490.Google Scholar
- Kurt Gödel. 1931. Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I. Monatshefte für Mathematik und Physik 38, 1 ( 1931 ), 173-198.Google Scholar
- Friedrich Gretz, Joost-Pieter Katoen, and Annabelle McIver. 2014. Operational versus weakest pre-expectation semantics for the probabilistic guarded command language. Perform. Evaluation 73 ( 2014 ), 110-132. https://doi.org/10.1016/j.peva. 2013. 11.004 Google Scholar
Digital Library
- Sergiu Hart, Micha Sharir, and Amir Pnueli. 1982. Termination of Probabilistic Concurrent Programs. In Conference Record of the Ninth Annual ACM Symposium on Principles of Programming Languages, Albuquerque, New Mexico, USA, January 1982, Richard A. DeMillo (Ed.). ACM Press, 1-6.Google Scholar
- C. A. R. Hoare. 1969. An Axiomatic Basis for Computer Programming. Commun. ACM 12, 10 ( 1969 ), 576-580.Google Scholar
- Mingzhang Huang, Hongfei Fu, and Krishnendu Chatterjee. 2018. New Approaches for Almost-Sure Termination of Probabilistic Programs. In Programming Languages and Systems-16th Asian Symposium, APLAS 2018, Wellington, New Zealand, December 2-6, 2018, Proceedings (Lecture Notes in Computer Science, Vol. 11275 ), Sukyoung Ryu (Ed.). Springer, 181-201.Google Scholar
Cross Ref
- Mingzhang Huang, Hongfei Fu, Krishnendu Chatterjee, and Amir Kafshdar Goharshady. 2019. Modular verification for almost-sure termination of probabilistic programs. Proc. ACM Program. Lang. 3, OOPSLA ( 2019 ), 129 : 1-129 : 29.Google Scholar
Digital Library
- Kenneth E. Iverson. 1962. A Programming Language. John Wiley & Sons, Inc., USA.Google Scholar
Digital Library
- Benjamin Lucien Kaminski. 2019. Advanced weakest precondition calculi for probabilistic programs. Ph.D. Dissertation. RWTH Aachen University, Germany. http://publications.rwth-aachen.de/record/755408Google Scholar
- Benjamin Lucien Kaminski and Joost-Pieter Katoen. 2015. On the Hardness of Almost-Sure Termination. In Mathematical Foundations of Computer Science 2015-40th International Symposium, MFCS 2015, Milan, Italy, August 24-28, 2015, Proceedings, Part I (Lecture Notes in Computer Science, Vol. 9234 ), Giuseppe F. Italiano, Giovanni Pighizzini, and Donald Sannella (Eds.). Springer, 307-318.Google Scholar
- Benjamin Lucien Kaminski and Joost-Pieter Katoen. 2017. A weakest pre-expectation semantics for mixed-sign expectations. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017. IEEE Computer Society, 1-12.Google Scholar
Cross Ref
- Benjamin Lucien Kaminski, Joost-Pieter Katoen, and Christoph Matheja. 2019. On the hardness of analyzing probabilistic programs. Acta Informatica 56, 3 ( 2019 ), 255-285.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. J. ACM 65, 5 ( 2018 ), 30 : 1-30 : 68.Google Scholar
Digital Library
- Joost-Pieter Katoen, Annabelle McIver, Larissa Meinicke, and Carroll C. Morgan. 2010. Linear-Invariant Generation for Probabilistic Programs:-Automated Support for Proof-Based Methods. In SAS (Lecture Notes in Computer Science, Vol. 6337 ). Springer, 390-406.Google Scholar
Digital Library
- Stephen Cole Kleene, NG De Bruijn, J de Groot, and Adriaan Cornelis Zaanen. 1952. Introduction to Metamathematics. Vol. 483. van Nostrand New York.Google Scholar
- Dexter Kozen. 1979. Semantics of Probabilistic Programs. In 20th Annual Symposium on Foundations of Computer Science, San Juan, Puerto Rico, 29-31 October 1979. IEEE Computer Society, 101-114.Google Scholar
- Dexter Kozen. 1981. Semantics of Probabilistic Programs. J. Comput. Syst. Sci. 22, 3 ( 1981 ), 328-350. https://doi.org/10.1016/ 0022-0000 ( 81 ) 90036-2 Google Scholar
Cross Ref
- Dexter Kozen. 1983. A Probabilistic PDL. In Proceedings of the 15th Annual ACM Symposium on Theory of Computing, 25-27 April, 1983, Boston, Massachusetts, USA. ACM, 291-297. https://doi.org/10.1145/800061.808758 Google Scholar
Digital Library
- Dexter Kozen. 1985. A Probabilistic PDL. J. Comput. Syst. Sci. 30, 2 ( 1985 ), 162-178. https://doi.org/10.1016/ 0022-0000 ( 85 ) 90012-1 Google Scholar
Cross Ref
- Dexter Kozen. 2000. On Hoare logic and Kleene algebra with tests. ACM Trans. Comput. Log. 1, 1 ( 2000 ), 60-76.Google Scholar
Digital Library
- Dexter Kozen and Jerzy Tiuryn. 2001. On the completeness of propositional Hoare logic. Inf. Sci. 139, 3-4 ( 2001 ), 187-195.Google Scholar
Cross Ref
- Jacques Loeckx and Kurt Sieber. 1987. The Foundations of Program Verification, 2nd ed. Wiley-Teubner.Google Scholar
- J. Loeckx, K. Sieber, and R.D. Stansifer. 1984. The Foundations of Program Verification. John Wiley. https://books.google.de/ books?id=wagmAAAAMAAJGoogle Scholar
- Christoph Matheja. 2020. Automated Reasoning and Randomization in Separation Logic. Ph.D. Dissertation. RWTH Aachen University, Aachen. https://doi.org/10.18154/RWTH-2020-00940 Google Scholar
Cross Ref
- Annabelle McIver and Carroll Morgan. 2005. Abstraction, Refinement and Proof for Probabilistic Systems. Springer. https: //doi.org/10.1007/b138392 Google Scholar
Cross Ref
- Annabelle McIver, Carroll Morgan, Benjamin Lucien Kaminski, and Joost-Pieter Katoen. 2018. A new proof rule for almost-sure termination. Proc. ACM Program. Lang. 2, POPL ( 2018 ), 33 : 1-33 : 28.Google Scholar
Digital Library
- Rajeev Motwani and Prabhakar Raghavan. 1999. Randomized Algorithms. In Algorithms and Theory of Computation Handbook, Mikhail J. Atallah (Ed.). CRC Press. https://doi.org/10.1201/ 9781420049503-c16 Google Scholar
Cross Ref
- Van Chan Ngo, Quentin Carbonneaux, and Jan Hofmann. 2018. Bounded expectations: resource analysis for probabilistic programs. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2018, Philadelphia, PA, USA, June 18-22, 2018, Jefrey S. Foster and Dan Grossman (Eds.). 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. Program. Lang. Syst. 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 Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ' 16, New York, NY, USA, July 5-8, 2016, Martin Grohe, Eric Koskinen, and Natarajan Shankar (Eds.). ACM, 672-681.Google Scholar
Digital Library
- John C. Reynolds. 2002. Separation Logic: A Logic for Shared Mutable Data Structures. In 17th IEEE Symposium on Logic in Computer Science (LICS 2002 ), 22-25 July 2002, Copenhagen, Denmark, Proceedings. IEEE Computer Society, 55-74.Google Scholar
- Julia Robinson. 1949. Definability and Decision Problems in Arithmetic. J. Symb. Log. 14, 2 ( 1949 ), 98-114.Google Scholar
Cross Ref
- Anne Schreuder and C.-H. Luke Ong. 2019. Polynomial Probabilistic Invariants and the Optional Stopping Theorem. CoRR abs/ 1910.12634 ( 2019 ).Google Scholar
- Makoto Tatsuta, Wei-Ngan Chin, and Mahmudul Faisal Al Ameen. 2009. Completeness of Pointer Program Verification by Separation Logic. In Software Engineering and Formal Methods. IEEE Computer Society, 179-188.Google Scholar
- Makoto Tatsuta, Wei-Ngan Chin, and Mahmudul Faisal Al Ameen. 2019. Completeness and expressiveness of pointer program verification by separation logic. Inf. Comput. 267 ( 2019 ), 1-27.Google Scholar
- Glynn Winskel. 1993. The Formal Semantics of Programming Languages: An Introduction. MIT Press, Cambridge, MA, USA.Google Scholar
Digital Library
Index Terms
Relatively complete verification of probabilistic programs: an expressive language for expectation-based reasoning
Recommendations
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, ...
Latticed k-Induction with an Application to Probabilistic Programs
Computer Aided VerificationAbstractWe revisit two well-established verification techniques, k-induction and bounded model checking (BMC), in the more general setting of fixed point theory over complete lattices. Our main theoretical contribution is latticed k-induction, which (i) ...
Reasoning about probabilistic sequential programs
A complete and decidable Hoare-style calculus for iteration-free probabilistic sequential programs is presented using a state logic with truth-functional propositional (not arithmetical) connectives.






Comments