@dparigot

Structure-directed Genericity in Functional Programming and Attribute Grammars

, , , and . Rapport de Recherche, 3105. INRIA, (February 1997)

Abstract

Generic control operators, such as 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 present the similarities between the fold formalism and attribute grammars. In particular, we show the equivalence of their respective deforestation methods.\\ Given these results and the fundamental role of deforestation in the concept of structure-directed genericity, first devised for attribute grammars with descriptional composition, we show how the fold operator with its fusion method allow to transport this concept in the area of functional programming.

Description

Attribute Grammar

Links and resources

Tags