scispace - formally typeset
Search or ask a question

Showing papers on "Program transformation published in 1977"


Journal ArticleDOI
TL;DR: A system of rules for transforming programs, with the programs in the form of recursion equations, are described, with an initially very simple, lucid, and hopefully correct program transformed into a more efficient one by altering the recursion structure.
Abstract: A system of rules for transforming programs is described, with the programs in the form of recursion equations. An initially very simple, lucid, and hopefully correct program is transformed into a more efficient one by altering the recursion structure. Illustrative examples of program transformations are given, and a tentative implementation is described. Alternative structures for programs are shown, and a possible initial phase for an automatic or semiautomatic program-manipulation system is indicated.

1,417 citations


Journal ArticleDOI
TL;DR: 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.
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.

37 citations


Proceedings ArticleDOI
TL;DR: This paper shows one technique for organizing sequences of low-level program transformations within an interactive programming medium to achieve nearly automatic global program improvements with low search times and minimal human intervention and guidance.
Abstract: Systems for program transformation have been suggested by many authors [Knuth, Wegbreit, Loveman, Balzer, Standish2, Burstall & Darlington]. Several of these authors note that such transformation systems could be used to transform lucid, high-level, but possibly inefficient program descriptions into efficient but possibly less legible underlying concrete realizations. One problem, mentioned by Loveman [Loveman] is that of chaining together many low-level simple transformations to achieve high-level goals. For example, we may wish to chain together low-level transformations such as constant propagation, performing arithmetic at transformation time, dead variable elimination, empty statement removal and the like, to achieve the high-level goal of program simplification. This paper shows one technique for organizing sequences of low-level program transformations within an interactive programming medium to achieve nearly automatic global program improvements with low search times and minimal human intervention and guidance.

14 citations