Hostname: page-component-848d4c4894-p2v8j Total loading time: 0 Render date: 2024-05-03T10:24:48.701Z Has data issue: false hasContentIssue false

A rewriting calculus for cyclic higher-order term graphs

Published online by Cambridge University Press:  01 June 2007

PAOLO BALDAN
Affiliation:
Dipartimento di Matematica, Pura e Applicata, Università di Padova, Italy Email: baldan@math.unipd.it
CLARA BERTOLISSI
Affiliation:
Université Henri Poincaré Email: Clara.Bertolissi@loria.fr LORIA, BP 239, 54506 Vandoeuvre-lès-Nancy CedexFrance
HORATIU CIRSTEA
Affiliation:
Université Nancy 2 Email: Horatiu.Cirstea@loria.fr LORIA, BP 239, 54506 Vandoeuvre-lès-Nancy CedexFrance
CLAUDE KIRCHNER
Affiliation:
INRIA Email: Claude.Kirchner@loria.fr LORIA, BP 239, 54506 Vandoeuvre-lès-Nancy CedexFrance

Abstract

The Rewriting Calculus (ρ-calculus, for short) was introduced at the end of the 1990s and fully integrates term-rewriting and λ-calculus. The rewrite rules, acting as elaborated abstractions, their application and the structured results obtained are first class objects of the calculus. The evaluation mechanism, which is a generalisation of beta-reduction, relies strongly on term matching in various theories.

In this paper we propose an extension of the ρ-calculus, called ρg-calculus, that handles structures with cycles and sharing rather than simple terms. This is obtained by using recursion constraints in addition to the standard ρ-calculus matching constraints, which leads to a term-graph representation in an equational style. Like in the ρ-calculus, the transformations are performed by explicit application of rewrite rules as first-class entities. The possibility of expressing sharing and cycles allows one to represent and compute over regular infinite entities.

We show that the ρg-calculus, under suitable linearity conditions, is confluent. The proof of this result is quite elaborate, due to the non-termination of the system and the fact that ρg-calculus-terms are considered modulo an equational theory. We also show that the ρg-calculus is expressive enough to simulate first-order (equational) left-linear term-graph rewriting and α-calculus with explicit recursion (modelled using a letrec-like construct).

