关于朴素模式匹配程序模型的特化(扩展摘要)
计算机科学中的逻辑
2021-08-25 v1 数据结构与算法
编程语言
软件工程
摘要
我们已证明,对于任意模式 p,朴素模式匹配的尾递归程序模型可以相对于模式 p 自动特化为所谓的 KMP 算法的一个特化版本,使用控制展开/折叠的 Higman-Kruskal 关系。给定一个输入字符串,相应的剩余程序能在与字符串长度成线性关系的时间内找到 p 在字符串中的首次出现。当前基于展开/折叠的自动程序特化技术水平太弱,无法重现上述统一性质的手工证明,尽管此前已知程序特化有时能够为少数具体的静态模式生成 KMP 算法。
引用
@article{arxiv.2108.10865,
title = {On Specialization of a Program Model of Naive Pattern Matching in Strings (Extended Abstract)},
author = {Andrei P. Nemytykh},
journal= {arXiv preprint arXiv:2108.10865},
year = {2021}
}
备注
Pre-proceedings paper presented at the 31st International Symposium on Logic-Based Program Synthesis and Transformation (LOPSTR 2021), Tallinn, Estonia, and Virtual, September 7-8, 2021 (arXiv:2107.10160)