Model Refactoring Using Interactive Genetic Algorithm

Refactoring aims at improving the quality of design while preserving its semantic. Providing an automatic support for refactoring is a challenging problem. This problem can be considered as an optimization problem where the goal is to find appropriate refactoring suggestions using a set of refactoring examples. However, some of the refactorings proposed using this approach do not necessarily make sense depending on the context and the semantic of the system under analysis. This paper proposes an approach that tackles this problem by adapting the Interactive Genetic Algorithm IGA which enables to interact with users and integrate their feedbacks into a classic GA. The proposed algorithm uses a fitness function that combines the structural similarity between the analyzed design model and models from a base of examples, and the designers' ratings of the refactorings proposed during execution of the classic GA. Experimentation with the approach yielded interesting and promising results.

[1]  Mario Piattini,et al.  Empirical validation of class diagram metrics , 2002, Proceedings International Symposium on Empirical Software Engineering.

[2]  Tom Mens,et al.  A survey of software refactoring , 2004, IEEE Transactions on Software Engineering.

[3]  Tom Mens,et al.  A formal approach to model refactoring and model refinement , 2007, Software & Systems Modeling.

[4]  H. Sahraoui,et al.  Model Transformation as an Optimization Problem , 2008, MoDELS.

[5]  Mark Kent O'Keeffe,et al.  Search-based software maintenance , 2006, Conference on Software Maintenance and Reengineering (CSMR'06).

[6]  D. E. Goldberg,et al.  Genetic Algorithms in Search , 1989 .

[7]  Goldberg,et al.  Genetic algorithms , 1993, Robust Control Systems with Genetic Algorithms.

[8]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[9]  Mark Harman,et al.  Search-based software engineering , 2001, Inf. Softw. Technol..

[10]  Hafedh Mili,et al.  Understanding design patterns — what is the problem? , 2012, Softw. Pract. Exp..

[11]  Judea Pearl,et al.  Heuristics : intelligent search strategies for computer problem solving , 1984 .

[12]  Houari A. Sahraoui,et al.  Search-based model transformation by example , 2010, Software & Systems Modeling.

[13]  Betty H. C. Cheng,et al.  On the use of genetic programming for automated refactoring and the introduction of design patterns , 2010, GECCO '10.

[14]  Sung-Bae Cho,et al.  Application of interactive genetic algorithm to fashion design , 2000 .

[15]  Kevin Lano,et al.  Slicing of UML models using model transformations , 2010, MODELS'10.

[16]  Hafedh Mili,et al.  Detecting Patterns of Poor Design Solutions Using Constraint Propagation , 2008, MoDELS.

[17]  Tom Mens,et al.  Analysing refactoring dependencies using graph transformation , 2007, Software & Systems Modeling.

[18]  Enrico Biermann,et al.  EMF Model Transformation Based on Graph Transformation: Formal Foundation and Tool Environment , 2010, ICGT.

[19]  Derrick G. Kourie,et al.  Towards proving preservation of behaviour of refactoring of UML models , 2005 .

[20]  Johannes Stammel,et al.  Search-based determination of refactorings for improving the class structure of object-oriented systems , 2006, GECCO.

[21]  Shari Lawrence Pfleeger,et al.  Software Metrics : A Rigorous and Practical Approach , 1998 .

[22]  David E. Goldberg,et al.  Genetic Algorithms in Search Optimization and Machine Learning , 1988 .

[23]  Mark Harman,et al.  Pareto optimal search based refactoring at the design level , 2007, GECCO '07.

[24]  Gabriele Bavota,et al.  Putting the Developer in-the-Loop: An Interactive GA for Software Re-modularization , 2012, SSBSE.

[25]  Shari Lawrence Pfleeger,et al.  Software metrics (2nd ed.): a rigorous and practical approach , 1997 .

[26]  Ying-ping Chen,et al.  Interactive music composition with the CFE framework , 2007, SEVO.

[27]  Melanie Mitchell,et al.  An introduction to genetic algorithms , 1996 .

[28]  John R. Koza,et al.  Genetic programming - on the programming of computers by means of natural selection , 1993, Complex adaptive systems.

[29]  Naouel Moha,et al.  DECOR : Détection et correction des défauts dans les systèmes orientés objet. (DECOR : Detection and Correction of Smells in Object-oriented Systems) , 2008 .

[30]  Hideyuki Takagi,et al.  Interactive evolutionary computation: fusion of the capabilities of EC optimization and human evaluation , 2001, Proc. IEEE.

[31]  E. Burton Swanson,et al.  Characteristics of application software maintenance , 1978, CACM.

[32]  Mel Ó Cinnéide,et al.  Search-based refactoring: an empirical study , 2008 .