Skip to main content

Essential AOP: The A Calculus

  • Conference paper
ECOOP 2010 – Object-Oriented Programming (ECOOP 2010)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6183))

Included in the following conference series:

Abstract

Aspect-oriented programming (AOP) has produced interesting language designs, but also ad hoc semantics that needs clarification. We contribute to this clarification with a calculus that models essential AOP, both simpler and more general than existing formalizations. In AOP, advice may intercept method invocations, and proceed executes the suspended call. Proceed is an ad hoc mechanism, only usable inside advice bodies. Many pointcut mechanisms, e.g. wildcards, also lack regularity. We model proceed using first-class closures, and shift complexity from pointcuts to ordinary object-oriented code. Two well-known pointcut categories, call and execution, are commonly considered similar. We formally expose their differences, and resolve the associated soundness problem. Our calculus includes type ranges, an intuitive and concise alternative to explicit type variables that allows advice to be polymorphic over intercepted methods. We use calculus parameters to cover type safety for a wide design space of other features. Type soundness is verified in Coq.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., 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)

    Chapter  Google Scholar 

  2. 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, pp. 327–353. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  3. Brichau, J., et al.: Survey of aspect-oriented languages and execution models. Deliverable 12, Project IST-2-004349-NOE “AOSD-Europe” (May 2005)

    Google Scholar 

  4. De Fraine, B., Südholt, M., Jonckers, V.: StrongAspectJ: Flexible and safe pointcut/advice bindings. In: Mezini, M. (ed.) Proceedings AOSD 2008, pp. 60–71. ACM Press, New York (March 2008)

    Chapter  Google Scholar 

  5. Douence, R., Fradet, P., Südholt, M.: A framework for the detection and resolution of aspect interactions. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 173–188. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  6. Douence, R., Fradet, P., Südholt, M.: Composition, reuse and interaction analysis of stateful aspects. In: Lieberherr, K. (ed.) Proceedings AOSD 2004, pp. 141–150. ACM Press, New York (March 2004)

    Chapter  Google Scholar 

  7. Allan, C., Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: Adding trace matching with free variables to AspectJ. In: Johnson, R.E., Gabriel, R.P. (eds.) Proceedings OOPSLA 2005, pp. 345–364. ACM Press, New York (2005)

    Chapter  Google Scholar 

  8. Douence, R., Motelet, O., Südholt, M.: A formal definition of crosscuts. In: Yonezawa, A., Matsuoka, S. (eds.) REFLECTION 2001. LNCS, vol. 2192, pp. 170–186. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  9. Gybels, K., Brichau, J.: Arranging language features for pattern-based crosscuts. [27] 60–69

    Google Scholar 

  10. Walker, R.J., Viggers, K.: Implementing protocols via declarative event patterns. In: Proc. ACM SIGSOFT Int’ Symp. on Foundations of Software Engineering (FSE-12), pp. 159–169. ACM Press, New York (2004), also TR no. 2004-745-10, Uni. of Calgary, http://lsmr.cpsc.ucalgary.ca/papers/walker-fse-2004.pdf

    Google Scholar 

  11. Ostermann, K., Mezini, M., Bockisch, C.: Expressive pointcuts for increased modularity. [28] 214–240

    Google Scholar 

  12. Lämmel, R.: A semantical approach to method-call interception. In: Kiczales, G. (ed.) Proceedings AOSD 2002, pp. 41–55. ACM Press, New York (April 2002)

    Chapter  Google Scholar 

  13. Wand, M., Kiczales, G., Dutchyn, C.: A semantics for advice and dynamic join points in aspect-oriented programming. Trans. on Programming Languages and Systems (TOPLAS) 26(5), 890–910 (2004)

    Article  Google Scholar 

  14. Clifton, C., Leavens, G.T.: MiniMAO1: An imperative core language for studying aspect-oriented reasoning. Science of Computer Programming 63(3), 321–374 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  15. Jagadeesan, R., Jeffrey, A., Riely, J.: Typed parametric polymorphism for aspects. Science of Computer Programming 63(3), 267–296 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  16. Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. Transactions on Programming Languages and Systems (TOPLAS) 23(3), 396–450 (2001)

    Article  Google Scholar 

  17. Odersky, M., Sulzmann, M., Wehr, M.: Type inference with constrained types. Theory and Practice of Object Systems 5(1), 35–55 (1999)

    Article  Google Scholar 

  18. Torgersen, M., Hansen, C.P., Ernst, E., von der Ahé, P., Bracha, G., Gafter, N.M.: Adding wildcards to the Java programming language. In: Haddad, H., Omicini, A., Wainwright, R.L., Liebrock, L.M. (eds.) Proc. of the 2004 ACM Symposium on Applied Computing (SAC), pp. 1289–1296. ACM Press, New York (2004)

    Chapter  Google Scholar 

  19. Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development — Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science, vol. XXV. Springer, Heidelberg (2004)

    MATH  Google Scholar 

  20. Aydemir, B., Charguéraud, A., Pierce, B.C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: Proceedings POPL 2008, pp. 3–15. ACM Press, New York (2008)

    Chapter  Google Scholar 

  21. De Fraine, B.: Language Facilities for the Deployment of Reusable Aspects. PhD thesis, Vrije Universiteit Brussel (June 2009), http://soft.vub.ac.be/soft/_media/members/brunodefraine/phd.pdf

  22. Ligatti, J., Walker, D., Zdancewic, S.: A type-theoretic interpretation of pointcuts and advice. Science of Computer Programming 63(3), 240–266 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  23. Aldrich, J.: Open modules: Modular reasoning about advice [28] 144–168

    Google Scholar 

  24. Ernst, E., Lorenz, D.H.: Aspects and polymorphism in Aspect J. [27] 150–157

    Google Scholar 

  25. Lorenz, D.H., Lieberherr, K., Ovlinger, J.: Aspectual collaborations: Combining modules and aspects. The Computer Journal 46(5), 542–565 (2003)

    Article  MATH  Google Scholar 

  26. Mezini, M., Lieberherr, K.: Adaptive plug-and-play components for evolutionary software development. In: Proceedings OOPSLA 1998, pp. 97–116. ACM Press, New York (October 1998)

    Chapter  Google Scholar 

  27. Akşit, M. (ed.): Proc. 2nd Int’ Conf. on Aspect-Oriented Software Development (AOSD-2003). ACM Press, New York (March 2003)

    Google Scholar 

  28. Black, A.P. (ed.): ECOOP 2005. LNCS, vol. 3586. Springer, Heidelberg (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

De Fraine, B., Ernst, E., Südholt, M. (2010). Essential AOP: The A Calculus. In: D’Hondt, T. (eds) ECOOP 2010 – Object-Oriented Programming. ECOOP 2010. Lecture Notes in Computer Science, vol 6183. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14107-2_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-14107-2_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-14106-5

  • Online ISBN: 978-3-642-14107-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics