A new algorithm for linear regular tree pattern matching

Citation
P. Shankar et al., A new algorithm for linear regular tree pattern matching, THEOR COMP, 242(1-2), 2000, pp. 125-142
Citations number
13
Categorie Soggetti
Computer Science & Engineering
Journal title
THEORETICAL COMPUTER SCIENCE
ISSN journal
03043975 → ACNP
Volume
242
Issue
1-2
Year of publication
2000
Pages
125 - 142
Database
ISI
SICI code
0304-3975(20000706)242:1-2<125:ANAFLR>2.0.ZU;2-L
Abstract
We consider the problem of linear regular tree pattern matching and describ e a new solution based on a bottom up technique. Current bottom up techniqu es preprocess the patterns and construct a finite state tree pattern matchi ng 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 th e resulting pushdown automaton can be exponential in the pattern size in th e worst case, there are problem instances for which exponential gains in su ccinctness of representation are obtained. The technique has been successfu lly applied to the problem of generation of an instruction selector in a co mpiler back end. (C) 2000 Elsevier Science B.V. All rights reserved.