Affiliation:
1. Univ. of Reading, Reading, Berkshire, England
Abstract
A new technique of program transformation, called “recursion introduction,” is described and applied to two algorithms which solve pattern matching problems. By using recursion introduction, algorithms which manipulate a stack are first translated into recursive algorithms in which no stack operations occur. These algorithms are then subjected to a second transformation, a method of recursion elimination called “tabulation,” to produce programs with a very efficient running time. In particular, it is shown how the fast linear pattern matching algorithm of Knuth, Morris, and Pratt can be derived in a few steps from a simple nonlinear stack algorithm.
Publisher
Association for Computing Machinery (ACM)
Reference11 articles.
1. Bird R.S. Notes on recursion elimination. To appear in Comm. ACM. 10.1145/359605.359630 Bird R.S. Notes on recursion elimination. To appear in Comm. ACM. 10.1145/359605.359630
2. Program Schemes with Pushdown Stores
Cited by
22 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献