The evaluator presented performs a depth-first search of the (static) reverse dependency graph associated with a parse tree, interleaved with the execution of semantic rules. The full compound dependency graph is not constructed. Instead, it is implicitly represented by the semantic tree and the dependency graph of the productions. The semantic rules are precompiled as programs written in intermediate code and called semantic modules. Evaluation is a call-by-need evaluation and it is optimal in the number of attribute instances evaluated.
展开▼