字符串中朴素模式匹配程序模型的特殊化(扩展抽象)
On Specialization of a Program Model of Naive Pattern Matching in Strings (Extended Abstract)
摘要:
我们证明了对于任何模式p,朴素模式匹配的尾递归程序模型可以自动地特化为w.r.t.模式p到所谓的KMP算法的专门版本,使用控制展开/折叠的Higman-Kruskal关系。给定一个输入字符串,相应的残差程序在线性时间内找到字符串中第一次出现的p。基于展开/折叠的自动化程序专业化技术的当前状态太弱,以便能够再现手工完成的上述统一属性的证明,而在此之前已知程序专业化有时能够为一些具体的静态模式产生KMP算法。
英文摘要:
We have proved that for any pattern p the tail recursive program model of naive pattern matching may be automatically specialized w.r.t. the pattern p to a specialized version of the so-called KMP-algorithm, using the Higman-Kruskal relation that controls the unfolding/folding. Given an input string, the corresponding residual program finds the first occurrence of p in the string in linear time on the string length. The current state of the automated program specialization art based on unfolding/folding is too weak in order to be able to reproduce the proof, done by hands, of the uniform property above, while it known before that program specialization is sometimes able to produce the KMP-algorithm for a few concrete static patterns.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。