Uses of Transformations
- Optimization. Low-level inefficiencies created by a program
generation system can be removed.
- Specialization. Generic operations or program patterns can
be specialized to the form needed for a specific implementation
of an abstract data structure.
- Language translation. Transformations can change code into the
syntax of the target language.
- Code expansion. Small amounts of input code can be transformed
into large amounts of output code. The expansion can depend on
specifications that are much smaller than the final code.
- Partial evaluation. Things that are constant at compile time
can be evaluated and eliminated from code.