Skip to main content
Log in

Verifying Termination and Reduction Properties about Higher-Order Logic Programs

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  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. Abel, A. and Altenkirch, T.: A predicative analysis of structural recursion, J. Funct. Programming 12(1) (2002), 1–41.

    MathSciNet  Google Scholar 

  3. Arts, T. and Giesl, J.: Termination of term rewriting using dependency pairs, Theoret. Comput. Sci. 236 (2000), 133–178.

    Article  MathSciNet  Google Scholar 

  4. Baudinet, M.: Proving termination properties of Prolog programs: A semantic approach, J. Logic Programming 14(1/2) (1992), 1–29.

    MATH  MathSciNet  Google Scholar 

  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.

    Article  MathSciNet  Google Scholar 

  6. Codish, M. and Taboch, C.: A semantic basis for the termination analysis of logic programs, J. Logic Programming 41(1) (1999), 103–123.

    MathSciNet  Google Scholar 

  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.

  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.

  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. 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.

  11. Harper, R., Honsell, F. and Plotkin, G.: A framework for defining logics, J. ACM 40(1) (1993), 143–184.

    Article  MathSciNet  Google Scholar 

  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.

  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.

  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.

  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.

  16. Miller, D.: Unification under a mixed prefix, J. Symbolic Computation 14 (1992), 321–358.

    MATH  Google Scholar 

  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.

  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.

  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.

  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. Paulson, L. C.: Natural deduction as higher-order resolution, J. Logic Programming 3 (1986), 237–258.

    Article  MATH  MathSciNet  Google Scholar 

  22. Pfenning, F.: Logic programming in the LF logical framework, in G. Huet and G. Plotkin (eds.), Logical Frameworks, 1991, pp. 149–181.

  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.

  24. Pfenning, F.: Computation and Deduction, Cambridge Univ. Press, 2000, in preparation; draft from April 1997 available electronically.

  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.

  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.

  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.

  28. Plümer, L.: Termination Proofs for Logic Programs, Lecture Notes in Artificial Intelligence 446, Springer-Verlag, Berlin, 1990.

    Google Scholar 

  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.

  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.

  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. 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.

  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.

  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.

  35. Walther, C.: On proving the termination of algorithms by machine, Artificial Intelligence 71(1) (1994).

  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.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Brigitte Pientka.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Pientka, B. Verifying Termination and Reduction Properties about Higher-Order Logic Programs. J Autom Reasoning 34, 179–207 (2005). https://doi.org/10.1007/s10817-005-6534-3

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10817-005-6534-3

Keywords

Navigation