We identify a new class of non-circular attribute grammars, called the multi-plan attribute grammars, for which static evaluation plans can be computed. The class of multi-plan attribute grammars is larger than all currently known classes of non-circular attribute grammars with static evaluation plans. The decision procedure and the procedure for computing evaluation plans take essentially polynomial time under a new, more practical criterion (but the procedures still take exponential time based on the traditional criterion). The multi-plan attribute grammars lead to a new way to classify well-defined attribute grammars into a hierarchy based on the look-ahead behavior of the evaluators. Our work confirms a result of Riis and Skyum (1981), which says that all well-defined attribute grammars can be evaluated with static evaluators.
[1]
Ken Kennedy,et al.
Automatic generation of efficient evaluators for attribute grammars
,
1976,
POPL.
[2]
Joost Engelfriet,et al.
Simple Multi-Visit Attribute Grammars
,
1982,
J. Comput. Syst. Sci..
[3]
Jukka Paakki,et al.
Attribute grammar paradigms—a high-level methodology in language implementation
,
1995,
CSUR.
[4]
Gregor von Bochmann,et al.
Semantic evaluation from left to right
,
1976,
CACM.
[5]
Uwe Kastens.
Implementation of Visit-Oriented Attribute Evaluators
,
1991,
Attribute Grammars, Applications and Systems.
[6]
Pierre Deransart,et al.
Attribute Grammars: Definitions, Systems and Bibliography
,
1988
.