Composition and evaluation of attribute coupled grammars (Q1099964)
From MaRDI portal
scientific article
Language | Label | Description | Also known as |
---|---|---|---|
English | Composition and evaluation of attribute coupled grammars |
scientific article |
Statements
Composition and evaluation of attribute coupled grammars (English)
0 references
1988
0 references
With attribute coupled grammars, descriptions of subsequent compilation phases can be composed to a single phase on the description level. This creates the opportunity for independent compiler modularization on the description versus the implementation level. The composition introduces a nontrivial reshaping of attribute dependencies, and hence affects the overall strategy for attribute evaluation. For a hierarchy of evaluation classes reaching from S-attributed to noncircular attribute couplings (ACs), we investigate whether they are closed under composition. Where closure does not hold, we identify subclasses which have the closure property. We show that closure of 1-ordered and simpler classes can only be achieved when there is only a single syntactic attribute allowed, while in the case of absolutely noncircular attribute couplings, an arbitrary number of synthesized syntactic attributes can be used. We show how (suboptimal) evaluators for the composed description are obtained directly from the evaluators of the separate phases. We also investigate the complementary problem of reducing the attribute evaluation complexity of a given, monolithic phase specification by finding an appropriate decomposition into subphases which all belong to simpler evaluation classes. In particular, we find that the closed subclass of sweep-evaluable ACs is generated by a proper subclass of L- attributed ACs, while a similar characterization of 1-ordered ACs is proved to be impossible. Finally, we relate our observations to known results about descriptive power of attribute grammars and tree transducers.
0 references
attribute coupled grammars
0 references
compilation
0 references
compiler modularization
0 references
reshaping
0 references
attribute dependencies
0 references
attribute evaluation
0 references
hierarchy of evaluation classes
0 references
closure property
0 references
tree transducers
0 references
0 references