An adaptive program is an object-oriented program which is abstracted over the particular class structure. This abstraction fosters software reuse, because programmers can concentrate on specifying how to process the objects which are essential to their application. The compiler of an adaptive program takes care of actually locating the objects. The adaptive programmer merely writes a traversal specification decorated with actions. The compiler instantiates the specification with the actual class structure and generates code that traverses a collection of objects, performing visits and actions according to the specification. Earlier work on adaptive programming merely stated but never verified that compilation of adaptive programs is nothing but partial evaluation. We employ an algebraic framework based on derivatives of traversal specifications to develop an interpretive semantics of adaptive programming. This semantics is naturally staged in up to three stages. Compilation can be achieved using a standard partial evaluator. Slight changes in the binding-time properties yield several variants of the compiler, by trading compile-time computations for run-time computations.
CITATION STYLE
Thiemann, P. (2000). Compiling adaptive programs by partial evaluation. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 1781, pp. 264–279). Springer Verlag. https://doi.org/10.1007/3-540-46423-9_18
Mendeley helps you to discover research relevant for your work.