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 automat...
Saved in:
| Published in | Kybernetika Vol. 54; no. 2; pp. 221 - 242 |
|---|---|
| Main Authors | , , , |
| Format | Journal Article |
| Language | English |
| Published |
Institute of Information Theory and Automation
01.01.2018
|
| Subjects | |
| Online Access | Get full text |
| ISSN | 0023-5954 1805-949X 1805-949X |
| DOI | 10.14736/kyb-2018-2-0221 |
Cover
| Summary: | 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(vertical bar t vertical bar vertical bar E vertical bar) time complexity, where vertical bar t vertical bar is the number of nodes of t and vertical bar E vertical bar 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. |
|---|---|
| ISSN: | 0023-5954 1805-949X 1805-949X |
| DOI: | 10.14736/kyb-2018-2-0221 |