There are at least the following implications by Mitch Wand's paper:

Need for recursive traversal functions as opposed to the iterative traversals we have now. This leads to a more complex mechanism to express what needs to be done at each node but it also results in more expressiveness. We have thought of recursive traversal functions when we designed Demeter but we excluded them initially. In an ideal world, the adaptive programmer should be able to choose between iterative and recursive traversals.

Adaptive Programming is about automatically generalizing programs and about making it more likely that the programs are easily adaptable. This is a guessing game and often the programmer guesses wrong. If the guess is wrong, we can modify an "almost" working program and this is intended to be easier than doing the modification from scratch. Adaptive programs don't want to be correct. Instead they try to be approximately correct for a family of class graphs. For each class graph, some repairs might be needed.

Mitch prefers a reasoning in terms of subgraphs instead of subpaths. This is implemented in Demeter/C++. However, this solution requires that the class graph and directive be consistent ( Efficient Implementation of Adaptive Software). This consistency restriction makes use of AP more difficult although our experience shows that inconsistency occurrs infrequently: There can be a situation where three individual programs are each consistent with a class graph, however for the three programs combined there is no class graph which is consistent with all of them.

There are two ways to deal with inconsistency: Limit the set of directives so that inconsistency is impossible or use more general compilation algorithms. The first alternative eliminates too much expressiveness since "positive" constraints (like through or via) must be excluded. The second alternative is discussed in ( A New Approach to Compiling Adaptive Programs).

The optimal solution, we think, is in between: to use a compilation algorithm which is simpler than the one in ( A New Approach to Compiling Adaptive Programs) and also to limit the expressiveness of the directives. A paper is under preparation.

Back to AP home page