| Improving programs by the introduction of recursion |
| Full text |
Pdf
(736 KB)
|
Source
|
Communications of the ACM
archive
Volume 20 , Issue 11 (November 1977)
table of contents
Pages: 856 - 863
Year of Publication: 1977
ISSN:0001-0782
|
|
Author
|
|
R. S. Bird
|
Univ. of Reading, Reading, Berkshire, England
|
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 12, Downloads (12 Months): 30, Citation Count: 13
|
|
|
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.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
Bird, R.S. Speeding up programs. Computer J. 17, 4 (1975), 337-339.
|
 |
3
|
|
| |
4
|
Bird, R.S. Programs and Machines-An Introduction to the Theory of Computation. John Wiley, London, 1976.
|
| |
5
|
Brown, S., Gries, D., and Szymanski, T. Program schemes with pushdown stoves. SIAM J. Comptng. 1 (1972), 242-268.
|
| |
6
|
|
| |
7
|
Darlington, J., and Burstall, R.M. A system which automatically improves programs. Proc. 3rd Int. Conf. on Artif, Intell., Stanford U., Stanford, Calif., 1973, pp. 479-485.
|
 |
8
|
|
| |
9
|
Knuth, D.E., Morris, J.H., Jr., and Pratt, V.R. Fast pattern matching in strings. Res. Rep. CS-74-440, Comptr. Sci. Dept., Stanford, U., Stanford, Calif., 1974.
|
| |
10
|
|
 |
11
|
|
CITED BY 13
|
|
|
|
|
|
|
|
Torben Amtoft , Charles Consel , Olivier Danvy , Karoline Malmkjær, The abstraction and instantiation of string-matching programs, The essence of computation: complexity, analysis, transformation, Springer-Verlag New York, Inc., New York, NY, 2002
|
|
|
|
|
|
|
|
|
Yoshihiko Futamura , Zenjiro Konishi , Robert Glück, WSDFU: program transformation system based on generalized partial computation, The essence of computation: complexity, analysis, transformation, Springer-Verlag New York, Inc., New York, NY, 2002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|