Attribute Grammars as Recursion Schemes over Cyclic Representations of Zippers - INRIA - Institut National de Recherche en Informatique et en Automatique Accéder directement au contenu
Article Dans Une Revue Electronic Notes in Theoretical Computer Science Année : 2011

Attribute Grammars as Recursion Schemes over Cyclic Representations of Zippers

Résumé

Evaluation of attributes w.r.t. an attribute grammar can be obtained by inductively computing a function expressing the dependencies of the synthesized attributes on inherited attributes. This higher-order functional approach to attribute grammars leads to a straightforward implementation using a higher-order lazy functional language like Haskell. The resulting evaluation functions are, however, not easily amenable to optimization rules. We present an alternative first-order functional interpretation of attribute grammars where the input tree is replaced with an extended cyclic tree each node of which is aware of its context viewed as an additional child tree. By the way, we demonstrate that these cyclic representations of zippers (trees with their context) are natural generalizations of doubly-linked lists to trees over an arbitrary signature.
Fichier principal
Vignette du fichier
hal-00748204.pdf (333.59 Ko) Télécharger le fichier
Origine : Fichiers éditeurs autorisés sur une archive ouverte

Dates et versions

hal-00748204 , version 1 (10-06-2021)

Identifiants

Citer

Eric Badouel, Bernard Fotsing, Rodrigue Tchougong. Attribute Grammars as Recursion Schemes over Cyclic Representations of Zippers. Electronic Notes in Theoretical Computer Science, 2011, 229 (5), pp.39-56. ⟨10.1016/j.entcs.2011.02.015⟩. ⟨hal-00748204⟩
151 Consultations
82 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More