skip to main content
research-article
Free Access

Proving program termination

Published:01 May 2011Publication History
Skip Abstract Section

Abstract

In contrast to popular belief, proving termination is not always impossible.

References

  1. Babic, D., Hu, A.J., Rakamaric, Z., and Cook, B. Proving termination by divergence. In SEFM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ball, T., Bounimova, E., Cook, B., Levin, V., Lichtenberg, J., McGarvey, C., Ondrusek, B., Rajamani, S.K. and Ustuner, A. Thorough static analysis of device drivers. In Proceedings of EuroSys, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Berdine, J., Chawdhary, A., Cook, B., Distefano, D. and O'Hearn, P. Variance analyses from invariance analyses. In Proceedings of POPL, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Berdine, J., Cook, B., Distefano, D. and O'Hearn, P. Automatic termination proofs for programs with shape-shifting heaps. In Proceedings of CAV, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bouajjani, A., Bozga, M., Habermehl, P., Iosif, R., Moro, P. and Vojnar, T. Programs with lists are counter automata. In Proceedings of CAV, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bradley, A., Manna, Z. and Sipma, H. Termination of polynomial programs. In Proceedings of VMCAI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bradley, A., Manna, Z. and Sipma, H.B. Linear ranking with reachability. In Proceedings of CAV, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bradley, A., Manna, Z. and Sipma, H.B. The polyranking principle. In Proceedings of ICALP, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Chawdhary, C., Cook, B., Gulwani, S., Sagiv, M. and Yang, H. Ranking abstractions. In Proceedings of ESOP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Codish, M., Genaim, S., Bruynooghe, M., Gallagher, J. and Vanhoof, W. One loop at a time. In Proceedings of WST, 2003.Google ScholarGoogle Scholar
  11. Colón, M. and Sipma, H. Synthesis of linear ranking functions. In Proceedings of TACAS, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Cook, B., Gotsman, A., Podelski, A., Rybalchenko, A. and Vardi, M. Proving that programs eventually do something good. In Proceedings of POPL, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Cook, B., Gulwani, S., Lev-Ami, T., Rybalchenko, A. and Sagiv, M. Proving conditional termination. In Proceedings of CAV, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Cook, B., Podelski, A. and Rybalchenko, A. Termination proofs for systems code. In Proceedings of PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Dershowitz, N., Lindenstrauss, N., Sagiv, Y. and Serebrenik, A. A general framework for automatic termination analysis of logic programs. Appl. Algebra Eng. Commun. Comput., 2001.Google ScholarGoogle ScholarCross RefCross Ref
  16. Farkas, J. Über die Theorie der einfachen Ungleichungen. Journal für die reine und angewandte Mathematik, 1902.Google ScholarGoogle Scholar
  17. Geser, A. Relative termination. PhD dissertation, 1990.Google ScholarGoogle Scholar
  18. Giesl, J., Swiderski, S., Schneider-Kamp, P. and Thiemann, R. Automated termination analysis for Haskell: From term rewriting to programming languages. In Proceedings of RTA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Giesl, J. Thiemann, R., Schneider-Kamp, P. and Falke, S. Automated termination proofs with AProVE. In Proceedings of RTA, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  20. Gotsman, A., Cook, B., Parkinson, M. and Vafeiadis, V. Proving that non-blocking algorithms don't block. In Proceedings of POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Gupta, A., Henzinger, T., Majumdar, R., Rybalchenko, A., and Xu, R. Proving non-termination. In Proceedings of POPL, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Jones, C.B. Tentative steps toward a development method for interfering programs. ACM Trans. Program. Lang. Syst., 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Jula, H., Tralamazza, D., Zamfir, C. and Candea, G. Deadlock immunity: Enabling systems to defend against deadlocks. In Proceedings of OSDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Lee, C.S., Jones, N.D. and Ben-Amram, A.M., The size-change principle for program termination. In Proceedings of POPL, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Magill, S., Berdine, J., Clarke, E. and Cook, B. Arithmetic strengthening for shape analysis. In Proceedings of SAS, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Manolios, P. and Vroon, D. Termination analysis with calling context graphs. In Proceedings of CAV, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. McMillan, K.L. Circular compositional reasoning about liveness. In Proceedings of CHARME, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Misra, J and Chandy, K.M. Proofs of networks of processes. IEEE Trans. Software Eng., 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Pnueli, A., Podelski, A., and Rybalchenko, A. Separating fairness and well-foundedness for the analysis of fair discrete systems. In Proceedings of TACAS, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Podelski, A, and Rybalchenko, A. A complete method for the synthesis of linear ranking functions. In Proceedings of VMCAI, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  31. Podelski, A, and Rybalchenko, A. Transition invariants. In Proceedings of LICS, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Podelski, A. and Rybalchenko, A. Transition predicate abstraction and fair termination. In Proceedings of POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Podelski, A., Rybalchenko, A., and Wies, T. Heap assumptions on demand. In Proceedings of CAV, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Ramsey, F. On a problem of formal logic. London Math. Soc., 1930.Google ScholarGoogle ScholarCross RefCross Ref
  35. Stix, G. Send in the Terminator. Scientific American (Nov. 2006).Google ScholarGoogle Scholar
  36. Strachey, C. An impossible program. Computer Journal, 1965.Google ScholarGoogle Scholar
  37. Tiwari, A. Termination of linear programs. In Proceedings of CAV, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  38. Turing, A. On computable numbers, with an application to the Entscheidungsproblem. London Mathematical Society, 1936.Google ScholarGoogle Scholar
  39. Turing, A. Checking a large routine. In Report of a Conference on High Speed Automatic Calculating Machines, 1949.Google ScholarGoogle Scholar
  40. Yang, H., Lee, O., Berdine, J., Calcagno, C., Cook, B., Distefano, D. and O'Hearn, P. Scalable shape analysis for systems code. In Proceedings of CAV, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Proving program termination

                  Recommendations

                  Reviews

                  Arturo Ortiz-Tapia

                  For decades, the best approach to attacking the decision problem (proving whether a given program will terminate in a finite amount of time) has been to use monolithic ranking functions. These are usually a combination of a conditional coupled with arithmetic functions in the natural numbers domain. Even for simple programs, however, this approach can be difficult. According to Cook et al., several alternatives exist. We can add modularity by using disjunctive arguments, which we can further improve by using assertion statements during compile time. We can do so even if complete assertion checking during compile time is itself an undecidable problem, but falls within an easier class of difficulty than termination. Implementation of disjunctive termination arguments can be through refinement, where it is started with a ranking function, which, if unsuccessful, we may further refine with another ranking function that has a broader (or more complex) domain, and so on. Another way is through variance analysis, meaning that we use a finite amount of ranking functions, and then use a synthesis tool to check that each ranking function is well founded. This last approach always terminates (as opposed to the refinement method), but may return "don't know" in cases where the refinement-based method succeeds. Cook et al. also mention future directions, such as dynamically allocated heaps and nonlinear systems (akin somehow to multi-threading systems), and liveness as opposed to static systems, to prevent crash dumps. I strongly recommend this paper to researchers in artificial intelligence and operating systems developers; however, it is clearly written so any computer specialist or advanced undergraduate could read it. Online Computing Reviews Service

                  Access critical reviews of Computing literature here

                  Become a reviewer for Computing Reviews.

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in

                  Full Access

                  • Published in

                    cover image Communications of the ACM
                    Communications of the ACM  Volume 54, Issue 5
                    May 2011
                    134 pages
                    ISSN:0001-0782
                    EISSN:1557-7317
                    DOI:10.1145/1941487
                    Issue’s Table of Contents

                    Copyright © 2011 ACM

                    Permission to make digital or hard copies of all or part 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 components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 1 May 2011

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • research-article
                    • Popular
                    • Refereed

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader

                  HTML Format

                  View this article in HTML Format .

                  View HTML Format