LODSPLSEAug 23, 2021

On Specialization of a Program Model of Naive Pattern Matching in Strings (Extended Abstract)

arXiv:2108.10865v11 citations
Originality Incremental advance
AI Analysis

This work addresses a foundational challenge in program optimization for string matching, but it is incremental as it builds on known specialization techniques without achieving full automation.

The paper tackles the problem of automatically specializing a naive pattern matching program model for any given pattern to produce a linear-time algorithm akin to KMP, proving that this can be achieved using Higman-Kruskal relations, though current automated specialization methods are insufficient to replicate the manual proof.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes