skip to main content
10.1145/2676726.2677001acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article
Open access

Probabilistic Termination: Soundness, Completeness, and Compositionality

Published: 14 January 2015 Publication History

Abstract

We propose a framework to prove almost sure termination for probabilistic programs with real valued variables. It is based on ranking supermartingales, a notion analogous to ranking functions on non-probabilistic programs. The framework is proven sound and complete for a meaningful class of programs involving randomization and bounded nondeterminism. We complement this foundational insigh by a practical proof methodology, based on sound conditions that enable compositional reasoning and are amenable to a direct implementation using modern theorem provers. This is integrated in a small dependent type system, to overcome the problem that lexicographic ranking functions fail when combined with randomization. Among others, this compositional methodology enables the verification of probabilistic programs outside the complete class that admits ranking supermartingales.

Supplementary Material

MPG File (p489-sidebyside.mpg)

References

[1]
R. B. Ash and C. Doléans-Dade. Probability and Measure Theory. Harcourt, 2000.
[2]
J. Berdine, A. Chawdhary, B. Cook, D. Distefano, and P. W. O'Hearn. Variance analyses from invariance analyses. In POPL, pages 211--224. ACM, 2007.
[3]
O. Bournez and F. Garnier. Proving positive almost-sure termination. In RTA, LNCS 3467:323--337. Springer, 2005.
[4]
A. R. Bradley, Z. Manna, and H. B. Sipma. The polyranking principle. In ICALP, LNCS 3580:1349--1361. Springer, 2005.
[5]
A. R. Bradley, Z. Manna, and H. B. Sipma. Linear ranking with reachability. In CAV, LNCS 3576:491--504. Springer, 2005.
[6]
T. Brézdil, J. Esparza, S. Kiefer, and A. Kucera. Analyzing probabilistic pushdown automata. Formal Methods in System Design, 43 (2):124--163, 2013.
[7]
A. Chakarov and S. Sankaranarayanan. Probabilistic program analysis with martingales. In CAV, LNCS 8044:511--526. Springer, 2013.
[8]
M. Codish and S. Genaim. Proving termination one loop at a time. In WLPE, CW371 Report, pages 48--59. K. U. Leuven, 2003.
[9]
M. Colón and H. Sipma. Synthesis of linear ranking functions. In TACAS, LNCS 2031:67--81. Springer, 2001.
[10]
B. Cook, A. See, and F. Zuleger. Ramsey vs. lexicographic termination proving. In TACAS, LNCS 7795:47--61. Springer, 2013.
[11]
N. Dershowitz, N. Lindenstrauss, Y. Sagiv, and A. Serebrenik. A general framework for automatic termination analysis of logic programs. Appl. Algebra Eng. Commun. Comput., 12(1/2):117--156, 2001.
[12]
J. Esparza, A. Gaiser, and S. Kiefer. Proving termination of probabilistic programs using patterns. In CAV, LNCS 7358:123--138. Springer, 2012.
[13]
J. Filar and K. Vrieze. Competitive Markov Decision Processes. Springer-Verlag New York, Inc., New York, NY, USA, 1996.
[14]
R. W. Floyd. Assigning meanings to programs. Mathematical aspects of computer science, 19:19--32, 1967.
[15]
F. G. Foster. On the stochastic matrices associated with certain queuing processes. The Annals of Mathematical Statistics, 24(3):355--360, 09 1953.
[16]
J. Giesl, R. Thiemann, and P. Schneider-Kamp. The dependency pair framework: Combining techniques for automated termination proofs. In LPAR, LNCS 3452:301--331. Springer, 2004.
[17]
I. Gnaedig. Induction for positive almost sure termination. In PPDP, pages 167--178. ACM, 2007.
[18]
A. D. Gordon, T. A. Henzinger, A. V. Nori, and S. K. Rajamani. Probabilistic programming. In FOSE, pages 167--181. ACM, 2014.
[19]
F. Gretz, J.-P. Katoen, and A. McIver. Prinsys - on a quest for probabilistic loop invariants. In QEST, LNCS 8054:193--208. Springer, 2013.
[20]
F. Gretz, J.-P. Katoen, and A. McIver. Operational versus weakest pre-expectation semantics for the probabilistic guarded command language. Perform. Eval., 73:110--132, 2014.
[21]
S. Hart and M. Sharir. Concurrent probabilistic programs, or: How to schedule if you must. SIAM J. Comput., 14(4):991--1012, 1985.
[22]
S. Hart, M. Sharir, and A. Pnueli. Termination of probabilistic concurrent program. ACM Trans. Program. Lang. Syst., 5(3):356--380, 1983.
[23]
C.-K. Hur, A. V. Nori, S. K. Rajamani, and S. Samuel. Slicing probabilistic programs. In PLDI, pages 133--144. ACM, 2014.
[24]
C. Jones. Probabilistic non-determinism. PhD thesis, University of Edinburgh, 1989.
[25]
J.-P. Katoen, A. McIver, L. Meinicke, and C. C. Morgan. Linearinvariant generation for probabilistic programs: - automated support for proof-based methods. In SAS, LNCS 6337:390--406. Springer, 2010.
[26]
S. Katz and Z. Manna. A closer look at termination. Acta Inf., 5: 333--352, 1975.
[27]
D. Kozen. Semantics of probabilistic programs. J. Comput. Syst. Sci., 22(3):328--350, 1981.
[28]
D. Kroening, N. Sharygina, A. Tsitovich, and C. M. Wintersteiger. Termination analysis with compositional transition invariants. In CAV, LNCS 6174:89--103. Springer, 2010.
[29]
C. S. Lee, N. D. Jones, and A. M. Ben-Amram. The size-change principle for program termination. In POPL, pages 81--92. ACM, 2001.
[30]
A. McIver and C. Morgan. Abstraction, Refinement And Proof For Probabilistic Systems. Springer, 2004.
[31]
D. Monniaux. An abstract analysis of the probabilistic termination of programs. In SAS, LNCS 2126:111--126. Springer, 2001.
[32]
A. Podelski and A. Rybalchenko. Transition invariants. In LICS, pages 32--41. IEEE Computer Society, 2004.
[33]
A. Podelski and A. Rybalchenko. A complete method for the synthesis of linear ranking functions. In VMCAI, LNCS 2937:239--251. Springer, 2004.
[34]
K. Sohn and A. V. Gelder. Termination detection in logic programs using argument sizes. In PODS, pages 216--226. ACM Press, 1991.
[35]
D. Williams. Probability with Martingales. Cambridge University Press, 1991.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
January 2015
716 pages
ISBN:9781450333009
DOI:10.1145/2676726
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 50, Issue 1
    POPL '15
    January 2015
    682 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2775051
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 January 2015

Check for updates

Author Tags

  1. probabilistic programs
  2. program verification
  3. supermartingales
  4. termination

Qualifiers

  • Research-article

Funding Sources

Conference

POPL '15
Sponsor:

Acceptance Rates

POPL '15 Paper Acceptance Rate 52 of 227 submissions, 23%;
Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)244
  • Downloads (Last 6 weeks)37
Reflects downloads up to 01 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media