Refactoring in Automatically Generated Programs
Fernando E. B. Otero, Colin G. Johnson, Alex Alves Freitas, Simon Thompson · Kent Academic Repository (University of Kent) · 2010
Refactoring aims at improving the design of ex- isting code by introducing structural modifications without changing its behaviour. It is used to adjust a system’s design in order to facilitate its maintenance and extendability. Since deciding which refactoring to apply and where it should be applied is not a straightforward decision, search-based approaches to automating the task of software refactoring have been proposed recently. So far, these approaches have been applied only to human-written code. Despite many years of computer programming experience, certain problems are very difficult for programmers to solve. To address this, researches have developed methods where computers automatically create program code from a description of the problem to be solved. One of the most popular forms of automated program creation is called Genetic Programming (GP). The aim of this work is to make GP more effective by introducing an automated refactoring step, based on the refactoring work in the software engineering community. We believe that the refactoring step will enhance the ability of GP to produce code that solves more complex problems, as well as result in evolved code that is both simpler and more idiomatically structured than that produced by traditional GP methods.