Results 1  10
of
10
Fast Partial Evaluation of Pattern Matching in Strings
 Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and SemanticsBased Program Manipulation (PEPM ’03
, 2003
"... We show how to obtain all of Knuth, Morris, and Pratt's lineartime string matcher by partial evaluation of a quadratictime string matcher with respect to a pattern string. Although it has been known for 15 years how to obtain this linear matcher by partial evaluation of a quadratic one, how to ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
We show how to obtain all of Knuth, Morris, and Pratt's lineartime string matcher by partial evaluation of a quadratictime string matcher with respect to a pattern string. Although it has been known for 15 years how to obtain this linear matcher by partial evaluation of a quadratic one, how to obtain it in linear time has remained an open problem.
Program Transformation System Based on Generalized Partial Computation
, 2002
"... Generalized Partial Computation (GPC) is a program trans formation method utilizing partial information about input data, abstract data types of auxiliary functions and the logical structure of a source program. ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
Generalized Partial Computation (GPC) is a program trans formation method utilizing partial information about input data, abstract data types of auxiliary functions and the logical structure of a source program.
On Obtaining Knuth, Morris, and Pratt's String Matcher by Partial Evaluation
, 2002
"... We present the first formal proof that partial evaluation of a quadratic string matcher can yield the precise behaviour of Knuth, Morris, and Pratt's linear string matcher. Obtaining a KMPlike string matcher is a canonical example of partial evaluation: starting from the naive, quadratic program ch ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
We present the first formal proof that partial evaluation of a quadratic string matcher can yield the precise behaviour of Knuth, Morris, and Pratt's linear string matcher. Obtaining a KMPlike string matcher is a canonical example of partial evaluation: starting from the naive, quadratic program checking whether a pattern occurs in a text, one ensures that backtracking can be performed at partialevaluation time (a bindingtime shift that yields a staged string matcher); specializing the resulting staged program yields residual programs that do not back up on the text, a la KMP. We are not aware, however, of any formal proof that partial evaluation of a staged string matcher precisely yields the KMP string matcher, or in fact any other specific string matcher. In this article, we present a staged string matcher and we formally prove that it performs the same sequence of comparisons between pattern and text as the KMP string matcher. To this end, we operationally specify each of the programming languages in which the matchers are written, and we formalize each sequence of comparisons with a trace semantics. We also state the (mild) conditions under which specializing the staged string matcher with respect to a pattern string provably yields a specialized string matcher whose size is proportional to the length of this pattern string and whose time complexity is proportional to the length of the text string. Finally, we show how tabulating one of the functions in this staged string matcher gives rise to the `next' table of the original KMP algorithm. The method scales for obtaining other linear string matchers, be they known or new.
Automatic generation of efficient string matching algorithms by generalized partial computation
 In Chin [8
, 2002
"... This paper shows that Generalized Partial Computation (GPC) can automatically generate efficient string matching algorithms. GPC is a program transformation method utilizing partial information about input data and auxiliary functions as well as the logical structure of a source program. GPC uses bo ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
This paper shows that Generalized Partial Computation (GPC) can automatically generate efficient string matching algorithms. GPC is a program transformation method utilizing partial information about input data and auxiliary functions as well as the logical structure of a source program. GPC uses both a classical partial evaluator and an inference engine such as a theorem prover to optimize programs. First, we show that a BoyerMoore (BM) type pattern matcher without the badcharacter heuristic can be generated from a simple nonlinear backward matcher by GPC. This sort of problems has already been discussed in the literature using offline partial evaluators. However, there was no proof that every generated matcher runs in the same way as the BM. In this paper we prove that the problem can be solved starting from a simple nonlinear pattern matcher as a source program. We also prove that a KnuthMorrisPratt (KMP) type linear string matcher can be generated from a naive nonlinear forward matcher by GPC.
Jones Optimality, BindingTime Improvements, and the Strength of Program Specializers
"... Jones optimality tells us that a program specializer is strong enough to remove an entire level of selfinterpretation. We show that Jones optimality, which was originally aimed at the Futamura projections, plays an important role in bindingtime improvements. The main results show that, regardless ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Jones optimality tells us that a program specializer is strong enough to remove an entire level of selfinterpretation. We show that Jones optimality, which was originally aimed at the Futamura projections, plays an important role in bindingtime improvements. The main results show that, regardless of the bindingtime improvements which we apply to a source program, no matter how extensively, a specializer that is not Jonesoptimal is strictly weaker than a specializer which is Jones optimal. By viewing a bindingtime improver as a generating extension of a selfinterpreter, we can connect our results with previous work on the interpretive approach.
WSDFU: Program Transformation System Based on Generalized Partial Computation Yoshihiko Futa mura
 The Essence of Computation: Complexity, Analysis, Transformation
"... GenerDFDDD Par ial Com utation (GPC) is arFK tr ansfor0D ion method utilizingar ial infor.Z ion about in ut data and auxiliar functions as well as the logical str uctu r of a sou rprp:wwZ GPC uses both an infer nce engine such as a theor m r ver and a classical ar ial evaluator to o timizerpDw s. Th ..."
Abstract
 Add to MetaCart
GenerDFDDD Par ial Com utation (GPC) is arFK tr ansfor0D ion method utilizingar ial infor.Z ion about in ut data and auxiliar functions as well as the logical str uctu r of a sou rprp:wwZ GPC uses both an infer nce engine such as a theor m r ver and a classical ar ial evaluator to o timizerpDw s. TherF:Z.Z GPC is mor ower ful than classical ar tial evaluator but harpr to im lement and contr0D We have im lemented an exerDF tal GPC system called WSDFU (Waseda Sim lifyDistr buteFoldUnfold). This a er demonstr tes the ower of therD..Y tr ansfor ation system as well as its theorw r ver and discusses some futur e wor s. 1
Basic Research in Computer Science
, 2004
"... We show how to obtain all of Knuth, Morris, and Pratt's lineartime string matcher by specializing a quadratictime string matcher with respect to a pattern string. Although it has been known for 15 years how to obtain this linear matcher by partial evaluation of a quadratic one, how to obtain it ..."
Abstract
 Add to MetaCart
We show how to obtain all of Knuth, Morris, and Pratt's lineartime string matcher by specializing a quadratictime string matcher with respect to a pattern string. Although it has been known for 15 years how to obtain this linear matcher by partial evaluation of a quadratic one, how to obtain it in linear time has remained an open problem.