用Mealy机实现完全正则表达式匹配的报告
A Report on Achieving Complete Regular-Expression Matching using Mealy Machines
摘要:
虽然正则表达式匹配是一种在数据流中查找模式的强大机制,但正则表达式引擎通常只查找不重叠的匹配。此外,经常使用不同形式的非确定性探索,其中读取的符号被处理不止一次,这在实时匹配中可能是昂贵的。我们提出了一个算法,从任何regexp构建一个Mealy机,找到所有的匹配,同时读取每个输入符号只有一次。计算的机器还可以检测和区分不同的模式或模式内部的子模式。此外,我们展示了如何计算一个最小的Mealy机通过DFA最小化的变化,通过形式化Mealy机的正则语言。
英文摘要:
While regexp matching is a powerful mechanism for finding patterns in data streams, regexp engines in general only find matches that do not overlap. Moreover, different forms of nondeterministic exploration, where symbols read are processed more than once, are often used, which can be costly in real-time matching. We present an algorithm that constructs from any regexp a Mealy machine that finds all matches and while reading each input symbol only once. The machine computed can also detect and distinguish different patterns or sub-patterns inside patterns. Additionally, we show how to compute a minimal Mealy machine via a variation of DFA minimization, by formalizing Mealy machines in terms of regular languages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。