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.
Unable to display preview. Download preview PDF.
- Aldrich, J.: Open Modules: Modular Reasoning about Advice. Carnegie Mellon Technical Report CMU-ISRI-04-141 (Dececember 2004), available at, http://www.cs.cmu.edu/aldrich/aosd/
- Bobrow, D.G., DiMichiel, L.G., Gabriel, R.P., Keene, S.E., Kiczales, G., Moon, D.A.: Common Lisp Object System Specification. In: SIGPLAN Notices, September 1988, vol. 23 (1988)Google Scholar
- Bracha, G.: The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. Ph.D. Thesis, Dept. of Computer Science, University of Utah (1992)Google Scholar
- Clement, A., Colyer, A., Kersten, M.: Aspect-Oriented Programming with AJDT. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743. Springer, Heidelberg (2003)Google Scholar
- Clifton, C., Leavens, G.T.: Observers and Assistants: A Proposal for Modular Aspect-Oriented Reasoning. In: Foundations of Aspect Languages (April 2002)Google Scholar
- Clifton, C., Leavens, G.T., Chambers, C., Millstein, T.: MultiJava: Modular Open Classes and Symmetric Multiple Dispatch for Java. In: Object-Oriented Programming Systems, Languages, and Applications (October 2000)Google Scholar
- Dantas, D.S., Walker, D.: Aspects, Information Hiding and Modularity. Princeton University Technical Report TR-696-04 (2004)Google Scholar
- Filman, R.E., Friedman, D.P.: Aspect-Oriented Programming is Quantification and Obliviousness. In: Advanced Separation of Concerns (October 2000)Google Scholar
- Gudmundson, S., Kiczales, G.: Addressing Practical Software Development Issues in AspectJ with a Pointcut Interface. In: Advanced Separation of Concerns (July 2001)Google Scholar
- Koppen, C., Stoerzer, M.: PCDiff: Attacking the Fragile Pointcut Problem. In: European Interactive Workshop on Aspects in Software (September 2004)Google Scholar
- Krishnamurthi, S., Fisler, K., Greenberg, M.: Verifying Aspect Advice Modularly. In: Foundations of Software Engineering (November 2004)Google Scholar
- Lämmel, R.: A Semantical Approach to Method-Call Interception. In: Aspect-Oriented Software Development (April 2002)Google Scholar
- Milner, R.: Communicating and Mobile Systems: The ð-Calculus. Cambridge University Press, Cambridge (1999)Google Scholar
- Milner, R., Tofte, M., Harper, R., MacQueen, D.: The Definition of Standard ML (Revised). MIT Press, Cambridge (1997)Google Scholar
- Walker, D., Zdancewic, S., Ligatti, J.: A Theory of Aspects. In: International Conference on Functional Programming (2003)Google Scholar