arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.01704cs.DScs.FL
收藏

具有高度约束的无序项树模式的高效模式匹配

Efficient Pattern Matching in Unordered Term Tree Patterns with Height Constraints

Fukuoka Institute of Technology(福冈工业大学);Hiroshima City University(广岛市立大学)

Shintaro Matsushita, Takayoshi Shoudai, Yusuke Suzuki

AI总结:

针对无序树中的模式描述,提出带高度约束变量的无序项树模式,并给出O(N·max{nD^(3/2), S})时间的匹配算法,实验表明算法高效。

摘要:

无序树出现在子顶点顺序无关紧要的应用中,例如抽象语法树和化学结构。为了描述此类树中的模式,我们提出了无序项树模式,它采用高度约束变量来限制主干长度和子树高度。我们形式化了无序项树模式与无序树之间的模式匹配问题,并提出了一个$O(N \cdot \max\{nD^{3/2}, \mathcal{S}\})$时间的算法,其中$n$和$N$分别是模式和树中的顶点数,$D$是最大顶点度数,$\mathcal{S}$是主干约束的总和。计算结果表明该算法在实践中运行高效。

英文摘要:

Unordered trees appear in applications where the order among child vertices is insignificant, such as abstract syntax trees and chemical structures. To describe patterns in such trees, we propose unordered term tree patterns, which employ height-constrained variables that restrict trunk length and subtree height. We formalize the pattern matching problem between an unordered term tree pattern and an unordered tree, and present an $O(N \cdot \max\{nD^{3/2}, \mathcal{S}\})$-time algorithm, where $n$ and $N$ are the numbers of vertices in the pattern and tree, $D$ is the maximum vertex degree, and $\mathcal{S}$ is the sum of trunk constraints. Computational results show that the algorithm runs efficiently in practice.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