Open Modules: Modular Reasoning About Advice

Advice is a mechanism used by advanced object-oriented and aspect-oriented programming languages to augment the behavior of methods in a program. Advice can help to make programs more modular by separating crosscutting concerns more effectively, but it also challenges existing ideas about modularity and separate development. We study this challenge using a new, simple formal model for advice as it appears in languages like AspectJ. We then add a module system designed to leave program functionality as open to extension through advice as possible, while still enabling separate reasoning about the code within a module. Our system, Open Modules, can either be used directly to facilitate separate, component-based development, or can be viewed as a model of the features that certain AOP IDEs provide. We define a formal system for reasoning about the observational equivalence of programs under advice, which can be used to show that clients are unaffected by semantics-preserving changes to a module's implementation. Our model yields insights into the nature of modularity in the presence of advice, provides a mechanism for enforceable contracts between component providers and clients in this setting, and suggests improvements to current AOP IDEs.

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

[2]  Shriram Krishnamurthi,et al.  Pointcuts and advice in higher-order languages , 2003, AOSD '03.

[3]  Robin Milner,et al.  Communicating and mobile systems - the Pi-calculus , 1999 .

[4]  Kathi Fisler,et al.  Verifying aspect advice modularly , 2004, SIGSOFT '04/FSE-12.

[5]  Christian Koppen,et al.  PCDiff : Attacking the Fragile Pointcut Problem , 2004 .

[6]  Daniel P. Friedman,et al.  Aspect-Oriented Programming is Quantification and Obliviousness , 2000 .

[7]  Hidehiko Masuhara,et al.  Modeling Crosscutting in Aspect-Oriented Mechanisms , 2003, ECOOP.

[8]  Gilad Bracha,et al.  The programming language jigsaw: mixins, modularity and multiple inheritance , 1992 .

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

[10]  Gregor Kiczales,et al.  Addressing Practical Software Development Issues in AspectJ with a Pointcut Interface , 2001 .

[11]  David Walker,et al.  A theory of aspects , 2003, ICFP '03.

[12]  Ralf Lämmel,et al.  A semantical approach to method-call interception , 2002, AOSD '02.

[13]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[14]  Davide Ancona,et al.  A calculus of module systems , 2002, J. Funct. Program..

[15]  Davide Sangiorgi,et al.  Communicating and Mobile Systems: the π-calculus, , 2000 .

[16]  Robin Milner,et al.  Definition of standard ML , 1990 .

[17]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[18]  Gregor Kiczales,et al.  A semantics for advice and dynamic join points in aspect-oriented programming , 2001, TOPL.

[19]  Gary T. Leavens,et al.  MultiJava: modular open classes and symmetric multiple dispatch for Java , 2000, OOPSLA '00.

[20]  David Walker,et al.  Aspects, Information Hiding and Modularity , 2003 .

[21]  Acknowledgments , 2006, Molecular and Cellular Endocrinology.

[22]  Daniel G. Bobrow,et al.  Common lisp object system specification , 1988, SIGP.

[23]  Radha Jagadeesan,et al.  A Calculus of Untyped Aspect-Oriented Programs , 2003, ECOOP.

[24]  Karl J. Lieberherr,et al.  Aspectual Collaborations: Combining Modules and Aspects , 2003, Comput. J..

[25]  Andy Clement,et al.  Aspect-Oriented Programming with AJDT , 2003 .