WG211/M9Sloane
From WG 2.11
Profile-based analysis of attribute evaluation patterns
Anthony M. Sloane
Attribute grammars enable complex algorithms to be defined on tree structures using simple local equations, but a full understanding of the algorithms can be hard to discern from the individual equations. We present a method of analysing attribute equations where patterns are automatically derived from a profile of attribute evaluation. The patterns can be used to aid comprehension, abstraction and refactoring of the equations. In particular, they can form the basis of higher-order reusable attribute decorators that simplify the equations.