Program Transformation

Program transformation systematically changes a program within one language into a different shape, usually preserving its semantics. The aim usually is to improve efficiency.

Therefore, languages that are close to their semantics, aforemost referentially transparent languages, offer most possibilities for program transformation.

For the process of transformation, programs are usually not represented as strings, but as trees (corresponding to the parse tree). My position is that program transformation, no matter whether interactive or automatic, would be better served if it represented programs as second-order term graphs, since term graphs make more structure explicit, and this structure can then be more easily be taken advantage of in the transformation process. I am implementing this in the graphically interactive program transformation system HOPS, which sees and presents programs as term graphs; the transformation system builds on the theory of second-order term graph rewriting.

Some Links


Wolfram Kahl