skip to main content
article

Polymorphic higher-order recursive path orderings

Published:01 March 2007Publication History
Skip Abstract Section

Abstract

This article extends the termination proof techniques based on reduction orderings to a higher-order setting, by defining a family of recursive path orderings for terms of a typed lambda-calculus generated by a signature of polymorphic higher-order function symbols. These relations can be generated from two given well-founded orderings, on the function symbols and on the type constructors. The obtained orderings on terms are well founded, monotonic, stable under substitution and include β-reductions. They can be used to prove the strong normalization property of higher-order calculi in which constants can be defined by higher-order rewrite rules using first-order pattern matching. For example, the polymorphic version of Gödel's recursor for the natural numbers is easily oriented. And indeed, our ordering is polymorphic, in the sense that a single comparison allows to prove the termination property of all monomorphic instances of a polymorphic rewrite rule. Many nontrivial examples are given that exemplify the expressive power of these orderings. All have been checked by our implementation.

This article is an extended and improved version of Jouannaud and Rubio [1999]. Polymorphic algebras have been made more expressive than in our previous framework. The intuitive notion of a polymorphic higher-order ordering has now been made precise. The higher-order recursive path ordering itself has been made much more powerful by replacing the congruence on types used there by an ordering on types satisfying some abstract properties. Besides, using a restriction of Dershowitz's recursive path ordering for comparing types, we can integrate both orderings into a single one operating uniformly on both terms and types.

