Attribute grammars as a functional programming paradigm
Proc. of a conference on Functional programming languages and computer architecture
POPL '93 Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Attribute grammar paradigms—a high-level methodology in language implementation
ACM Computing Surveys (CSUR)
Initial Algebra Semantics and Continuous Algebras
Journal of the ACM (JACM)
SIGPLAN '84 Proceedings of the 1984 SIGPLAN symposium on Compiler construction
Declarative Program Transformation: A Deforestation Case-Study
PPDP '99 Proceedings of the International Conference PPDP'99 on Principles and Practice of Declarative Programming
A Functional Semantics of Attribute Grammars
TACAS '02 Proceedings of the 8th International Conference on Tools and Algorithms for the Construction and Analysis of Systems
Journal of Functional Programming
Journal of Functional Programming
Initial algebra semantics is enough!
TLCA'07 Proceedings of the 8th international conference on Typed lambda calculi and applications
Hi-index | 0.00 |
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.