An initial algebra approach to term rewriting systems with variable binders | Higher-Order and Symbolic Computation Skip to main content
Log in

An initial algebra approach to term rewriting systems with variable binders

  • Published:
Higher-Order and Symbolic Computation

Abstract

We present an extension of first-order term rewriting systems. It involves variable binding in the term language. We develop systems called binding term rewriting systems (BTRSs) in a stepwise manner. First we present the term language, then formulate equational logic. Finally, we define rewriting systems. This development is novel because we follow the initial algebra approach in an extended notion of Σ-algebras in various functor categories. These are based on Fiore-Plotkin-Turi’s presheaf semantics of variable binding and Lüth-Ghani’s monadic semantics of term rewriting systems. We characterise the terms, equational logic and rewrite systems for BTRSs as initial algebras in suitable categories. Then, we show an important rewriting property of BTRSs: orthogonal BTRSs are confluent. Moreover, by using the initial algebra semantics, we give a complete characterisation of termination of BTRSs. Finally, we discuss our design choice of BTRSs from a semantic perspective.

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

Access this article

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (Japan)

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Barendregt, H.: The Lambda Calculus: Its Syntax and Semantics. North Holland (1984)

  2. Blanqui, F., Jouannaud, J.-P., Okada, M.: The Calculus of Algebraic Constructions. In: Rewriting Techniques and Applications (RTA 1999), LNCS 1631, pp. 301&316 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  3. Blanqui, F., Jouannaud, J.-P., Okada, M.: Inductive data type systems. Theor. Comp. Scie. 272, 41&68 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  4. Cohn, P.: Universal Algebra. Harper & Row (1965)

  5. Day, B.J.: On closed categories of functors. In: Reports of the Midwest Category Seminar, vol. 137 of Lecture Notes in Mathematics, pp. 1&38 (1970)

  6. deBruijn, N.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagationes Mathematicae 34, 381&391 (1972)

    MathSciNet  Google Scholar 

  7. Fernandez, M., Gabbay, M.: Nominal Rewriting with Name Generation: Abstraction vs. locality. In: 7th ACM-SIGPLAN Symposium on Principles and Practice of Declarative Programming (PPDP′05), pp.47&58 (2005)

  8. Fernandez, M., Gabbay, M., Mackie, I.: Nominal Rewriting Systems. In: 6th ACM-SIGPLAN Symposium on Principles and Practice of Declarative Programming (PPDP′04), pp. 108&119 (2004)

  9. Fiore, M.: Semantic analysis of normalisation by evaluation for typed lambda calculus. In: 4th International Conference on Principles and Practice of Declarative Programming (PPDP′02), pp. 26&37 (2002)

  10. Fiore, M., Moggi, E., Sangiorgi, D.: A fully-abstract model for the pi-calculus. In: 11th Logic in Computer Science Conf. (LICS′96). pp. 43&54 (1996). Inform. Compu. 179, 76&117 (2002)

  11. Fiore, M., Plotkin, G., Turi, D.: Abstract syntax and variable binding. In: Proceedings of 14th Annual Symposium on Logic in Computer Science, pp. 193&202 (1999)

  12. Fiore, M., Turi, D.: Semantics of Name and Value Passing. In: Proceedings of 16th LICS Conference, pp. 93&104 (2001)

  13. Gabbay, M., Pitts, A.: A New Approach to Abstract Syntax Involving Binders. In: 14th Annual Symposium on Logic in Computer Science, pp. 214&224 (1999)

  14. Ghani, N., Lüth, C.: Rewriting Via Coinserters. Nordic Journal of Computing 10(4) pp.290&312 (2003)

    MATH  MathSciNet  Google Scholar 

  15. Goguen, J., Thatcher, J., Wagner, E.: An initial algebra approach to the specification, correctness and implementation of abstract data types. Technical Report RC 6487, IBM T. J. Watson Research Center (1976). Reprinted in: Yeh, R. (ed.) Current Trends in Programming Methodology IV. Prentic-Hall, pp. 80&149 (1987)

  16. Hamana, M.: A Logic Programming Language based on Binding Algebras. In: 4th International Symposium on Theoretical Aspects of Computer Software (TACS 2001), LNCS 2215, pp. 243&262 (2001)

    MATH  MathSciNet  Google Scholar 

  17. Hamana, M.: Free Σ-monoids: A Higher-order Syntax with Metavariables. In: Asian Symposium on Programming Languages and Systems (APLAS′04), LNCS 3302, pp. 348&363 (2004)

    MATH  Google Scholar 

  18. Hamana, M.: Universal Algebra for Termination of Higher-Order Rewriting. In: Proceedings of 16th International Conference on Rewriting Techniques and Applications (RTA′05), LNCS 3467, pp. 135&149 (2005)

    MATH  MathSciNet  Google Scholar 

  19. Hashimoto, M., Ohori, A.: A Typed Context Calculus. Theor. Comp. Scie. 266, 249&271 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  20. Hofmann, M.: Semantical analysis of higher-order abstract syntax. In: 14th Annual Symposium on Logic in Computer Science, pp. 204&213 (1999)

  21. Huet, G., Lankford, D.S.: On the uniform halting problem for term rewriting systems. Technical Report Rapport Laboria 283, INRIA (1978)

  22. Jouannaud, J.-P., Rubio, A.: The Higher-Order Recursive Path Ordering. In: Proceedings LICS′99, pp. 402&411 (1999)

  23. Katsumata, S.: A Generalisation of Prelogical Predicates to Simply Typed Formal Systems. In: Proceedings ICALP 2004, LNCS 3142, pp. 831&845 (2004)

    MATH  MathSciNet  Google Scholar 

  24. Kelly, G.. Power, A.: Adjunctions whose counits are coequalizers and presentations of enriched monads. J. Pure Appl. Algeb. 89, 163&179 (1993)

    Article  MATH  Google Scholar 

  25. Klop, J.: Combinatory Reduction Systems. Ph.D. thesis, CWI, Amsterdam. vol. 127 of Mathematical Centre Tracts (1980)

  26. Lescanne, P., Rouyer-Degli, J.: Explicit Substitutions with de Bruijn’s levels. In: Rewriting Techniques and Applications, 6th International Conference (RTA-95), LNCS 914 (1995)

  27. Lüth, C.: Compositional term rewriting: An algebraic proof of Toyama’s theorem. In: Rewriting Techniques and Applications (RTA-96), LNCS 1103, pp. 261&275 (1996)

    Google Scholar 

  28. Lüth, C., Ghani, N.: Monads and Modular Term Rewriting. In: Category Theory and Computer Science, LNCS 1290, pp. 69–86 (1997)

    MATH  Google Scholar 

  29. Miculan, M., Scagnetto, I.: A Framework for Typed HOAS and semantics. In: Fifth ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP′03), pp. 184&194 (2003)

  30. Miller, D.: A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification. J. Log. Comput. 1(4), 497&536 (1991)

    MATH  Google Scholar 

  31. Nadathur, G., Miller, D.: An overview of ΛProlog. In: Fifth International Logic Programming Conference, pp. 810&827 (1988)

  32. Nipkow, T.: Higher-Order Critical Pairs. In: Proceedings 6th IEEE Symp. Logic in Computer Science, pp. 342&349 (1991)

  33. O’Hearn, P.W.: Resource Interpretations, Bunched Implications and the αΛ-calculus. In: Proceedings, 4th Conference on Typed Lambda-Calculi and Applications, LNCS 1581, pp. 258&279 (1999)

    MathSciNet  Google Scholar 

  34. Despeyroux, J., Felty, A., Hirschowitz, A.: Higher-order abstract syntax in Coq. In: Proceedings of Typed Lambda Calculi and Applications, LNCS 902, pp. 124&138 (1995)

    MathSciNet  Google Scholar 

  35. Pitts, A.M.: Nominal Logic, A First Order Theory of Names and Binding. Information and Computation 186, 165&193 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  36. Pitts, A.M., Gabbay, M.J.: A Metalanguage for Programming with Bound Names Modulo Renaming. In: Mathematics of Program Construction, MPC2000, LNCS 1837, pp. 230&255 (2000)

    MATH  Google Scholar 

  37. Plotkin, G.: The Λ-calculus is Ώ-incomplete. J. Symb. Logi. 39, 313&317 (1974)

    Article  MATH  MathSciNet  Google Scholar 

  38. Plotkin, G.: Another Meta-Language for Programming with Bound Names Modulo Renaming. In: Winter Workshop in Logics, Types and Rewriting. Heriot-Watt University, Lecture slides (2000)

  39. Plotkin, G.: Algebraic aspects of domain theory. In: Workshop on Domain Theory (DOMAIN 2002). Copenhagen, Denmark (2002) Invited talk

  40. Robinson, E.: Variations on algebra: Monadicity and generalisations of equational theories. Formal Aspects of Computing 13(3&5), 308&326 (2002)

    Article  MATH  Google Scholar 

  41. Sato, M., Sakurai, T., Kameyama, Y., Igarashi, A.: Calculi of meta-variables. In: Baaz, M. (ed.), Computer Science Logic and 8th Kurt Gödel Colloquium (CSL′03 & KGC), Vienna, Austria. Proccedings, vol. 2803 of Lecture Notes in Computer Science, pp. 484&497 (2003)

  42. Selinger, P.: The Lambda Calculus is Algebraic. J. Funct. Progr. 12(6), 549&566 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  43. Shinwell, M.R., Pitts, A.M., Fresh Objective Caml User Manual, University of Cambridge Computer Laboratory Technical Report UCAM-CL-TR-621 (2005)

  44. Shinwell, M.R., Pitts, A.M., Gabbay, M.J.: FreshML: Programming with Binders Made Simple. In: Eighth ACM SIGPLAN International Conference on Functional Programming (ICFP 2003), Uppsala, Sweden, pp. 263&274 (2003)

  45. Stark, I.: Categorical Models for Local Names. Lisp and Symbolic Comput. 9(1), 77&107 (1996)

    Article  Google Scholar 

  46. Stark, I.: A Fully Abstract Domain Model for the pi-Calculus. In: Proc. of the Eleventh Annual IEEE Symposium on Logic in Computer Science, pp. 36&42 (1996)

  47. Talcott, C.: A Theory of Binding Structures and Applications to Rewriting. Theoretical Computer Science 112(1), 99&143 (1993)

    Article  MATH  MathSciNet  Google Scholar 

  48. Tanaka, M.: Abstract Syntax and Variable Binding for Linear Binders. In: MFCS 2000, LNCS 1893, pp. 670&679 (2000)

    MATH  Google Scholar 

  49. Terese: Term Rewriting Systems, No.55 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press (2003)

  50. Turi, D.: Functorial Operational Semantics and its Denotational Dual. Ph.D. thesis, Free University, Amsterdam (1996)

  51. Urban, C., Pitts, A.M., Gabbay, M.J.: Nominal unification. In: Baaz, M. (ed.) Computer Science Logic and 8th Kurt Gödel Colloquium (CSL′03 & KGC), Vienna, Austria. Proccedings, vol. 2803 of Lecture Notes in Computer Science, pp. 513&527 (2003)

  52. vande Pol, J.: Termination proofs for higher-order rewrite systems. In: Proceedings of the 1st International Workshop on Higher-Order Algebra, Logic and Term Rewriting, vol. 816 of LNCS. pp. 305&325 (1994)

  53. van Oostrom, V.: Sub-Birkhoff. In: Proceedings of the 7th International Symposium on Functional and Logic Programming (FLOPS 2004), LNCS 2998, pp. 180&195 (2004)

  54. Yamada, T.: Confluence and Termination of Simply Typed Term Rewriting Systems. In: Proceedings of the 12th International Conference on Rewriting Techniques and Applications (RTA′01), LNCS 2051, pp. 338&352 (2001)

  55. Zantema, H.: Termination of term rewriting: Interpretation and type elimination. J. Symb. Comput. 17, 23&50 (1994)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Makoto Hamana.

Additional information

An erlier version appeared in Proc. Fifth ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP2003).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Hamana, M. An initial algebra approach to term rewriting systems with variable binders. Higher-Order Symb Comput 19, 231–262 (2006). https://doi.org/10.1007/s10990-006-8747-5

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-006-8747-5

Keywords

Navigation