Title: More Flexible Software By Favoring Implicit Calls and Communication over Explicit Calls and Communication Speaker: Karl Lieberherr, CCIS, PRL, Northeastern University Abstract: Adaptive Programming (AP) has promoted the idea of calling methods indirectly through traversals. Aspect-Oriented Programming (AOP) took this to the next level by calling methods indirectly through general programs, not just traversals. Both AP and AOP are departures from the traditional functional and object-oriented approaches that suffer from two major problems: they explicitly mention by name the subterms or subobjects that need to be traversed (explicit traversal problem) and they explicitly mention parameters that are passed down to subterms or subobjects, whether or not they are relevant to the current term or object (explicit argument problem). The reason for the two problems is a low-level use of "follow the structure" or "follow the grammar". We propose two new approaches to implicit calls and communication. The first approach, called AP-F, is a functional approach that parameterizes the traversal with three kinds of function objects: transformers, builders and augmentors. The default traversal is implementing a builder. Our current implementation of AP-F is called DemeterF and is provided as a Java library that heavily relies on reflection. DemeterF includes a type checker that proves useful in debugging the programs. The second approach, called AP-P, is an interposition visitor approach that relies on traversals and before/after methods. An interposition visitor uses interposition variables that facilitate implicit communication. Our current implementation of AP-P is called DemeterP and relies on code generation using AspectJ. We have successfully used DemeterF programs for refactoring interpreters, compilers from the EoPL book by Friedman and Wand, making the programs both simpler and more flexible. Joint work with Bryan Chadwick, Ahmed Abdelmeged and Therapon Skotiniotis. === Possible Titles: Traversal Scoped Variables Abstracting Over Transformations and Communication (in Traversal-Related Concerns) Outline 1. Introduction Implicit versus explicit calls and communication Running Examples: evaluator, type checker, translator 2. AP-F 2.1 Dynamic join point model 2.2 Operational semantics 2.3 Type-checking Transformers Typing rule at object level Typing rule at class level Theorem from mp 8 linking the two Combiners Augmentors 2.4 Design Issues: From requirements to AP-F 2.5 Implementation DemeterF Example code 3. AP-P Interposition visitors 3.1 Dynamic join point model 3.2 Operational semantics Simulating Transforms and Combines. Parameterized Copy Visitor. Visitor Combination. 3.* Design Issues: From requirements to AP-P 3.* Implementation DemeterP Example code 4. Comparsion 5. Related Work SYB, Attribute Grammars, Functional Visitors 6. Experience Report