The functional programming community is paying increasing attention
to static structure-based transformations. For example, generic control
operators, such as fold, have been introduced in functional
programming to increase the power and applicability of a particular
kind of static transformation, called deforestation, which
prevents the construction of useless intermediate data structures
in function composition. This is achieved by making the structure
of the data more explicit in program specifications. We argue that
one of the original concepts of Attribute Grammars is precisely to
make data structures explicit in program specifications. Furthermore,
there exists a powerful static deforestation-like transformation
in their context. In this paper, we present similarities between
deforestation methods, on the one hand with the functional approach,
and on the other hand with the Attribute Grammars approach. In order
to gain a grasp of these similarities, we first make a simple comparison:
purely-synthesized Attribute Grammars and first order folds. In this
context, deforestation transformations are equivalent. This allows
us to highlight the limitations of the fold formalism and to present
how the hylomorphism approach generalizes it; hylomorphisms and attribute
grammars are surprisingly alike. Finally, we show how the inherited
attribute notion in Attribute Grammars solves some transformation
problems in higher order functional programs.
%0 Conference Paper
%1 Correnson97
%A Correnson, Lo�c
%A Duris, Etienne
%A Parigot, Didier
%A Roussel, Gilles
%B Fourth International Static Analysis Symposium -- Poster Session
%C Paris, France
%D 1997
%K deforestation functional program vari.FP
%T Attribute Grammars and Functional Programming Deforestation
%U ftp://ftp-sop.inria.fr/smartool/Didier.Parigot/publications/sas97.ps.gz
%X The functional programming community is paying increasing attention
to static structure-based transformations. For example, generic control
operators, such as fold, have been introduced in functional
programming to increase the power and applicability of a particular
kind of static transformation, called deforestation, which
prevents the construction of useless intermediate data structures
in function composition. This is achieved by making the structure
of the data more explicit in program specifications. We argue that
one of the original concepts of Attribute Grammars is precisely to
make data structures explicit in program specifications. Furthermore,
there exists a powerful static deforestation-like transformation
in their context. In this paper, we present similarities between
deforestation methods, on the one hand with the functional approach,
and on the other hand with the Attribute Grammars approach. In order
to gain a grasp of these similarities, we first make a simple comparison:
purely-synthesized Attribute Grammars and first order folds. In this
context, deforestation transformations are equivalent. This allows
us to highlight the limitations of the fold formalism and to present
how the hylomorphism approach generalizes it; hylomorphisms and attribute
grammars are surprisingly alike. Finally, we show how the inherited
attribute notion in Attribute Grammars solves some transformation
problems in higher order functional programs.
@inproceedings{Correnson97,
abstract = {The functional programming community is paying increasing attention
to static structure-based transformations. For example, generic control
operators, such as \emph{fold}, have been introduced in functional
programming to increase the power and applicability of a particular
kind of static transformation, called \emph{deforestation}, which
prevents the construction of useless intermediate data structures
in function composition. This is achieved by making the structure
of the data more explicit in program specifications. We argue that
one of the original concepts of Attribute Grammars is precisely to
make data structures explicit in program specifications. Furthermore,
there exists a powerful static deforestation-like transformation
in their context. In this paper, we present similarities between
deforestation methods, on the one hand with the functional approach,
and on the other hand with the Attribute Grammars approach. In order
to gain a grasp of these similarities, we first make a simple comparison:
purely-synthesized Attribute Grammars and first order folds. In this
context, deforestation transformations are equivalent. This allows
us to highlight the limitations of the fold formalism and to present
how the hylomorphism approach generalizes it; hylomorphisms and attribute
grammars are surprisingly alike. Finally, we show how the inherited
attribute notion in Attribute Grammars solves some transformation
problems in higher order functional programs.},
added-at = {2009-05-10T18:36:57.000+0200},
address = {Paris, France},
author = {Correnson, Lo�c and Duris, Etienne and Parigot, Didier and Roussel, Gilles},
biburl = {https://www.bibsonomy.org/bibtex/2db8ba0df15008ea65a3fb612d9fc42d3/dparigot},
booktitle = {Fourth International Static Analysis Symposium -- Poster Session},
description = {Attribute Grammar},
interhash = {41098bdf7f9b6248e27fee19c4513d1a},
intrahash = {db8ba0df15008ea65a3fb612d9fc42d3},
keywords = {deforestation functional program vari.FP},
month = {September},
postscript = {http://www-sop.inria.fr/smartool/Didier.Parigot/publications/sas97.ps.gz},
timestamp = {2009-05-10T18:36:59.000+0200},
title = {Attribute Grammars and Functional Programming Deforestation},
url = {ftp://ftp-sop.inria.fr/smartool/Didier.Parigot/publications/sas97.ps.gz},
year = 1997
}