Making aspect-oriented refactoring safer

Gustavo SoaresDiego CavalcantiRohit Gheyi

Developers may refactor part of the ob ject-oriented (OO) code into aspects in order to improve modularity. However, since most refactoring tools have a limited or no support for aspect-oriented (AO) constructs, developers have to apply manual steps. Even the aspect-aware refactorings contain bugs. Developers need a better support for making AO refactorings safer. In this paper, we propose a tool for evaluating whether AspectJ transformations preserve behavior. We evaluate it in 8 non-behavior-preserving transformations applied by Eclipse. Our tool detected all of them. Additionally, we compared the OO version and its refactored AO version of two real case studies. Our tool found a non-behavior-preserving transformation. We also analyzed 23 design patterns implemented in Java and AspectJ. Our tool identified that the AO and OO versions of the State pattern are not equivalent. Finally we evaluated two JML compilers that generate AO code. Our tool identified a bug in one of them.

Caso o link acima esteja inválido, faça uma busca pelo texto completo na Web: Buscar na Web

Biblioteca Digital Brasileira de Computação - Contato:
     Mantida por: