Open Modules: Modular Reasoning About Advice

  • Jonathan Aldrich
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3586)


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.

Unable to display preview. Download preview PDF.


  1. Aldrich, J.: Open Modules: Modular Reasoning about Advice. Carnegie Mellon Technical Report CMU-ISRI-04-141 (Dececember 2004), available at,
  2. 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
  3. Bracha, G.: The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. Ph.D. Thesis, Dept. of Computer Science, University of Utah (1992)Google Scholar
  4. 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
  5. Clifton, C., Leavens, G.T.: Observers and Assistants: A Proposal for Modular Aspect-Oriented Reasoning. In: Foundations of Aspect Languages (April 2002)Google Scholar
  6. 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
  7. Dantas, D.S., Walker, D.: Aspects, Information Hiding and Modularity. Princeton University Technical Report TR-696-04 (2004)Google Scholar
  8. Filman, R.E., Friedman, D.P.: Aspect-Oriented Programming is Quantification and Obliviousness. In: Advanced Separation of Concerns (October 2000)Google Scholar
  9. Gudmundson, S., Kiczales, G.: Addressing Practical Software Development Issues in AspectJ with a Pointcut Interface. In: Advanced Separation of Concerns (July 2001)Google Scholar
  10. Jagadeesan, R., Jeffrey, A., Riely, J.: An Untyped Calculus of Aspect-Oriented Programs. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  11. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An Overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, p. 327. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  12. Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.-M., Irwin, J.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  13. Koppen, C., Stoerzer, M.: PCDiff: Attacking the Fragile Pointcut Problem. In: European Interactive Workshop on Aspects in Software (September 2004)Google Scholar
  14. Krishnamurthi, S., Fisler, K., Greenberg, M.: Verifying Aspect Advice Modularly. In: Foundations of Software Engineering (November 2004)Google Scholar
  15. Lämmel, R.: A Semantical Approach to Method-Call Interception. In: Aspect-Oriented Software Development (April 2002)Google Scholar
  16. Lieberherr, K., Lorenz, D.H., Ovlinger, J.: Aspectual Collaborations: Combining Modules and Aspects. The Computer Journal 46(5), 542–565 (2003)MATHCrossRefGoogle Scholar
  17. Milner, R.: Communicating and Mobile Systems: The ð-Calculus. Cambridge University Press, Cambridge (1999)Google Scholar
  18. Milner, R., Tofte, M., Harper, R., MacQueen, D.: The Definition of Standard ML (Revised). MIT Press, Cambridge (1997)Google Scholar
  19. Walker, D., Zdancewic, S., Ligatti, J.: A Theory of Aspects. In: International Conference on Functional Programming (2003)Google Scholar
  20. Wand, M., Kiczales, G., Dutchyn, C.: A Semantics for Advice and Dynamic Join Points in Aspect-Oriented Programming. Transactions on Programming Languages and Systems 26(5), 890–910 (2004)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Jonathan Aldrich
    • 1
  1. 1.Carnegie Mellon UniversityPittsburghUSA

Personalised recommendations