Speeding up circularity tests for attribute grammars

SummaryWe present three improvements to be applied to algorithms testing the circularity of attribute grammars. The first one, originally introduced in [10], discards from the set of graphs attached to a nonterminal symbol those graphs that are included in (“covered by”) others of the same set. The second one, first presented by Chebotar [1], establishes an optimal order for selection of productions and eliminates at each step those graphs that are unnecessary for subsequent stages of the algorithm, thus requiring less time and space. The last one skips recomputations on terminal trees, thus saving time. These three methods can be used alone or together to speed up circularity tests. We also discuss the practical complexity of circularity tests.