Type
Paper
Copyright
Copyright © Cambridge University Press 2007

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Abadi, M., Cardelli, L., Curien, P.-L. and Lévy, J.-J. (1991) Explicit Substitutions. Journal of Functional Programming 4 (1)375416.CrossRefGoogle Scholar
Ariola, Z. M. and Klop, J. W. (1996) Equational term graph rewriting. Fundamenta Informaticae 26 (3-4)207240.CrossRefGoogle Scholar
Ariola, Z. M. and Klop, J. W. (1997) Lambda calculus with explicit recursion. Information and Computation 139 (2)154233.CrossRefGoogle Scholar
Barendregt, H. (1984) The Lambda-Calculus, its syntax and semantics, Second edition, Studies in Logic and the Foundation of Mathematics, Elsevier Science Publishers.Google Scholar
Barendregt, H. P., van Eekelen, M. C. J. D., Glauert, J. R. W., Kennaway, J. R., Plasmeijer, M. J. and Sleep, M. R. (1987) Term Graph Rewriting. In: Proceedings of PARLE'87, Parallel Architectures and Languages Europe. Springer-Verlag Lecture Notes in Computer Science 259 141158.CrossRefGoogle Scholar
Barthe, G., Cirstea, H., Kirchner, C. and Liquori, L. (2003) Pure Patterns Type Systems. In: Proceedings of POPL'03: Principles of Programming Languages, New Orleans, USA, ACM 38 250261.CrossRefGoogle Scholar
Bertolissi, C. (2005) The graph rewriting calculus: properties and expressive capabilities, Thèse de Doctorat d'Université, Institut National Polytechnique de Lorraine, Nancy, France.Google Scholar
Church, A. (1941) A Formulation of the Simple Theory of Types. Journal of Symbolic Logic 5 5668.CrossRefGoogle Scholar
Cirstea, H., Faure, G. and Kirchner, C. (2005) A rho-calculus of explicit constraint application. Proceedings of WRLA (Workshop on Rewriting Logic and Applications, Barcelona, Spain. March 2004). Electronic Notes in Theoretical Computer Science 117 5167.CrossRefGoogle Scholar
Cirstea, H. and Kirchner, C. (2001) The rewriting calculus — Part I and II. Logic Journal of the Interest Group in Pure and Applied Logics 9 (3)427498.Google Scholar
Cirstea, H., Kirchner, C. and Liquori, L. (2001) Matching Power. In: Middeldorp, A. (ed.) Proceedings of RTA'01, Rewriting Techniques and Applications, Utrecht, The Netherlands. Springer-Verlag Lecture Notes in Computer Science 2051 7792.Google Scholar
Cirstea, H., Kirchner, C. and Liquori, L. (2002) Rewriting Calculus with(out) Types. Electronic Notes in Theoretical Computer Science 71 319.CrossRefGoogle Scholar
Cirstea, H., Liquori, L. and Wack, B. (2003) Rewriting Calculus with Fixpoints: Untyped and First-order Systems. In: Berardi, S., Coppo, M. and Damian, F. (eds.) Types for Proofs and Programs (TYPES). Springer-Verlag Lecture Notes in Computer Science 3085 147–171.CrossRefGoogle Scholar
Colmerauer, A. (1984) Equations and Inequations on Finite and Infinite Trees. In: Proceedings of FGCS'84 85–99.Google Scholar
Corradini, A. (1993) Term Rewriting in CT Σ. In: Gaudel, M.-C. and Jouannaud, J.-P. (eds.) Proceedings of TAPSOFT'93, Theory and Practice of Software Development—4th International Joint Conference CAAP/FASE, Springer-Verlag 468484.CrossRefGoogle Scholar
Corradini, A. and Drewes, F. (1997) (Cyclic) Term Graph Rewriting is Adequate for Rational Parallel Term Rewriting. Technical Report TR-97-14, Dipartimento di Informatica, Pisa.Google Scholar
Corradini, A. and Gadducci, F. (1999) Rewriting on Cyclic Structures: Equivalence of Operational and Categorical Descriptions. Theoretical Informatics and Applications 33 467493.CrossRefGoogle Scholar
Courcelle, B. (1980) Infinite Trees in Normal Form and Recursive Equations having a unique solution. Math. Syst. Theory.CrossRefGoogle Scholar
Huet, G. (1980) Confluent Reductions: Abstract Properties and Applications to term Rewriting Systems. Journal of the ACM 27 (4)797821. (Preliminary version in 18th Symposium on Foundations of Computer Science, IEEE, 1977.)CrossRefGoogle Scholar
Jouannaud, J.-P. and Kirchner, H. (1986) Completion of a set of rules modulo a set of Equations. SIAM Journal of Computing 15 (4)11551194.CrossRefGoogle Scholar
Kennaway, J. R., Klop, J. W., Sleep, M. R. and de Vries, F.-J. (1994) On the Adequacy of Graph Rewriting for Simulating Term Rewriting. ACM Transactions on Programming Languages and Systems 16 (3)493523.CrossRefGoogle Scholar
Kennaway, J. R., Klop, J. W., Sleep, M. R. and de Vries, F.-J. (1997) Infinitary Lambda Calculus. Theoretical Computer Science 175 (1)93125.CrossRefGoogle Scholar
Kennaway, J. R., Klop, J. W., Sleep, M. R. and de Vries, F.-J. (1995) Transfinite reductions in orthogonal term rewriting systems. Information and Computation 119 (1)1838.CrossRefGoogle Scholar
Kirchner, C. (ed.) (1990) Unification, Academic Press.Google Scholar
Klop, J. W. (1980) Combinatory Reduction Systems, Ph.D. thesis, CWI.Google Scholar
Lankford, D. S. and Ballantyne, A. (1977) Decision procedures for simple equational theories with permutative axioms: complete sets of permutative reductions. Technical report, Univ. of Texas at Austin, Dept. of Mathematics and Computer Science.Google Scholar
Ohlebusch, E. (1998) Church–Rosser Theorems for Abstract Reduction Modulo an Equivalence Relation. In: Nipkow, T. (ed.) Proceedings of the 9th International Conference on Rewriting Techniques and Applications (RTA-98). Springer-Verlag Lecture Notes in Computer Science 1379 17–31.CrossRefGoogle Scholar
Parigot, M. (1992) λμ-Calculus: An Algorithmic Interpretation of Classical Natural Deduction. In: Voronkov, A. (ed.) Proceedings of LPAR'92, Logic Programming and Automated Reasoning, St Petersburg, Russia, July 1992. Springer-Verlag Lecture Notes in Artificial Intelligence 624 190–201.Google Scholar
Peterson, G. and Stickel, M. E. (1981) Complete Sets of Reductions for Some Equational Theories. Journal of the ACM 28 233264.CrossRefGoogle Scholar
Peyton-Jones, S. (1987) The implementation of functional programming languages, Prentice Hall.Google Scholar
Plump, D. (1999) Term graph rewriting. Handbook of Graph Grammars and Computing by Graph Transformation 2 361.CrossRefGoogle Scholar
Sleep, M. R., Plasmeijer, M. J. and van Eekelen, M. C. J. D. (eds.) (1993) Term graph rewriting: theory and practice, Wiley.Google Scholar
Turner, D. A. (1979) A new implementation technique for applicative languages. Software:Practice and Experience 9 3149.Google Scholar
Wack, B. (2005) Typage et déduction dans le calcul de réécriture, Thèse de doctorat, Université Henri Poincaré – Nancy I.Google Scholar