A new architecture for transformation-based generators
IEEE Transactions on Software Engineering
A serious problem of many transformation-based generators is that they are trying to achieve three mutually antagonistic goals simultaneously: 1) deeply factored operators and operands to gain the combinatorial programming leverage provided by composition, 2) high performance code in the generated program, and 3) small (i.e., practical) generation search spaces. The hypothesis of this paper is that current generator structures are inadequate to fully achieve these goals because they often
... an explosion of the generation search space. Therefore, new architectures are required. A generator has been implemented in Common LISP to explore architectural variations needed to address this quandary. It is called the Anticipatory Optimization Generator (AOG 3 ) because it allows programmers to anticipate optimization opportunities and to prepare an abstract, distributed plan that attempts to achieve them. More generally, AOG uses several strategies to prevent generation search spaces from becoming an explosion of choices but the fundamental principle underlying all of them is to solve separate, narrow and specialized generation problems by strategies tailored to each individual problem rather than attempting to solve all problems by a single, general strategy. A second fundamental notion is the preservation and use of domain specific information as a way to gain leverage on generation problems. This paper will focus on two specific mechanisms: 1) Localization: The generation and merging of implicit control structures, and 2) Tag-Directed Transformations: A new control structure for transformation-based optimization that allows differing kinds of domain knowledge (e.g., optimization knowledge) to be anticipated, affixed to the component parts in the reuse library, and triggered when the time is right for its use.