UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Role-based refactoring of crosscutting concerns Hannemann, Jan


Improving the structure of code can help developers work with a software system more efficiently and more consistently. Aspect-oriented programming (AOP) offers additional ways to structure software by providing explicit means to modularize crosscutting concerns (CCCs) in modularity units called aspects. With the advent of AOP, a new kind of structural improvement of software needs to be considered: the refactoring of non-modularized CCCs into aspects. Refactorings have shown to be helpful for object-oriented software development and maintenance, but their application to aspect-oriented software is not yet well understood. In particular, since refactorings of non-modularized crosscutting concerns involve multiple program elements with potentially complicated relationships, they are considerably more complex than traditional refactorings; the lack of tool support to help plan, reason about and execute CCC refactorings impedes the improvement of code modularity. The thesis of this research is that the refactoring of crosscutting concerns can be supported by a role-based concern model. In this model, crosscutting concerns are described in terms of abstract roles, and instructions for refactoring the concerns are written in terms of those roles. To apply a refactoring, a developer maps a subset of the roles to concrete program elements; a tool can then help complete the mapping of roles to the existing program. Refactoring instructions are then applied to manipulate and modularize the concrete elements corresponding to the crosscutting concern. The abstract nature of such a role-based concern model allows the definition of a refactoring description separately from concrete systems it may be applied to, and allows using a single description to refactor multiple instances of the same concern. To aid developers in restructuring the implementation of crosscutting concerns using aspect-oriented programming, we introduce in this dissertation a refactoring approach and proof-of-concept tool founded on our role-based concern model. We show that abstract descriptions of crosscutting concerns can be applied to previously existing software and we describe the potential for expressing and executing a variety of new CCC refactorings.

Item Media

Item Citations and Data


For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use.