Program manipulation via an efficient production system

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.