Journal of Automated Reasoning

, Volume 34, Issue 2, pp 179–207 | Cite as

Verifying Termination and Reduction Properties about Higher-Order Logic Programs



We describe two checkers for verifying termination and reduction properties about higher-order logic programs. The reduction checker verifies that the result of a program execution is structurally smaller than (or equal to) the inputs to the program. The termination checker guarantees that the inputs of the recursive calls are structurally smaller than the inputs of the original call, taking into account reduction properties. At the heart of both checkers lies an inference system to reason about structural properties, which are described by higher-order subterm relations. This approach provides a logical foundation for proving properties such as termination and reduction and factors the effort required for each one of them. Moreover, it allows the study of proof-theoretical properties, soundness, and completeness and different optimizations. The termination and reduction checker are implemented as part of the Twelf system and have been used on a wide variety of examples, including proofs about typed assembly language and those in the area of proof-carrying code.


Logical frameworks termination 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abel, A.: Specification and verification of a formal system for structurally recursive functions, in T. Coquand, P. Dybjer, B. Nordström and J. Smith (eds.), Types for Proof and Programs, International Workshop, TYPES '99, Lecture Notes in Comput. Sci. 1956, Springer, Berlin, 2000, pp. 1–20. Google Scholar
  2. 2.
    Abel, A. and Altenkirch, T.: A predicative analysis of structural recursion, J. Funct. Programming 12(1) (2002), 1–41. MathSciNetGoogle Scholar
  3. 3.
    Arts, T. and Giesl, J.: Termination of term rewriting using dependency pairs, Theoret. Comput. Sci. 236 (2000), 133–178. CrossRefMathSciNetGoogle Scholar
  4. 4.
    Baudinet, M.: Proving termination properties of Prolog programs: A semantic approach, J. Logic Programming 14(1/2) (1992), 1–29. MATHMathSciNetGoogle Scholar
  5. 5.
    Chen, W., Kifer, M. and Warren, D. S.: HILOG: A foundation for higher-order logic programming, J. Logic Programming 15(3) (1993), 187–230. CrossRefMathSciNetGoogle Scholar
  6. 6.
    Codish, M. and Taboch, C.: A semantic basis for the termination analysis of logic programs, J. Logic Programming 41(1) (1999), 103–123. MathSciNetGoogle Scholar
  7. 7.
    Crary, K.: Toward a foundational typed assembly language, in 30th ACM Symposium on Principles of Programming Languages (POPL), New Orleans, LA, 2003, pp. 198–212. Google Scholar
  8. 8.
    Crary, K. and Sarkar, S.: Foundational certified code in a meta-logical framework, in 19th Internat. Conference on Automated Deduction, Miami, FL, USA, 2003; extended version published as CMU Technical Report CMU-CS-03-108. Google Scholar
  9. 9.
    Giesl, J., Arts, T. and Ohlenbusch, E.: Modular termination proofs for rewriting using dependency pairs, J. Symbolic Computation 34(1) (2002), 21–58. Google Scholar
  10. 10.
    Hannan, J. and Pfenning, F.: Compiler verification in LF, in A. Scedrov (ed.), Seventh Annual IEEE Symposium on Logic in Computer Science, Santa Cruz, CA, 1992, pp. 407–418. Google Scholar
  11. 11.
    Harper, R., Honsell, F. and Plotkin, G.: A framework for defining logics, J. ACM 40(1) (1993), 143–184. CrossRefMathSciNetGoogle Scholar
  12. 12.
    Jouannaud, J.-P. and Rubio, A.: The higher-order recursive path ordering, in G. Longo (ed.), Proc. of the 14th Annual Symposium on Logic in Computer Science (LICS'99), Trento, Italy, 1999, pp. 402–411. Google Scholar
  13. 13.
    Lee, C. S., Jones, N. D. and Ben-Amram, A. M.: The size-change principle for program termination, in 28th Annual ACM SIGPLAN – SIGACT Symposium on Principles of Programming Languages (POPL 2001), 2001, pp. 81–92. Google Scholar
  14. 14.
    Lysne, O. and Piris, J.: A termination ordering for higher order rewrite systems, in J. Hsiang (ed.), Proceedings of the Sixth Internat. Conference on Rewriting Techniques and Applications, Kaiserslautern, Germany, 1995, pp. 26–40. Google Scholar
  15. 15.
    McAllester, D. and Arkoudas, K.: Walther recursion, in Proc. of the 13th Internat. Conference on Automated Deduction, New Brunswick, NJ, July 1996, pp. 643–657. Google Scholar
  16. 16.
    Miller, D.: Unification under a mixed prefix, J. Symbolic Computation 14 (1992), 321–358. MATHGoogle Scholar
  17. 17.
    Nadathur, G. and Miller, D.: An overview of λProlog, in K. A. Bowen and R. A. Kowalski (eds.), Fifth Internat. Logic Programming Conference, Seattle, WA, 1988, pp. 810–827. Google Scholar
  18. 18.
    Nao Hirokawa, A. M.: Automating the dependency pair method, in F. Baader (ed.), 19th Internat. Conference on Automated Deduction, Miami, USA, July 2003, pp. 32–46. Google Scholar
  19. 19.
    Naomi Lindenstrauss, Y. S.: Automatic termination analysis of logic programs, in L. Naish (ed.), 14th Internat. Conference on Logic Programming, Leuven, Belgium, 1997, pp. 63–77. Google Scholar
  20. 20.
    Ohlebusch, E., Claves, C. and Marche, C.: TALP: A tool for the termination analysis of logic programs, in L. Bachmair (ed.), Proc. of the 11th Internat. Conference on Rewriting Techniques and Applications (RTA'00), Norwich, UK, Lecture Notes in Comput. Sci. 1833, Springer, Berlin, 2000, pp. 270–273. Google Scholar
  21. 21.
    Paulson, L. C.: Natural deduction as higher-order resolution, J. Logic Programming 3 (1986), 237–258. CrossRefMATHMathSciNetGoogle Scholar
  22. 22.
    Pfenning, F.: Logic programming in the LF logical framework, in G. Huet and G. Plotkin (eds.), Logical Frameworks, 1991, pp. 149–181. Google Scholar
  23. 23.
    Pfenning, F.: Structural cut elimination, in D. Kozen (ed.), Proc. of the Tenth Annual Symposium on Logic in Computer Science, San Diego, CA, 1995, pp. 156–166. Google Scholar
  24. 24.
    Pfenning, F.: Computation and Deduction, Cambridge Univ. Press, 2000, in preparation; draft from April 1997 available electronically. Google Scholar
  25. 25.
    Pfenning, F. and Elliott, C.: Higher-order abstract syntax, in Proc. of the ACM SIGPLAN '88 Symposium on Language Design and Implementation, Atlanta, GA, 1988, pp. 199–208. Google Scholar
  26. 26.
    Pfenning, F. and Schürmann, C.: System description: Twelf – A meta-logical framework for deductive systems, in H. Ganzinger (ed.), Proc. of the 16th Internat. Conference on Automated Deduction (CADE-16), Trento, Italy, 1999, pp. 202–206. Google Scholar
  27. 27.
    Pientka, B.: Termination and reduction checking for higher-order logic programs, in R. Gore, A. Leitsch and T. Nipkow (eds.), Proc. of the First Internat. Joint Conference on Automated Reasoning, Siena, Italy, 2001, pp. 401–415. Google Scholar
  28. 28.
    Plümer, L.: Termination Proofs for Logic Programs, Lecture Notes in Artificial Intelligence 446, Springer-Verlag, Berlin, 1990. Google Scholar
  29. 29.
    Rohwedder, E. and Pfenning, F.: Mode and termination checking for higher-order logic programs, in H. R. Nielson (ed.), Proc. of the European Symposium on Programming, Linköping, Sweden, 1996, pp. 296–310. Google Scholar
  30. 30.
    Schürmann, C. and Pfenning, F.: A coverage checking algorithm for LF, in D. Basin and B. Wolff (eds.), Proc. of the 16th Internat. Conference on Theorem Proving in Higher Order Logics (TPHOLs 2003), Rome, Italy, 2003, pp. 120–135. Google Scholar
  31. 31.
    Speirs, C., Somogyi, Z. and Sondergaard, H.: Termination analysis for Mercury, in: P. V. Hentenryck (ed.), Proc. of the 4th Internat. Static Analysis Symposium (SAS), Paris, France, 8–10 September 1997, Lecture Notes in Comput. Sci. 1302, Springer, Berlin, 1997, pp. 160–171. Google Scholar
  32. 32.
    van de Pol, J. and Schwichtenberg, H.: Strict functionals for termination proofs, in M. Dezani-Ciancaglini and G. Plotkin (eds.), Proc. of the the Internat. Conference on Typed Lambda Calculi and Applications, Edinburgh, Scotland, 1995, pp. 350–364. Google Scholar
  33. 33.
    van Raamsdonk, F.: Higher-order rewriting, in Proc. of the 10th Internat. Conference on Rewriting Techniques and Applications (RTA '99), Trento, Italy, 1999, pp. 220–239. Google Scholar
  34. 34.
    Virga, R.: Higher-order rewriting with dependent types, Ph.D. thesis, Department of Mathematical Sciences, Carnegie Mellon University, available as Technical Report CMU-CS-99-167, 1999. Google Scholar
  35. 35.
    Walther, C.: On proving the termination of algorithms by machine, Artificial Intelligence 71(1) (1994). Google Scholar
  36. 36.
    Xi, H.: Dependent types for program termination verification, in Proc. of 16th IEEE Symposium on Logic in Computer Science, Boston, 2001, pp. 231–242. Google Scholar

Copyright information

© Springer 2006

Authors and Affiliations

  1. 1.School of Computer ScienceMcGill UniversityMontrealCanada

Personalised recommendations