An integrated crosscutting concern migration strategy and its semi-automated application to JHotDraw
- 515 Downloads
In this paper we propose a systematic strategy for migrating crosscutting concerns in existing object-oriented systems to aspect-oriented programming solutions. The proposed strategy consists of four steps: mining, exploration, documentation and refactoring of crosscutting concerns. We discuss in detail a new approach to refactoring to aspect-oriented programming that is fully integrated with our strategy, and apply the whole strategy to an object-oriented system, namely the JHotDraw framework.
Moreover, we present a method to semi-automatically perform the aspect-introducing refactorings based on identified crosscutting concern sorts which is supported by a prototype tool called sair. We perform an exploratory case study in which we apply this tool on the same object-oriented system and compare its results with the results of manual migration in order to assess the feasibility of automated aspect refactoring. Both the refactoring tool sair and the results of the manual migration are made available as open-source, the latter providing the largest aspect-introducing refactoring available to date.
We report on our experiences with conducting both case studies and reflect on the success and challenges of the migration process.
KeywordsProgram analysis Code refactoring Cross cutting concerns Concern modeling Aspect-oriented programming Reverse engineering Software engineering
- Bruntink, M., van Deursen, A., Tourwé, T.: Isolating idiomatic crosscutting concerns. In: Proceedings of the International Conference on Software Maintenance (ICSM’05), pp. 37–46. IEEE Computer Society, New York (2005) Google Scholar
- Filman, R.E., Elrad, T., Clarke, S., Akşit, M. (eds.): Aspect-Oriented Software Development. Addison-Wesley, Reading (2005) Google Scholar
- Hajiyev, E., Verbaere, M., de Moor, O. (eds.): Codequest: Scalable source code queries with datalog. In: Proceedings of the 20th European Conference on Object-Oriented Programming (ECOOP), pp. 2–27 (2006) Google Scholar
- Hanenberg, S., Oberschulte, C., Unland, R.: Refactoring of aspect-oriented software. In: Proceedings of the 4th Annual International Conference on Object-Oriented and Internet-based Technologies, Concepts, and Applications for a Networked World(Net.ObjectDays), pp. 19–35. Springer, New York (2003) Google Scholar
- Laddad, R.: AspectJ in Action—Practical Aspect Oriented Programming. Manning Publications Co. (2003) Google Scholar
- Lesiecki, N.: Aop@work: Enhance design patterns with AspectJ. www-128.ibm.com/developerworks (May 2005)
- Marin, M.: An integrated system to manage crosscutting concerns in source code. PhD thesis, Faculty of Electrical Engineering, Mathematics, and Computer Science, Delft University of Technology (January 2008) Google Scholar
- Marin, M., Moonen, L., van Deursen, A.: A common framework for aspect mining based on crosscutting concern sorts. In: Proceedings of the 13th Working Conference on Reverse Engineering (WCRE), pp. 29–38. IEEE Computer Society, New York (2006) Google Scholar
- Marin, M., Moonen, L., van Deursen, A.: An integrated crosscutting concern migration strategy and its application to JHotDraw. In: Korel, B., Godfrey, M.W. (eds.) Proceedings of the 7th International Working Conference on Source Code Analysis and Manipulation (SCAM), pp. 101–110. IEEE Computer Society, New York (2007c) CrossRefGoogle Scholar
- Marin, M., Moonen, L., van Deursen, A.: SoQueT: Query-based documentation of crosscutting concerns. In: Proceedings of the 29th International Conference on Software Engineering (ICSE). IEEE Computer Society, New York (2007d) Google Scholar
- Mens, K., Poll, B., González, S.: Using intentional source-code views to aid software maintenance. In: Proceedings of the 19th International Conference on Software Maintenance (ICSM), pp. 169–178. IEEE Computer Society, Washington (2003) Google Scholar
- Robillard, M.P., Murphy, G.C.: Concern graphs: finding and describing concerns using structural program dependencies. In: Proceedings of the 24th International Conference on Software Engineering (ICSE), pp. 406–416. ACM Press, New York (2002) Google Scholar
- Tarr, P., Harrison, W., Ossher, H.: Pervasive query support in the concern manipulation environment. Technical Report RC23343, IBM TJ Watson Research Center, Yorktown Heights, NY (2004) Google Scholar
- van der Rijst, R.: Sort-based refactoring of crosscutting concerns to aspects. Master’s thesis, Faculty of Electrical Engineering, Mathematics, and Computer Science, Delft University of Technology (2008) Google Scholar
- van Deursen, A., Marin, M., Moonen, L.: Aspect mining and refactoring. In: Thavildari, L., Kontogiannis, K. (eds.) Proc. WCRE Workshop on REFactoring: Achievements, Challenges, Effects, Waterloo, Canada, 2003. University of Waterloo Google Scholar