Hi Mira and David and Doug and Johan: This is related to what Mira and David have been working on and to the class graph views Johan has promoted. Can we prove a conjecture such as the following? Conjecture: "AP = OOP with Adaptive Maps" For all single strategy adaptive programs ap with name map N there exists an object-oriented program op written for an interface class graph i and there exists an adaptive map m: Edges(i) -> PathSets(c) and name map N' such that for all class graphs c: ap applied to c with N == op/i mapped by m to c with N' The idea is to view the strategy graph as an interface class graph after dropping source and target and to give 0..* cardinalities to the edges in this interface class graph. The object-oriented program op is written against this interface class graph. The map says how each edge in the interface class graph is mapped to a path set in c. If the strategy in ap has an edge X->Y with constraint Z then the map will map the edge into all paths from X to Y satisfying constraint Z. N = N' Example: SummingVisitor-Car-Airplane 1 2 Container Car Airplane Weight Weight Weight Because the strategy consists of Container->Weight with constraint Z we write the program against the interface class graph Container = 0..* Weight. The code will iterate over all Weight objects. After the mapping the iteration will be restricted to the paths satisfying constraint Z. What is the best way in Java to subclass an iterator? Doug said that the next version of Java will have strong iterator support. Does it support this kind of specialization of an iterator? Writing code for the interface class graph in an iterator style seems to be very good because in the concrete class graph a similar but usually more complex iteration happens. -- Karl