References

  1. Baader, F., and Nipkow, T. 1998. Term Rewriting and All That. Cambridge University Press, Cambridge, MA.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Barendregt, H. 1990. Functional programming and lambda calculus. In Handbook of Theoretical Computer Science, J. van Leeuwen, Ed. Vol. B. Elsevier Science Publishers B.V.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Barendregt, H. 1992. Typed lambda calculi. In Handbook of Logic in Computer Science, S. Abramsky, T. S. E. Maibaum, and D. M. Gabbay, Eds. Vol. 2. Oxford University Press.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bezem, M., Klop, J., and de Vrijer, R., Eds. 2003. Term Rewriting Systems. Number 55 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge, MA.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Blanqui, F. 2003. Inductive types in the calculus of algebraic constructions. In Proceedings of the 6th International Conference on Typed Lambda Calculi and Applications. Lecture Notes in Computer Science, vol. 2701. Springer-Verlag, New York, 46--59.]]Google ScholarGoogle Scholar
  6. Blanqui, F., Jouannaud, J.-P., and Okada, M. 1999. The calculus of algebraic constructions. In Proceedings of the 10th International Conference on Rewriting Techniques and Applications. Lecture Notes in Computer Science, vol. 1631. Springer-Verlag, New York, 301--316.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Blanqui, F., Jouannaud, J.-P., and Okada, M. 2002. Inductive data types. Theoret. Comput. Sci. 272, 1--2, 41--68.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Blanqui, F., Jouannaud, J.-P., and Rubio, A. 2006. Higher-order termination: From Kruskal to computability. In Proceedings of the 13th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning. Lecture Notes in Computer Science, vol. 4246. Springer-Verlag, New York, 1--14.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Blanqui, F., Jouannaud, J.-P., and Strub, P.-Y. 2005. The Calculus of Congruent Constructions. Draft available from the web at http://www.lix.polytechnique.fr/Labo/Jean-Pierre.Jouannaud.]]Google ScholarGoogle Scholar
  10. Borralleras, C., and Rubio, A. 2001. A monotonic, higher-order semantic path ordering. In Proceedings of the 8th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning. Lecture Notes in Computer Science, vol. 2250. Springer-Verlag, New York, 531--547.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Buchholz, W. 1995. Proof-theoretic analysis of termination proofs. Ann. Pure Appl. Logic 75, 1--2, 57--65.]]Google ScholarGoogle ScholarCross RefCross Ref
  12. Coquand, T., and Dybjer, P. 1994. Inductive definitions and type theory: An introduction (preliminary version). In Proceedings of the 14th Conference on Foundations of Software Technology and Theoretical Computer Science. Lecture Notes in Computer Science, vol. 880. Springer-Verlag, New York, pp. 60--76.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Coquand, T., and Paulin-Mohring, C. 1990. Inductively defined types. In Proceedings of the International Conf. on Computer Logic, 1988. Lecture Notes in Computer Science, vol. 417. Springer-Verlag, New York, 50--66.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dershowitz, N. 1982. Orderings for term rewriting systems. Theoret. Comput. Sci. 17, 3, 279--301.]]Google ScholarGoogle ScholarCross RefCross Ref
  15. Dershowitz, N., and Jouannaud, J.-P. 1990. Rewrite systems. Vol. B. North-Holland, Amsterdam, The Netherlands, 243--309.]]Google ScholarGoogle Scholar
  16. Fernández, M., and Jouannaud, J.-P. 1995. Modular termination of term rewriting systems revisited. Lecture Notes in Computer Science, vol. 906. Springer-Verlag, New York, 255--272.]]Google ScholarGoogle Scholar
  17. Gallier, J. 1990. On girard's “candidats de reductibilité”. In Logic and Computer Science. Academic Press, Orlando, FL, 123--203.]]Google ScholarGoogle Scholar
  18. Giesl, J., Thiemann, R., and Schneider-Kamp, P. 2005. Proving and disproving termination of higher-order functions. In Proceedings of the 5th International Workshop on Frontiers of Combining Systems. Lecture Notes in Computer Science, vol. 3717. Springer-Verlag, New York, 216--231.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Girard, J.-Y., Lafont, Y., and Taylor, P. 1989. Proofs and Types. Cambridge Tracts in Theoretical Computer Science. Cambridge University Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Goubault-Larrecq, J. 2001. Well founded recursive relations. In Proceedings of the 15th International Workshop on Computer Science Logic. Lecture Notes in Computer Science, vol. 2142. Springer-Verlag, New York, 484--497.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Jones, N., and Bohr, N. 2004. Termination analysis of the untyped lambda-calculus. In Proceedings of the 15th International Conference on Rewriting Techniques and Applications. Lecture Notes in Computer Science, vol. 3091. Springer-Verlag, New York, 1--23.]]Google ScholarGoogle Scholar
  22. Jouannaud, J.-P. 2005a. Extension orderings revisited. Available from the web at http://www.lix.polytechnique.fr/Labo/Jean-Pierre.Jouannaud.]]Google ScholarGoogle Scholar
  23. Jouannaud, J.-P. 2005b. Higher-order rewriting: framework, confluence and termination. In Processes, Terms and Cycles: Steps on the Road to Infinity. Essays Dedicated to Jan Willem Klop on the Occasion of his 60th Birthday. Springer-Verlag, New York.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Jouannaud, J.-P., and Okada, M. 1991. A computation model for executable higher-order algebraic specifications languages. In Proceedings of the 6th Annual IEEE Symposium on Logic in Computer Science. IEEE Computer Society Press, Los Alamitos, CA, 350--361.]]Google ScholarGoogle Scholar
  25. Jouannaud, J.-P., and Rubio, A. 1998. Rewrite orderings for higher-order terms in η-long β-normal form and the recursive path ordering. Theoret. Comput. Sci. 208, 1--2, 3--31.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Jouannaud, J.-P., and Rubio, A. 1999. The higher-order recursive path ordering. In Proceedings of the 14th Annual IEEE Symposium on Logic in Computer Science. IEEE Computer Society Press, Los Alamitos, CA, 402--411.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Jouannaud, J.-P., and Rubio, A. 2006. Higher-order orderings for normal rewriting. In Proceedings of the 17th International Conference on Rewriting Techniques and Applications. Lecture Notes in Computer Science, vol. 4098. Springer-Verlag, New York, 387--399.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Jouannaud, J.-P., van Raamsdonk, F., and Rubio, A. 2005. Higher-order rewriting with types and arities. Available from the web at http://www.lix.polytechnique.fr/Labo/Jean-Pierre.Jouannaud.]]Google ScholarGoogle Scholar
  29. Kamin, S., and Levy, J.-J. 1980. Two generalizations of the recursive path ordering. Technical report, Department of Computer Science, University of Illinois at Urbana-Champaign.]]Google ScholarGoogle Scholar
  30. Kennaway, J., Klop, J. W., Sleep, R., and de Vries, F. 1996. Comparing curried and uncurried rewriting. J. Symb. Comput. 21, 15--39.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Klop, J. 1980. Combinatory Reduction Systems. Number 127 in Mathematical Centre Tracts. Mathematisch Centrum, Amsterdam.]]Google ScholarGoogle Scholar
  32. Klop, J. W. 1992. Term rewriting systems. In Handbook of Logic in Computer Science, S. Abramsky, T. S. E. Maibaum, and M. S. Gabbay, Eds. Vol. 2. Oxford University Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Loría-Sáenz, C., and Steinbach, J. 1992. Termination of combined (rewrite and λ-calculus) systems. In Proceedings of the 3rd International Workshop on Conditional Term Rewriting Systems. Lecture Notes in Computer Science, vol. 656. Springer-Verlag, New York, 143--147.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Mal'cev, A. 1961. On the elementary theories of locally free universal algebras. Soviet Math. Dokl. 2, 3, 768--771.]]Google ScholarGoogle Scholar
  35. Mayr, R., and Nipkow, T. 1998. Higher-order rewrite systems and their confluence. Theoret. Comput. Sci. 192, 1, 3--29.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Paulson, L. C. 1990. Isabelle: The next 700 theorem provers. In Logic and Computer Science. Academic Press, Orlando, FL, 361--386.]]Google ScholarGoogle Scholar
  37. Tait, W. W. 1967. International interpretations of functionals of finite type I. J. Symb. Logic 32, 2, 198--212.]]Google ScholarGoogle ScholarCross RefCross Ref
  38. van de Pol, J., and Schwichtenberg, H. 1995. Strict functional for termination proofs. In Proceedings of the 2nd International Conference on Typed Lambda Calculi and Applications. Lecture Notes in Computer Science, vol. 902. Springer-Verlag, New York, 350--364.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Walukiewicz-Chrzaszcz, D. 2003. Termination of rewriting in the calculus of constructions. J. Funct. Prog. 13, 2, 339--414.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Polymorphic higher-order recursive path orderings

            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 Journal of the ACM
              Journal of the ACM  Volume 54, Issue 1
              March 2007
              130 pages
              ISSN:0004-5411
              EISSN:1557-735X
              DOI:10.1145/1206035
              Issue’s Table of Contents

              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: 1 March 2007
              Published in jacm Volume 54, Issue 1

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader