Abstract
The manifestation of miscellaneous aspect-oriented extensions raises the question of how these extensions can be used together to combine their aspectual capabilities or reuse aspect code across extensions. While white-box composition of aspect mechanisms can produce an optimal compound mechanism, as exemplified by the merger of AspectJ and AspectWerkz into AspectJ 5, it comes with a high integration cost. Meanwhile, generic black-box composition can compose arbitrary aspect mechanisms, but may result in a compound mechanism that is suboptimal in comparison to white-box composition. For a particular family of aspect extensions, e.g.,AspectJ-like mechanisms, glass-box composition offers the best of two worlds. Glass-box may rely on the internal structure of, e.g., a pointcut-and-advice mechanism, without requiring a change to the code of the individual mechanisms. In this paper we compare white-, black-, and glass-box composition of aspect mechanisms. We explain subtle composition issues using an example drawn from the domain of secure and dependable computing, deploying a fault-tolerance aspect written in AspectWerkz together with an access-control aspect written in AspectJ. To compare the three composition methods, we integrate a TinyAJ extension with a TinyAW extension, and compare the results of running the aspects in a black-box framework and in a glass-box framework to the result of running these aspects in AspectJ 5.
This work is supported in part by NSF’s Science of Design program under Grants Number CCF-0438971 and CCF-0609612.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Kersten, M.: AOP@Work: AOP tools comparison, part 1, developerWorks (2005), http://www.ibm.com/developerworks/java/library/j-aopwork1/
Kersten, M.: AOP@Work: AOP tools comparison, part 2, developerWorks (2005), http://www.ibm.com/developerworks/java/library/j-aopwork2/
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)
Masuhara, H., Kiczales, G.: Modeling crosscutting in aspect-oriented mechanisms. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 2–28. Springer, Heidelberg (2003)
Colyer, A.: AOP@Work: Introducing AspectJ 5. developerWorks (2005), http://www.ibm.com/developerworks/java/library/j-aopwork8/
Bonér, J.: What are the key issues for commercial AOP use: how does AspectWerkz address them? In: Lieberherr, K. (ed.) Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, AOSD 2004, Mancaster, UK, pp. 5–6. ACM Press, New York (2004)
Colyer, A.: Joining interface21. The Aspect Blog (2005), http://www.aspectprogrammer.org/blogs/adrian/2005/09/joining_interfa.html
Colyer, A.: The new holy trinity. The Aspect Blog (2005), http://www.aspectprogrammer.org/blogs/adrian/2005/03/the_new_holy_tr.html
Kojarski, S., Lorenz, D.H.: Pluggable AOP: Designing aspect mechanisms for third-party composition. In: Johnson, R., Gabriel, R.P. (eds.) Proceedings of the 20th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA 2005, San Diego, CA, USA, pp. 247–263. ACM Press, New York (2005)
Courbis, C., Finkelstein, A.: Towards aspect weaving applications. In: Proceedings of the 27th International Conference on Software Engineering, ICSE 2005, St. Louis, Missouri, USA. ACM Press, New York (2005)
Czarnecki, K., Eisenecker, U.: Generative Programming: Methods, Tools, and Applications, 1st edn. Addison-Wesley, Reading (2000)
Hugunin, J.: The next steps for aspect-oriented programming languages (in Java). In: NSF Workshop on New Visions for Software Design & Productivity: Research & Applications, Vanderbilt University, Nashville, TN, National Coordination Office for Information Technology Research and Development (NCO/IT R&D), White Paper (2001)
Lopes, C.V., Dourish, P., Lorenz, D.H., Lieberherr, K.: Beyond AOP: Toward Naturalistic Programming. ACM SIGPLAN Notices 38(12), 34–43 (2003); OOPSLA 2003 Special Track on Onward! Seeking New Paradigms & New Thinking
Wand, M.: Understanding aspects (extended abstract). In: Proceedings of the 7th ACM SIGPLAN International Conference on Functional Programming, Uppsala, Sweden. ACM Press, New York (2003) (invited talk)
Szyperski, C.: Component Software, Beyond Object-Oriented Programming, 2nd edn. Addison-Wesley, Reading (2002) (with Gruntz, D., Murer, S.)
Lopes, C.V.: D: A Language Framework for Distributed Programming. Ph.D thesis, Northeastern University (1997)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. In: Professional Computing. Addison-Wesley, Reading (1995)
Shaw, M., Garlan, D.: Software Architecture, Perspectives on an Emerging Discipline. Prentice-Hall, Englewood Cliffs (1996)
Kojarski, S., Lorenz, D.: Modeling aspect mechanisms: A top-down approach. In: Proceedings of the 28th International Conference on Software Engineering, ICSE 2006, Shanghai, China (2006)
Lorenz, D.H., Kojarski, S.: Parallel composition of aspect mechanisms: Design and evaluation. In: Brichau, J., Chiba, S., Volder, K.D., Haupt, M., Hirschfeld, R., Lorenz, D.H., Masuhara, H., Tanter, E. (eds.) AOSD 2006 Workshop on Open and Dynamic Aspect Languages (ODAL), Bonn, Germany (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kojarski, S., Lorenz, D.H. (2006). Comparing White-Box, Black-Box, and Glass-Box Composition of Aspect Mechanisms. In: Morisio, M. (eds) Reuse of Off-the-Shelf Components. ICSR 2006. Lecture Notes in Computer Science, vol 4039. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11763864_18
Download citation
DOI: https://doi.org/10.1007/11763864_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-34606-7
Online ISBN: 978-3-540-34607-4
eBook Packages: Computer ScienceComputer Science (R0)