Extension Rules: Description Rules for Safely Composable Aspects

Aspect composition — application of two or more separately developed aspects to a single target code — generally requires great skills and knowledge on both aspects and the target. We give a collection of rules, called extension rules, for safely composable aspects. If all the member of a set of aspects obey the extension rules, they can be safely composable, even if independent programmers implement them. Our extension rules restrict how aspects extend the behavior of existing methods in the target. In this paper, we say how the extension rules can be applied to the diamond inheritance case of mixins and then MixJuice language modules. We describe a method of verifying extension rules in those cases. We use the notion of preand post-conditions and behavioral subtyping to define the composability criterion for mixins and MixJuice modules. Four specific extension rules (the After Rule, the Plus Rule, the Functional Protocol Rule and the Disjoint Branch Rule) and their verification method are presented. We also mention the future direction of our research needed to realize safe and easy aspect-oriented programming.

[1]  Guy L. Steele,et al.  Common LISP: the language, 2nd Edition , 1990 .

[2]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[3]  David A. Moon,et al.  Object-oriented programming with flavors , 1986, OOPLSA '86.

[4]  Safely creating correct subclasses without seeing superclass code , 2000, OOPSLA '00.

[5]  Frank Tip,et al.  Semantics-Based Composition of Class Hierarchies , 2002, ECOOP.

[6]  Jeannette M. Wing,et al.  A behavioral notion of subtyping , 1994, TOPL.

[7]  Akira Tanaka,et al.  Difference-Based Modules: A Class-Independent Module Mechanism , 2002, ECOOP.

[8]  Robert C. G. Martin The Liskov Substitution Principle , 1996 .

[9]  Naoyasu Ubayashi,et al.  Aspect-oriented programming with model checking , 2002, AOSD '02.

[10]  Gary T. Leavens,et al.  Observers and Assistants: A Proposal for Modular Aspect-Oriented Reasoning , 2002 .

[11]  Gary T. Leavens,et al.  Forcing behavioral subtyping through specification inheritance , 1996, Proceedings of IEEE 18th International Conference on Software Engineering.

[12]  Bertrand Meyer,et al.  Object-oriented software construction (2nd ed.) , 1997 .

[13]  Daniel G. Bobrow,et al.  Book review: The Art of the MetaObject Protocol By Gregor Kiczales, Jim des Rivieres, Daniel G. and Bobrow(MIT Press, 1991) , 1991, SGAR.

[14]  Uwe Assmann,et al.  AOP with design patterns as meta-programming operators , 1997 .

[15]  Harold Ossher,et al.  Multi-Dimensional Separation of Concerns and the Hyperspace Approach , 2002 .

[16]  Gregor Kiczales,et al.  Discussing aspects of AOP , 2001, CACM.