2001
DOI: 10.7146/brics.v8i12.20469
|View full text |Cite
|
Sign up to set email alerts
|

The Abstraction and Instantiation of String-Matching Programs

Abstract: We consider a naive, quadratic string matcher testing whether a pattern occurs in a text; we equip it with a cache mediating its access to the text; and we abstract the traversal policy of the pattern, the cache, and the text. We then specialize this abstracted program with respect to a pattern, using the off-the-shelf partial evaluator Similix.Instantiating the abstracted program with a left-to-right traversal policy yields the linear-time behavior of Knuth, Morris and Pratt's string matcher. Instantiating it… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
3
2

Citation Types

0
5
0

Year Published

2002
2002
2011
2011

Publication Types

Select...
3
2
2

Relationship

2
5

Authors

Journals

citations
Cited by 7 publications
(5 citation statements)
references
References 31 publications
0
5
0
Order By: Relevance
“…To induce this effect, we can either rewrite the matcher so that backtracking only depends on static data (such a rewriting is known as a binding-time improvement or a staging transformation [Mogensen 2000]) and use a simple partial evaluator [Amtoft et al 2002;Consel and Danvy 1989], or keep the matcher as is and use an advanced partial evaluator [Futamura et al 2002a;Secher 2002;Smith 1991;Sørensen et al 1996]. In this article, the starting point is a staged quadratic-time matcher and a simple memoizing partial evaluator such as Similix, where specialization points are dynamic conditional expressions [Bondorf and Danvy 1991].…”
Section: Obtaining a Specialized Matcher That Work In Linear Timementioning
confidence: 99%
See 1 more Smart Citation
“…To induce this effect, we can either rewrite the matcher so that backtracking only depends on static data (such a rewriting is known as a binding-time improvement or a staging transformation [Mogensen 2000]) and use a simple partial evaluator [Amtoft et al 2002;Consel and Danvy 1989], or keep the matcher as is and use an advanced partial evaluator [Futamura et al 2002a;Secher 2002;Smith 1991;Sørensen et al 1996]. In this article, the starting point is a staged quadratic-time matcher and a simple memoizing partial evaluator such as Similix, where specialization points are dynamic conditional expressions [Bondorf and Danvy 1991].…”
Section: Obtaining a Specialized Matcher That Work In Linear Timementioning
confidence: 99%
“…In this article, the starting point is a staged quadratic-time matcher and a simple memoizing partial evaluator such as Similix, where specialization points are dynamic conditional expressions [Bondorf and Danvy 1991]. Figure 1 displays a staged matcher similar to the ones developed in the literature [Ager et al 2002;Amtoft et al 2002;Consel and Danvy 1989;Jones et al 1993] (see Appendix A for a more complete picture). Matching is done naively from left to right.…”
Section: Obtaining a Specialized Matcher That Work In Linear Timementioning
confidence: 99%
“…This process is most commonly used as an optimization strategy dedicated to removing the interpretation layer. The interpreter paradigm, coupled with partial evaluation, has been successfully applied to a wide range of areas, besides programming language implementations, including string matching [1], networking [2] and operating systems [7]. Although limited in the dimensions covered, this form of a paradigm-oriented software development approach has demonstrated its effectiveness for optimization purposes.…”
Section: Introductionmentioning
confidence: 99%
“…This paper shows that some efficient algorithms can be automatically generated from inefficient ones. Automatic generation of an efficient pattern matcher from a naive one, introduced in [7], is a typical problem for partial evaluation [1,2,5,10,14]. Let m be the length of a given pattern and n be the length of a given text.…”
Section: Introductionmentioning
confidence: 99%
“…This paper deals with Type 1 problem and reports that, by Generalized Partial Computation (GPC) [8,9], we can generate (1) a Boyer-Moore (BM) type pattern matcher [3] without the bad-character heuristic (the delta 1 table in [3]; see Appendix 1) from a non-linear backward matcher and (2) a Knuth-Morris-Pratt (KMP) matcher from a non-linear forward matcher. Generation of a BM type matcher has been discussed in [2] using off-line partial evaluator. However, there was no proof that every generated matcher runs in the same way as the BM matcher.…”
Section: Introductionmentioning
confidence: 99%