Program transformations using the pattern replacement technique

Journal Title
Journal ISSN
Volume Title

Program transformations are performed in various software systems. One of the examples is a heterogeneous distributed database system, where there is a need to transform a query from one language to another. Instead of using several dedicated cross translators, a generalized symbolic language transformer is proposed. Such a transformer requires the syntax descriptions for both the source and target languages along with the transformation rules. An LR(k) parser is used to parse the input code and the transformation rules. The "pattern replacement technique" is introduced to perform the transformations. This involves comparing the input expression with the transformation rules and applying the proper rule. Several modes which determine how the rules should be applied are discussed. The program transformation system was implemented in Pascal language on the VAX-11/780 computer.

Translators (Computer programs), Parsing (Computer grammar), Compiling (Electronic computers)