HAL will be down for maintenance from Friday, June 10 at 4pm through Monday, June 13 at 9am. More information
Skip to Main content Skip to Navigation

Attribute Grammars and Folds : Generic Control Operators

Abstract : Generic control operators, such as \emph{fold}, have been introduced in functional programming to increase the power and applicability of data-structure-based transformations. This is achieved by making the structure of the data more explicit in program specifications. We argue that this very important property is one of the original concepts of attribute grammars. In this paper, we informally show the similarities between the fold formalism and attribute grammar specifications. We also compare their respective method to eliminate the intermediate data structures introduced by function composition (notion of deforestation or fusion): the normalization algorithm for programs expressed with folds and the descriptional composition of attribute grammars. Rather than identify the best way to achieve deforestation, the main goal of this paper is merely to intuitively present two programming paradigms to each other's supporting community and provide an unbiased account of their similarities and differences, in the hope that this leads to fruitful cross-fertilization.
Document type :
Complete list of metadata

Cited literature [1 references]  Display  Hide  Download

Contributor : Rapport de Recherche Inria Connect in order to contact the contributor
Submitted on : Wednesday, May 24, 2006 - 1:39:29 PM
Last modification on : Friday, February 4, 2022 - 3:08:35 AM
Long-term archiving on: : Sunday, April 4, 2010 - 11:56:43 PM


  • HAL Id : inria-00073741, version 1



Étienne Duris, Didier Parigot, Gilles Roussel, Martin Jourdan. Attribute Grammars and Folds : Generic Control Operators. [Research Report] RR-2957, INRIA. 1996. ⟨inria-00073741⟩



Record views


Files downloads