Coupling Aspect-Oriented and Adaptive Programming

Karl Lieberherr, Northeastern University
David H. Lorenz, Northeastern University

Adaptive Programming (AP) is a programming technique for developing concern shy programs. AP can be viewed as a special case of Aspect-Oriented Programming (AOP), and vice-versa. In this book chapter, we examine the close relationship between AP and AOP and discuss their integration. The integration of AP and AOP produces better support for ubiquitous traversal-related concerns and for concern-shy aspect-oriented programming. We illustrate the coupling of AOP and AP by describing DJ, a hybrid tool of Demeter and Java, and by describing DAJ , a hybrid tool of Demeter and AspectJ.

In Robert E. Filman and Tzilla Elrad and Siobhán Clarke and Mehmet Akşit, editors, Aspect-Oriented Software Development, Addison-Wesley, Boston, 2005, Pages 145-164. ISBN 0-321-21976-7


From the preface to the book:

Software development is changing. The opportunities of the Internet, computerized businesses, and computer-savvy consumers, the exponential decline in the cost of computation and communication, and the increasingly dynamic environment for longer-living systems are pressing software developers to come up with better ways to create and evolve systems. There is fomenting in software development process, system structure, programming, quality assurance, and maintenance.

Software is about building computational models of some part of the elements or information flow of the world. For all but the most trivial software systems, conquering the engineering of the system requires (perhaps recursively) dividing the system into chunks that can be (by and large) separately created and managed. The last decade of the twentieth century saw the rise (and perhaps dominance) of the objectoriented perspective on system modularization. Object-orientation focuses on selecting objects as the primary unit of modularity and associating with these objects all the system's behavior. Objects are typically elements of the domain or of the computational process.

Object-orientation is reaching its limits. Many things one cares about in creating a software system (concerns) are not neatly localized to the behavior of specific "things." Building diverse systems requires simultaneously manipulating many concerns. Examples of concerns range from non-functional notions such as security, reliability, and manageability to precise implementation techniques such as concurrency control, caching, and error recovery. Since conventional programming technologies are centered on producing a direct sequence of instructions, they require the programmer to remain cognizant of all such concerns throughout the programming process. The programmer must explicitly intermix the commands to achieve these concerns with the code for the primary application functionality. This produces tangled code and erroneous and difficult-to-maintain systems.

New technologies are emerging to allow richer specifications of programs and better modularization of these specifications. Along with these new technologies, we are also seeing novel software engineering methodologies for using them. One of the most exciting of these new technologies is aspect-oriented software development (AOSD). AOSD programming technologies (aspect-oriented programming, or AOP) provide linguistic mechanisms for separate expression of concerns, along with implementation technologies for weaving these separate concerns into working systems. Aspect-oriented software engineering (AOSE) technologies are emerging for managing the process of developing systems within this new paradigm.


Table of Contents:
Bios.
Preface.
1. Introduction.

I. LANGUAGES AND FOUNDATIONS.
2. Aspect-Oriented Programming is Quantification and Obliviousness
3. N Degress of Separation: Multi-Dimensional Separation of Concerns.
4. Principles and Design Rationale of Composition Filters.
5. Aspect-Oriented Programming: A Historic Perspective (What's in a Name?).
6. AspectJ.
7. Coupling Aspect-Oriented and Adaptive Programming.
   7.1 INTRODUCTION
   7.1.1 Concern-Shy Programming
   7.1.2 Structure-Shy Programming
   7.2 SHYNESS AS A METAPHOR FOR ADAPTIVE BEHAVIOR
   7.2.1 How Shyness Relates to AP
   7.2.2 How Shyness Relates to AOP
   7.2.3 Law of Demeter
   7.2.4 Law of Demeter for Concerns
   7.3 REFLECTIVE ADAPTIVE PROGRAMMING WITH DJ
   7.3.1 Implementation Highlights
   7.4 ASPECTUAL ADAPTIVE PROGRAMMING WITH DAJ
   7.4.1 Strategy Graph Intersection
   7.4.2 Visitor Classes
   7.5 RELATED WORK
   7.6 CONCLUSION
   References

8. Untangling Crosscutting Models With Caesar.
9. Trace-based Aspects.
10. Using Mixin Technology to Improve Modularity.
11. Separating Concerns with First-Class Namespaces.
12. Supporting AOP using Reflection.
13. Inserting Ilities by Controlling Communications.
14. Using Bytecode Transformation to Integrate New Features.
15. JMangler - A Powerful Back-End for Aspect-Oriented Programming.
16. Aspect-Oriented Software Development with Java Aspect Components.

II. SOFTWARE ENGINEERING.
17. Engineering Aspect-Oriented Systems.
18. Aspect-Orientation in the Software Life Cycle: Fact and Fiction.
19. Generic Aspect-Oriented Design with Theme/UML.
20. Expressing Aspects using UML Behavioral and Structural Diagrams.
21. Concern Modeling for Aspect-Oriented Software Development.
22. Design Recommendations for Concern Elaboration Tools.
23. An Initial Assessment of Aspect-Oriented Programming.
24. Aspect-Oriented Dependency Management.
25. Developing Software Components with Aspects: Some Issues and Experiences.
26. Smartweaver: A Knowledge-driven Approach for Aspect Composition.

III. APPLICATIONS.
27. Developing Secure Applications through Aspect-Oriented Programming.
28. Structuring Operating System Aspects.
29. Aspect-Oriented Programming for Database Systems.
30. Two-Level Aspect Weaving to Support Evolution in Model-Driven Synthesis.
31. Dynamic Aspect-Oriented Infrastructure.


@InCollection{Lieberherr:aosdbook05,
   title = {Coupling Aspect-Oriented and Adaptive Programming},
   pages = {145-164},
   author = {Karl Lieberherr and David~H. Lorenz},
   crossref = {:aosdbook05},
   URL = "\url{http://www.ccs.neu.edu/home/lorenz/papers/books/aosdbook05/}",
}
@Book{:aosdbook05,
   publisher = {Addison-Wesley},
   address = {Boston},
   title = {Aspect-Oriented Software Development},
   editor = {Robert E. Filman and Tzilla Elrad and Siobh\'an Clarke and Mehmet {Ak{\c s}it}},
   year = 2005,
   isbn = {0-321-21976-7}
}

Other papers