Hierarchical Attribute Grammars: Dialects, Applications and Evaluation Algorithms
Although attribute grammars have been applied successfully to the specification of many different phases of analysis and transformation of complex language processing systems, including type checking, data flow analysis, constant propagation and dead code elimination, little success has been achieved in applying attribute grammars to the specification of complete systems such as multiple pass code optimizers or automatic parallelizers. This is the direct result of the failure of typical attribute grammar dialects to provide any means for composing attribute grammar specifications of sub-computations to create a specification of a complete hierarchical computation. This dissertation introduces the notion of hierarchical attribute grammars, a set of attribute grammar dialects that are suitably expressive to permit the natural description of complex computations through the composition of attribute grammar specified sub-computations within the context of the original attribute grammar formalism. The set of hierarchical dialects includes Schulz's attributed transformations, the Attribute Coupled Grammars of Ganzinger and Giegerich, SSL, the specification language of the Synthesizer Generator of Reps and Teitelbaum, the Higher Order Attribute Grammars of Vogt, Swierstra and Kuiper, and a new dialect Modular Attribute Grammars. The relationships between these five dialects are examined, and examples of Modular Attribute Grammar specifications are presented. For hierarchical attribute grammar dialects to be useful, efficient batch and incremental evaluators for hierarchical dialects must be developed. Therefore, the majority of this dissertation is dedicated to the presentation of new batch and incremental evaluation algorithms for hierarchical specifications.
This work was also published as a Rice University thesis/dissertation: http://hdl.handle.net/1911/16538