Tree pattern matching from regular tree expressions

In this work we deal with tree pattern matching over ranked trees, where the pattern set to be matched against is defined by a regular tree expression. We present a new method that uses a tree automaton constructed inductively from a regular tree expression. First we construct a special tree automaton for the regular tree expression of the pattern E, which is somehow a generalization of Thompson automaton for strings. Then we run the constructed automaton on the subject tree t. The pattern matching algorithm requires an O(|t||E|) time complexity, where |t| is the number of nodes of t and |E| is the size of the regular tree expression E. The novelty of this contribution besides the low time complexity is that the set of patterns can be infinite, since we use regular tree expressions to represent patterns.

[1]  Alfred V. Aho,et al.  Efficient tree pattern matching (extended abstract): an aid to code generation , 1985, POPL '85.

[2]  Guy Perrière,et al.  Tree pattern matching in phylogenetic trees: automatic search for orthologs or paralogs in homologous gene sequence databases , 2005, Bioinform..

[3]  Borivoj Melichar,et al.  Tree template matching in ranked ordered trees by pushdown automata , 2012, J. Discrete Algorithms.

[4]  Bell Telephone,et al.  Regular Expression Search Algorithm , 1968 .

[5]  Borivoj Melichar,et al.  Backward Linearised Tree Pattern Matching , 2015, LATA.

[6]  Barry Levine,et al.  Derivatives of Tree Sets with Applications to Grammatical Inference , 1981, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[7]  David Gries,et al.  K-M-P String Matching Revisited , 1997, Inf. Process. Lett..

[8]  Feipei Lai,et al.  A simple tree pattern matching algorithm for code generator , 1995, Proceedings Nineteenth Annual International Computer Software and Applications Conference (COMPSAC'95).

[9]  Éric Laugerotte,et al.  From Regular Tree Expression to Position Tree Automaton , 2013, LATA.

[10]  Thomas Genet,et al.  Rewriting for Cryptographic Protocol Verification , 2000, CADE.

[11]  Albert Gräf,et al.  Left-to-Right Tree Pattern Matching , 1991, RTA.

[12]  Jean Goubault-Larrecq,et al.  A Method for Automatic Cryptographic Protocol Verification , 2000, IPDPS Workshops.

[13]  Maya Madhavan,et al.  Optimal Regular Tree Pattern Matching Using Pushdown Automata , 1998, FSTTCS.

[14]  Tony Abou-Assaleh,et al.  Survey of Global Regular Expression Print (grep) Tools , 2004 .

[15]  Christopher W. Fraser,et al.  BURG: fast optimal instruction selection and tree parsing , 1992, SIGP.

[16]  Eric Goebelbecker Using grep: Moving from DOS? Discover the power of this Linux utility , 1995 .

[17]  Robert Giegerich,et al.  A Declarative Approach to the Development of Dynamic Programming Algorithms, Applied to RNA Folding , 1998 .

[18]  Dietrich Kuske,et al.  Construction of Tree Automata from Regular Expressions , 2008, Developments in Language Theory.

[19]  V. Glushkov THE ABSTRACT THEORY OF AUTOMATA , 1961 .

[20]  Djelloul Ziadi,et al.  From C-Continuations to New Quadratic Algorithms for Automaton Synthesis , 2001, Int. J. Algebra Comput..

[21]  Christoph M. Hoffmann,et al.  Pattern Matching in Trees , 1982, JACM.

[22]  Barry Levine The Use of Tree Derivatives and a Sample Support Parameter for Inferring Tree Systems , 1982, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[23]  Djelloul Ziadi,et al.  Canonical derivatives, partial derivatives and finite automaton constructions , 2002, Theor. Comput. Sci..

[24]  Toshimitsu Ishii,et al.  Pattern Matching Algorithm Using a Succinct Data Structure for Tree-Structured Patterns , 2012 .

[25]  Janusz A. Brzozowski,et al.  Derivatives of Regular Expressions , 1964, JACM.

[26]  Hans H. Kron,et al.  Tree templates and subtree transformational grammars. , 1975 .

[27]  Valentin M. Antimirov Partial Derivatives of Regular Expressions and Finite Automaton Constructions , 1996, Theor. Comput. Sci..