A positive supercompiler
- 1 January 1996
- journal article
- research article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 6 (6) , 811-838
- https://doi.org/10.1017/s0956796800002008
Abstract
We introduce apositive supercompiler, a version of Turchin's supercompiler maintaining only positive information during transformation, and using folding without generalization. The positive supercompiler can also be regarded as a variant of Wadler's deforestation maintaining an increased amount of information. We compare our algorithm to deforestation and, in less detail, to partial evaluation, Turchin's supercompiler, Generalized Partial Computation (GPC), and partial deduction by classifying these transformers by the amount of information they maintain during transformation. This factor is significant, as a differentiating example reveals: positive supercompilation, Turchin's supercompiler, GPC and partial deduction can specialize a general pattern matcher with respect to a fixed pattern to obtain an efficient matcher very similar to the Knuth–Morris–Pratt algorithm. Deforestation and traditional partial evaluation achieve this effect only after a non-trivial hand rewriting of the general matcher.Keywords
This publication has 16 references indexed in Scilit:
- Partial evaluation in logic programmingThe Journal of Logic Programming, 1991
- Unfolding — definition — folding, in this order, for avoiding unnecessary variables in logic programsPublished by Springer Nature ,1991
- Deforestation: transforming programs to eliminate treesTheoretical Computer Science, 1990
- Partial evaluation of pattern matching in stringsInformation Processing Letters, 1989
- The concept of a supercompilerACM Transactions on Programming Languages and Systems, 1986
- Using circular programs to eliminate multiple traversals of dataActa Informatica, 1984
- A System for Assisting Program TransformationACM Transactions on Programming Languages and Systems, 1982
- A supercompiler system based on the language REFALACM SIGPLAN Notices, 1979
- Fast Pattern Matching in StringsSIAM Journal on Computing, 1977
- A Transformation System for Developing Recursive ProgramsJournal of the ACM, 1977