Evolving transformation sequences using genetic algorithms

Program transformation is useful in a number of applications including program comprehension, reverse engineering and compiler optimization. In all these applications, transformation algorithms are constructed by hand for each different transformation goal. Loosely speaking, a transformation algorithm defines a sequence of transformation steps to apply to a given program. It is notoriously hard to find good transformation sequences automatically, and so much (costly) human intervention is required. This work shows how search-based meta-heuristic algorithms can be used to automate, or partly automate the problem of finding good transformation sequences. In this case, the goal of transformation is to reduce program size, but the approach is sufficiently general that it can be used to optimize any source-code level metric. The search techniques used are random search (RS), hill climbing (HC) and genetic algorithms (GA). The paper reports the result of initial experiments on small synthetic program transformation problems. The results are encouraging. They indicate that the genetic algorithm performs significantly better than either hill climbing or random search.

[1]  Mark Harman,et al.  Search Based Transformations , 2003, GECCO.

[2]  Keith D. Cooper,et al.  Optimizing for reduced code space using genetic algorithms , 1999, LCTES '99.

[3]  Ying Zou,et al.  Migration to object oriented platforms: a state transformation approach , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[4]  Aniello Cimitile,et al.  Conditioned program slicing , 1998, Inf. Softw. Technol..

[5]  Conor Ryan,et al.  Automatic Re-engineering of Software Using Genetic Programming , 1999, Genetic Programming Series.

[6]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[7]  Keith H. Bennett,et al.  Do program transformations help reverse engineering? , 1998, Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272).

[8]  Keith D. Cooper,et al.  Adaptive Optimizing Compilers for the 21st Century , 2002, The Journal of Supercomputing.

[9]  Martin P. Ward Reverse Engineering through Formal Transformation: Knuths 'Polynomial Addition' Algorithm , 1994, Comput. J..

[10]  Martin S. Feather,et al.  A System for Assisting Program Transformation , 1982, TOPL.

[11]  Mark Harman,et al.  VADA: a transformation-based system for variable dependence analysis , 2002, Proceedings. Second IEEE International Workshop on Source Code Analysis and Manipulation.

[12]  Mark Harman,et al.  A post-placement side-effect removal algorithm , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[13]  Andy Nisbet,et al.  GAPS: A Compiler Framework for Genetic Algorithm (GA) Optimised Parallelisation , 1998, HPCN Europe.

[14]  Mark Harman,et al.  Improving Evolutionary Testing By Flag Removal , 2002, GECCO.

[15]  Martin P. Ward Assembler to C migration using the FermaT transformation system , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[16]  John Darlington,et al.  A Transformation System for Developing Recursive Programs , 1977, J. ACM.

[17]  Mark Harman,et al.  Evolutionary testing supported by slicing and transformation , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[18]  Eelco Visser,et al.  Building program optimizers with rewriting strategies , 1998, ICFP '98.