Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Lientz, B.P., Swanson, E.B., Tompkins, G.E.: Characteristics of application software maintenance. Commun. ACM 21(6), 466–471 (1978)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley (1999)
Mens, T., Tourwé, T.: A Survey of Software Refactoring. IEEE Trans. Softw. Eng. 30(2), 126–139 (2004)
Opdyke, W.F.: Refactoring: A Program Restructuring Aid in Designing Object-Oriented Application Frameworks, U. Illinois at Urbana-Champaign (1992)
Moha, N.: DECOR: Détection et correction des défauts dans les systèmes orientés objet, p. 157. UdeM & USTdeLille, Montréal (2008)
Harman, M., Tratt, L.: Pareto optimal search based refactoring at the design level. In: Proceedings of the 9th Annual GECCO 2007, pp. 1106–1113. ACM, London (2007)
O’Keeffe, M.: Search-based refactoring: an empirical study. J. Softw. Maint. Evol. 20(5), 345–364 (2008)
O’Keeffe, M., Cinneide, M.O.: Search-based software maintenance. In: CSMR (2006)
Kessentini, M., Sahraoui, H.A., Boukadoum, M.: Model Transformation as an Optimization Problem. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 159–173. Springer, Heidelberg (2008)
El-Boussaidi, G., Mili, H.: Detecting Patterns of Poor Design Solutions Using Constraint Propagation. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 189–203. Springer, Heidelberg (2008)
Takagi, H.: Interactive evolutionary computation: fusion of the capabilities of EC optimization and human evaluation. Proceedings of the IEEE 89(9), 1275–1296 (2001)
Fenton, N.E., Pfleeger, A.S.L.: Software Metrics: A Rigorous and Practical Approach, 2nd edn., p. 656. PWS Pub., Boston (1998)
Genero, M., Piattini, M., Calero, C.: Empirical validation of class diagram metrics. In: Proceedings of the International Symposium on ESE (2002)
Pearl, J.: Heuristics: intelligent search strategies for computer problem solving, p. 382. Addison-Wesley Longman Publishing Co., Inc. (1984)
Mitchell, M.: An Introduction to Genetic Algorithms, p. 209. MIT Press (1998)
Goldberg, D.E.: Genetic Algorithms in Search, Optimization and Machine Learning, p. 372. Addison-Wesley Longman Publishing Co., Inc. (1989)
Koza, J.R.: Genetic programming: on the programming of computers by means of natural selection, p. 680. MIT Press (1992)
Dawkins, R.: The BlindWatchmaker, 1st edn., p. 358. Longman, Essex (1986)
Kim, H.S., Cho, S.B.: Application of interactive genetic algorithm to fashion design. In: Engineering Applications of Artificial Intelligence (2000)
Chen, Y.-P.: Interactive music composition with the CFE framework. SIGEVOlution 2(1), 9–16 (2007)
Bavota, G., Carnevale, F., De Lucia, A., Di Penta, M., Oliveto, R.: Putting the developer in-the-loop: an interactive GA for software re-modularization. In: Fraser, G., Teixeira de Souza, J. (eds.) SSBSE 2012. LNCS, vol. 7515, pp. 75–89. Springer, Heidelberg (2012)
Van Der Straeten, R., Jonckers, V., Mens, T.: A formal approach to model refactoring and model refinement. J. SoSyM 6(2), 139–162 (2007)
Van Kempen, M., et al.: Towards proving preservation of behaviour of refactoring of UML models. In: Proceedings of the annual SAICSIT 2005, pp. 252–259. White River, South Africa (2005)
Mens, T., Taentzer, G., Runge, O.: Analysing refactoring dependencies using graph transformation. J. SoSyM 6(3), 269–285 (2007)
Biermann, E.: EMF model transformation based on graph transformation: formal foundation and tool environment. In: Ehrig, H., Rensink, A., Rozenberg, G., Schürr, A. (eds.) ICGT 2010. LNCS, vol. 6372, pp. 381–383. Springer, Heidelberg (2010)
El Boussaidi, G., Mili, H.: Understanding design patterns — what is the problem? Software: Practice and Experience (2011)
Seng, O., Stammel, J., Burkhart, D.: Search-based determination of refactorings for improving the class structure of object-oriented systems. In: Proc. of the 8th Annual GECCO 2006, pp. 1909–1916. ACM, Seattle (2006)
Jensen, A.C., Cheng, B.H.C.: On the use of genetic programming for automated refactoring and the introduction of design patterns. In: Proc. of the 12th Annual GECCO 2010, pp. 1341–1348. ACM, Portland (2010)
Kessentini, M., et al.: Search-based model transformation by example. J. SoSyM 11(2), 209–226 (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ghannem, A., El Boussaidi, G., Kessentini, M. (2013). Model Refactoring Using Interactive Genetic Algorithm. In: Ruhe, G., Zhang, Y. (eds) Search Based Software Engineering. SSBSE 2013. Lecture Notes in Computer Science, vol 8084. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39742-4_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-39742-4_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39741-7
Online ISBN: 978-3-642-39742-4
eBook Packages: Computer ScienceComputer Science (R0)