A key step in the evolution of a Java system towards the aspect oriented paradigm is the identification of crosscutting concerns that need to be refactored. This paper proposes an approach to identify concerns and the crosscutting among them in existing Java systems. A meta-model is defined to represent concerns as sets of Type Fragments (where a Type Fragment is a portion of a Type in terms of its members, properties and relationships). The approach exploits the concept of Role: each Role is associated to a concern and the system source code is analyzed to find the Type Fragments implementing it. All the Roles that contribute to implement a same semantic concern are grouped together by a clustering algorithm based on a combination of a structural and a lexical distance. Each cluster of Roles (and thus the Type Fragments associated to them) is assigned to a single more abstract concern. Crosscutting is detected looking for scattering and tangling of Type Fragments within the identified concerns. The structural information about the Type Fragments assigned to each concern and the crosscutting relationships among the concerns can be used to drive the refactoring towards aspects. The results from a case study where the approach has been applied to several software systems are presented and discussed.
A role-based crosscutting concerns mining approach to evolve Java systems towards AOP
MARIO LUCA BERNARDI;DI LUCCA G.
2009-01-01
Abstract
A key step in the evolution of a Java system towards the aspect oriented paradigm is the identification of crosscutting concerns that need to be refactored. This paper proposes an approach to identify concerns and the crosscutting among them in existing Java systems. A meta-model is defined to represent concerns as sets of Type Fragments (where a Type Fragment is a portion of a Type in terms of its members, properties and relationships). The approach exploits the concept of Role: each Role is associated to a concern and the system source code is analyzed to find the Type Fragments implementing it. All the Roles that contribute to implement a same semantic concern are grouped together by a clustering algorithm based on a combination of a structural and a lexical distance. Each cluster of Roles (and thus the Type Fragments associated to them) is assigned to a single more abstract concern. Crosscutting is detected looking for scattering and tangling of Type Fragments within the identified concerns. The structural information about the Type Fragments assigned to each concern and the crosscutting relationships among the concerns can be used to drive the refactoring towards aspects. The results from a case study where the approach has been applied to several software systems are presented and discussed.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.