An AG extends a traditional context-free grammar (CFG) [1]} by attaching a set of attributes to each terminal or nonterminal symbol of the grammar and by using a set of attribute equations to propagate attribute values through syntax trees.
The attributes of a symbol \(S\)  can be divided into
inherited attributes and synthesized attributes, which we suffix by \(\downarrow \)  and \(\uparrow \) , respectively.
Inherited attributes transfer information from parent to child, or from a node to itself.
Synthesized attributes transfer information from child to parent, from a node to a sibling, or from a node to itself. We assume that the terminal symbols of the grammar have no synthesized attributes and that the root symbol of the grammar has a special set of inherited attributes, known as the initial attributes.
