Copyright © 2000 Elsevier Science B.V. All rights reserved.
A new algorithm for linear regular tree pattern matching
Received 1 January 1998;
References and further reading may be available for this article. To view references and further reading you must purchase this article.
Abstract
We consider the problem of linear regular tree pattern matching and describe a new solution based on a bottom up technique. Current bottom up techniques preprocess the patterns and construct a finite state tree pattern matching automaton for the purpose. Though matching time is linear in the size of the subject tree, the size of the automaton can be exponential in the sum of the sizes of all patterns. We show here that the problem can be cast as a parsing problem for a context free language, and a solution that uses an extension of the LR parsing technique can be devised. Though the size of the resulting pushdown automaton can be exponential in the pattern size in the worst case, there are problem instances for which exponential gains in succinctness of representation are obtained. The technique has been successfully applied to the problem of generation of an instruction selector in a compiler back end.
Author Keywords: Tree pattern matching; Regular tree grammars; Retargetable code generation







E-mail Article
Add to my Quick Links

Cited By in Scopus (4)

(
1 and 




