MORE EFFICIENT BOTTOM-UP MULTIPATTERN MATCHING IN TREES

被引:12
作者
CAI, J
PAIGE, R
TARJAN, R
机构
[1] PRINCETON UNIV, DEPT COMP SCI, PRINCETON, NJ 08544 USA
[2] NEC CORP LTD, RES INST, PRINCETON, NJ 08544 USA
[3] IBM CORP, THOMAS J WATSON RES CTR, YORKTOWN HTS, NY 10598 USA
基金
美国国家科学基金会;
关键词
D O I
10.1016/0304-3975(92)90277-M
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Pattern matching in trees is fundamental to a variety of programming language systems. However, progress has been slow in satisfying a pressing need for general-purpose pattern-matching algorithms that are efficient in both time and space. We offer asymptotic improvements in both time and space to Chase's bottom-up algorithm for pattern preprocessing. A preliminary implementation of our algorithm runs ten times faster than Chase's (1987) implementation on the hardest problem instances. Our preprocessing algorithm has the advantage of being on-line with respect to pattern additions and detetions. It also adapts to favorable input instances, and on Hoffmann and O'Donnell's (1982) class of simple patterns, it performs better than their special-purpose algorithm tailored to this class. We show how to modify our algorithm using a new decomposition method to obtain a space/time tradeoff. Finally, we trade a log factor in time for a linear space bottom-up pattern-matching algorithm that handles a wide subclass of Hoffmann and O'Donnell's (1982) simple patterns.
引用
收藏
页码:21 / 60
页数:40
相关论文
共 38 条
[1]  
Aho Alfred V., 1974, DESIGN ANAL COMPUTER
[2]  
Barstow D. R., 1984, INTERACTIVE PROGRAMM
[3]  
BORSTLER J, 1987, LEHRSTUHL INFORMATIK, V3
[4]  
BURGHARDT J, 1988, LECT NOTES COMPUT SC, V299, P1
[5]  
Cai J., 1991, CONSTRUCTING PROGRAM, P126
[6]  
CAI J, 1990, ESOP 90 SYSTEMS EXHI
[7]  
CHASE D, 1987, 14TH P ANN ACM S PRI, P168
[8]  
DIETZ P, 1990, UNPUB J ALGORITHMS
[9]  
Dietzfelbinger M., 1988, 29th Annual Symposium on Foundations of Computer Science (IEEE Cat. No.88CH2652-6), P524, DOI 10.1109/SFCS.1988.21968
[10]  
DRISCOLL J, 1986, 18TH P ANN ACM S THE, P109