Benefits of Adaptive Programming (AP)

Evolution and maintenance

Every time the class structure of a large application changes, all places where assumption about the former class structure were made must be hunted down and reworked to conform to the new class structure. As applications tend to go through many such changes during the course of development, such trivial maintenance can be very time consuming.

Demeter/Java is a methodology and programming system that alleviates the burden of maintaining programs with changing class structure by separating class structure and behavior into separate aspects. JavaCC is used to "adaptively" instantiate objects without hard coding their internal structure. A variation of the visitor pattern is used to perform computations on objects without making detailed assumptions about their structure. The combination results in "structure-shy programs" that are robust with respect to changes in the class structure of the application, significantly reducing application development and evolution/maintenance time.

Demeter/Java is also being extended to separate the issues of concurrent and distributed programming from the behavior.

Object-oriented programs are often not right the first time. Especially class organizations need to be adjusted several times. Many of the changes which need to be made can be done semi-automatically by using AP. AP makes the programs easier to evolve by preparing for a large number of changes without having to plan for them in detail. AP allows you to increase the probability that your programs will be very adaptable.

True information hiding

When writing a function f(b:B) the traditional way, the source code of f including all the code which will be called by f, reveals in detail parts of the organization of B. Should this part of the organization change for some other reason than maintenance of f, we still have to maintain f. With AP we can truly hide the detailed organization of B in the source code of f.

Visitor/Traversal style simplifies behavioral evolution

While traversal strategies simplify structural evolutions, the visitor/traversal style of programming of Demeter/Java simplifies behavioral evolution. Visitor Pattern related benefits

Technology is mature and is easy to implement

Peter Orbaek at MIT has implemented Demeter/Perl in a few days. The source code is available. Many theoretical issues behind AP are well understood to justify widespread use.

Written by Karl Lieberherr and Johan Ovlinger