skip to main content
article

Proving thread termination

Published:10 June 2007Publication History
Skip Abstract Section

Abstract

Concurrent programs are often designed such that certain functions executing within critical threads must terminate. Examples of such cases can be found in operating systems, web servers, e-mail clients, etc. Unfortunately, no known automatic program termination prover supports a practical method of proving the termination of threads. In this paper we describe such a procedure. The procedure's scalability is achieved through the use of environment models that abstract away the surrounding threads. The procedure's accuracy is due to a novel method of incrementally constructing environment abstractions. Our method finds the conditions that a thread requires of its environment in order to establish termination by looking at the conditions necessary to prove that certain paths through the thread represent well-founded relations if executed in isolation of the other threads. The paper gives a description of experimental results using an implementation of our procedureon Windows device drivers and adescription of a previously unknown bug found withthe tool.

References

  1. B. Alpern and F. Schneider. Defining liveness. Information processing letters, 21:181--185, 1985.Google ScholarGoogle Scholar
  2. I. Balaban, A. Cohen, and A. Pnueli. Ranking abstraction of recursive programs. In VMCAI'06: Verification, Model Checking, and Abstract Interpretation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. Ball et al. Thorough static analysis of device drivers. In EuroSys'06: European Systems Conference, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Berdine, A. Chawdhary, B. Cook, D. Distefano, and P. O'Hearn. Variance analyses from invariance analyses. In POPL'07: Principles of Programming Languages, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Berdine, B. Cook, D. Distefano, and P. O'Hearn. Automatic termination proofs for programs with shape-shifting heaps. In CAV'06: International Conference on Computer Aided Verification, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. Biere, C. Artho, and V. Schuppan. Liveness checking as safety checking. In FMICS'02: Formal Methods for Industrial Critical Systems, 2002.Google ScholarGoogle ScholarCross RefCross Ref
  7. B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. A static analyzer for large safety--critical software. In PLDI'03: Programming Language Design and Implementation, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Bouajjani, M. Bozga, P. Habermehl, R. Iosif, P. Moro, and T. Vojnar. Programs with lists are counter automata. In CAV'06: International Conference on Computer Aided Verification, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Bradley, Z. Manna, and H. Sipma. Linear ranking with reachability. In CAV'05: Computer-Aided Verification, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Bradley, Z. Manna, and H. Sipma. The polyranking principle. In ICALP'05: International Colloquium on Automata, Languages and Programming, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Bradley, Z. Manna, and H. Sipma. Termination analysis of integer linear loops. In CONCUR'05: Concurrency Theory, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Bradley, Z. Manna, and H. Sipma. Termination of polynomial programs. In VMCAI'05: Verification, Model Checking, and Abstract Interpretation, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Chaki, E. M. Clarke, J. Ouaknine, N. Sharygia, and N. Sinha. Efficient verification of sequential and concurrent C programs. Formal Methods in System Design, 25(2--3):129--166, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. Clarke, O. Grumberg, and D. Peled. Model Checking. MIT Press, 2000.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. E. M. Clarke, M. Talupur, and H. Veith. Environment abstraction for parameterized verification. In VMCAI'06: Verification, Model Checking, and Abstract Interpretation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. M. Cobleigh, D. Giannakopoulou, and C. S. Pasareanu. Learning assumptions for compositional verification. In TACAS'04: Tools and Algorithms for the Construction and Analysis of Systems, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Codish and C. Taboch. A semantic basis for the termination analysis of logic programs. The Journal of Logic Programming, 41(1):103--123, 1999.Google ScholarGoogle ScholarCross RefCross Ref
  18. M. Colón and H. Sipma. Practical methods for proving program termination. In CAV'02: Computer Aided Verification, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. E. Contejean, C. Marché, B. Monate, and X. Urbain. Proving Termination of Rewriting with sc CtextitiME. In WST'03: International Workshop on Termination, 2003.Google ScholarGoogle Scholar
  20. B. Cook, A. Gotsman, A. Podelski, A. Rybalchenko, and M. Vardi. Proving that software eventually does something good. In POPL'07: Principles of Programming Languages, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. B. Cook, A. Podelski, and A. Rybalchenko. Termination proofs for systems code. In PLDI'06: Programming Language Design and Implementation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. P. Cousot. Proving program invariance and termination by parametric abstraction, lagrangian relaxation and semidefinite programming. In VMCAI'05: Verification, Model Checking, and Abstract Interpretation, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among variables of a program. In POPL'78: Principles of Programming Languages, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. C. Flanagan, S. N. Freund, S. Qadeer, and S. A. Seshia. Modular verification of multithreaded programs. Journal on Theoretical Computer Science, 338(1-3):153--183, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. C. Flanagan and P. Godefroid. Dynamic partial-order reduction for model checking software. In POPL'05: Principles of Programming Languages, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. C. Flanagan and S. Qadeer. Thread-modular model checking. In SPIN'03, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. Godefroid. Partial-order methods for the verification of concurrent systems - an approach to the state-explosion problem. PhD thesis, 1994.Google ScholarGoogle Scholar
  28. K. Havelund and T. Pressburger. Model checking Java programs using Java PathFinder. International Journal on Software Tools for Technology Transfer, 2(4), 1998.Google ScholarGoogle ScholarCross RefCross Ref
  29. T. A. Henzinger, R. Jhala, and R. Majumdar. Permissive interfaces. In FSE'05, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. T. A. Henzinger, R. Jhala, R. Majumdar, and S. Qadeer. Thread-modular abstraction refinement. In CAV'03, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  31. G. J. Holzmann. The model checker SPIN. IEEE Transactions on Software Engineering, 23(5):279--295, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. B. Jacobs, K. R. M. Leino, F. Piessens, and W. Schulte. Safe concurrency for aggregate objects with invariants. In SEFM'05: Software Engineering and Formal Methods, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. C. Jones. Specification and design of (parallel) programs. In IFIP Congress, 1983.Google ScholarGoogle Scholar
  34. V. Kahlon, A. Gupta, and N. Sinha. Symbolic model checking of concurrent programs using partial orders and on-the-fly transactions. In CAV'06: International Conference on Computer Aided Verification, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. R. J. Lipton. Reduction: a method of proving properties of parallel programs. Communications of the ACM, 18(12):717--721, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Z. Manna and A. Pnueli. Axiomatic approach to total correctness of programs. Acta Informatica, 1974.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. A. Miné. The octagon abstract domain. Higher-Order and Symbolic Computation, 19:31--100, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. A. Podelski and A. Rybalchenko. A complete method for the synthesis of linear ranking functions. In VMCAI'04: Verification, Model Checking, and Abstract Interpretation, 2004.Google ScholarGoogle Scholar
  39. J. C. Reynolds. The Craft of Programming. London, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. A. Tiwari. Termination of linear programs. In CAV'04: Computer Aided Verification, 2004.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Proving thread termination

                Recommendations

                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 ACM SIGPLAN Notices
                  ACM SIGPLAN Notices  Volume 42, Issue 6
                  Proceedings of the 2007 PLDI conference
                  June 2007
                  491 pages
                  ISSN:0362-1340
                  EISSN:1558-1160
                  DOI:10.1145/1273442
                  Issue’s Table of Contents
                  • cover image ACM Conferences
                    PLDI '07: Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation
                    June 2007
                    508 pages
                    ISBN:9781595936332
                    DOI:10.1145/1250734

                  Copyright © 2007 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: 10 June 2007

                  Check for updates

                  Qualifiers

                  • article

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader