Introduced at the end of the nineties, the Rewriting Calculus (rho-calculus, for short) fully integrates term-rewriting and lambda-calculus. The rewrite rules, acting as elaborated abstractions, their application and the obtained structured results are first class objects of the calculus. The evaluation mechanism, generalising beta-reduction, strongly relies on term matching in various theories. In this paper we propose an extension of the rho-calculus, called rhog-calculus, handling structures with cycles and sharing rather than simple terms. This is obtained by using recursion constraints in addition to the standard rho-calculus matching constraints, which leads to a term-graph representation in an equational style. As for the rho-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 rhog-calculus, under suitable linearity conditions, is confluent. The proof of this result is quite elaborated, due to the non-termination of the system and to the fact that rhog-calculus-terms are considered modulo an equational theory. We also show that the rhog-calculus is expressive enough to simulate first-order (equational) left-linear term-graph rewriting and lambda-calculus with explicit recursion (modelled using a letrec-like construct).

A rewriting calculus for cyclic higher-order term graphs

BALDAN, PAOLO;
2007

Abstract

Introduced at the end of the nineties, the Rewriting Calculus (rho-calculus, for short) fully integrates term-rewriting and lambda-calculus. The rewrite rules, acting as elaborated abstractions, their application and the obtained structured results are first class objects of the calculus. The evaluation mechanism, generalising beta-reduction, strongly relies on term matching in various theories. In this paper we propose an extension of the rho-calculus, called rhog-calculus, handling structures with cycles and sharing rather than simple terms. This is obtained by using recursion constraints in addition to the standard rho-calculus matching constraints, which leads to a term-graph representation in an equational style. As for the rho-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 rhog-calculus, under suitable linearity conditions, is confluent. The proof of this result is quite elaborated, due to the non-termination of the system and to the fact that rhog-calculus-terms are considered modulo an equational theory. We also show that the rhog-calculus is expressive enough to simulate first-order (equational) left-linear term-graph rewriting and lambda-calculus with explicit recursion (modelled using a letrec-like construct).
File in questo prodotto:
Non ci sono file associati a questo prodotto.
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11577/1772010
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 11
  • ???jsp.display-item.citation.isi??? 7
  • OpenAlex ND
social impact