Advertisement

Formal Aspects of Computing

, Volume 25, Issue 3, pp 389–403 | Cite as

Proving termination of nonlinear command sequences

  • Domagoj Babić
  • Byron Cook
  • Alan J. Hu
  • Zvonimir Rakamarić
Original Article

Abstract

We describe a simple and efficient algorithm for proving the termination of a class of loops with nonlinear assignments to variables. The method is based on divergence testing for each variable in the cone-of-influence of the loop’s condition. The analysis allows us to automatically prove the termination of loops that cannot be handled using previous techniques. We also describe a method for integrating our nonlinear termination proving technique into a larger termination proving framework that depends on linear reasoning.

Keywords

Program termination Nonlinear assignments Divergence testing Well-foundedness provers 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. BBH+06.
    Bouajjani A, Bozga M, Habermehl P, Iosif R, Moro P, Vojnar T (2006) Programs with lists are counter automata. In: Proceedings of international conference on computer aided verification (CAV). pp 517–531Google Scholar
  2. BCC+07.
    Berdine J, Chawdhary A, Cook B, Distefano D, O’Hearn P (2007) Variance analyses from invariance analyses. In: Proceedings of ACM SIGPLAN-SIGACT symposium on principles of programming languages (POPL). pp 211–224Google Scholar
  3. BCHR07.
    Babić D, Cook B, Hu AJ, Rakamarić Z (2007) Proving termination by divergence. In: Proceedings of IEEE international conference on software engineering and formal methods (SEFM). pp 93–102Google Scholar
  4. BMS05a.
    Bradley A, Manna Z, Sipma H (2005) Termination of polynomial programs. In: Proceedings of international conference on verification, model checking, and abstract interpretation (VMCAI). pp 113–129Google Scholar
  5. BMS05b.
    Bradley AR, Manna Z, Sipma HB (2005) The polyranking principle. In: Proceedings of international colloquium on automata, languages and programming (ICALP). pp 1349–1361Google Scholar
  6. BMS05c.
    Bradley AR, Manna Z, Sipma HB (2005) Termination analysis of integer linear loops. In: Proceedings of international conference on concurrency theory (CONCUR). pp 488–502Google Scholar
  7. CC77.
    Cousot P, Cousot R (1977) Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of ACM SIGPLAN-SIGACT symposium on principles of programming languages (POPL). pp 238–252Google Scholar
  8. CFR+91.
    Cytron R, Ferrante J, Rosen BK, Wegman MN, Zadeck FK (1991) Efficiently computing static single assignment form and the control dependence graph. ACM Trans Prog Lang Syst 13(4): 451–490CrossRefGoogle Scholar
  9. CMMU03.
    Contejean E, Marché C, Monate B, Urbain X (2003) Proving termination of rewriting with cime. In: Extended abstracts of the sixth international workshop on termination (WST). pp 71–73Google Scholar
  10. Cou05.
    Cousot P (2005) Proving program invariance and termination by parametric abstraction, lagrangian relaxation and semidefinite programming. In: Proceedings of international conference on verification, model checking, and abstract interpretation (VMCAI). pp 1–24Google Scholar
  11. CPR05.
    Cook B, Podelski A, Rybalchenko A (2005) Abstraction refinement for termination. In: Proceedings of international static analysis symposium (SAS). pp 87–101Google Scholar
  12. CPR06.
    Cook B, Podelski A, Rybalchenko A (2006) Termination proofs for systems code. In: Proceedings of ACM SIGPLAN conference on programming language design and implementation (PLDI). pp 415–426Google Scholar
  13. CS02.
    Colón M, Sipma H (2002) Practical methods for proving program termination. In: Proceedings of international conference on computer aided verification (CAV). pp 442–454Google Scholar
  14. CT99.
    Codish M, Taboch C (1999) A semantic basis for the termination analysis of logic programs. J Logic Prog 41(1): 103–123MathSciNetzbMATHCrossRefGoogle Scholar
  15. DG03.
    Dugundji J, Granas A (2003) Fixed point theory. 1st edn. Springer, New YorkzbMATHGoogle Scholar
  16. Flo67.
    Robert W. Floyd (1967) Assigning meanings to programs. In: Mathematical Aspects of Computer Science, vol 19 of Proceedings of Symposia in Applied Mathematics, pages 19–32 American Mathematical SocietyGoogle Scholar
  17. GTSKF04.
    Giesl J, Thiemann R, Schneider-Kamp P, Falke S (2004) Automated termination proofs with AProVE. In: Proceedings of international conference on rewriting techniques and applications (RTA). pp 210–220Google Scholar
  18. Hoa69.
    Hoare CAR (1969) An axiomatic basis for computer programming. Commun ACM 12(10): 576–583zbMATHCrossRefGoogle Scholar
  19. Kal82.
    Kaltofen E (1982) On the complexity of factoring polynomials with integer coefficients. PhD thesis, Rensselaer Polytechnic Institute, Troy, NY, USAGoogle Scholar
  20. LHWLL82.
    Lenstra AK, Lenstra HW Jr, Lovász L (1982) Factoring polynomials with rational coefficients. Math Ann 261: 515–534MathSciNetzbMATHCrossRefGoogle Scholar
  21. LJBA01.
    Lee CS, Jones ND, Ben-Amram AM (2001) The size-change principle for program termination. In: Proceedings of ACM SIGPLAN-SIGACT symposium on principles of programming languages (POPL). pp 81–92Google Scholar
  22. LSS97.
    Lindenstrauss N, Sagiv Y, Serebrenik A (1997) TermiLog. A system for checking termination of queries to logic programs. In: Proceedings of international conference on computer aided verification (CAV). pp 444–447Google Scholar
  23. Map04.
    Maplesoft (2004) Maple, version 9.5Google Scholar
  24. MBCC07.
    Magill S, Berdine J, Clarke E, Cook B (2007) Arithmetic strengthening for shape analysis. In: Proceedings of international static analysis symposium (SAS)Google Scholar
  25. Muc97.
    Muchnick SS (1997) Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers Inc., San FranciscoGoogle Scholar
  26. PR04.
    Podelski A, Rybalchenko A (2004) A complete method for the synthesis of linear ranking functions. In: Proceedings of international conference on verification, model checking, and abstract interpretation (VMCAI). pp 239–251Google Scholar
  27. SSS97.
    Chris Speirs, Zoltan Somogyi, Harald Søndergaard (1997) Termination analysis for Mercury. In International Static Analysis Symposium (SAS), pages 160–171Google Scholar
  28. Tip95.
    Tip F. (1995) A survey of program slicing techniques. Journal of programming languages 3: 121–189Google Scholar
  29. Tiw04.
    Tiwari A (2004) Termination of linear programs. In: Proceedings of the international conference on computer aided verification (CAV). pp 70–82Google Scholar
  30. Tur49.
    Turing A (1949) Checking a large routine. In: Report of a conference on high speed automatic calculating machines. pp 67–69Google Scholar

Copyright information

© British Computer Society 2012

Authors and Affiliations

  • Domagoj Babić
    • 1
  • Byron Cook
    • 2
  • Alan J. Hu
    • 3
  • Zvonimir Rakamarić
    • 4
  1. 1.Computer Science DivisionUniversity of CaliforniaBerkeleyUSA
  2. 2.Microsoft Research and University College LondonLondonUK
  3. 3.Department of Computer ScienceUniversity of British ColumbiaVancouverCanada
  4. 4.School of ComputingThe University of UtahSalt Lake CityUSA

Personalised recommendations