FOOD: An Intermediate Model for Automated Refactoring

As big software projects grow, there is an increasing need of cleaning up or restructuring the existing code. This problem can be addressed by using refactorings, which are small semantics-preserving code transformations. Many refactorings have been automated in existing development environments to help the developer in this process. Most implementations are currently based on the abstract syntax tree. Unfortunately, this model, which was first designed for the compilation process, does not provide all the abstractions that are required for complex refactorings such as extracting a method. In this paper, the FOOD model is introduced and described. Based entirely on graphs, this model is targeted to the implementation of complex code transformations by providing the necessary abstractions. The “extract method” refactoring is applied on the FOOD model as a concrete example. Then a comparison with existing models such as abstract syntax trees is made.

[1]  Scott Wallace,et al.  Fabrik: a visual programming environment , 1988, OOPSLA 1988.

[2]  Don Roberts,et al.  Practical analysis for refactoring , 1999 .

[3]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[4]  Wen Siang. Kuo Visual programming environment , 1993 .

[5]  Tom Mens,et al.  On the Use of Graph Transformations for Model Refactoring , 2005, GTTSE.

[6]  Joshua Kerievsky,et al.  Refactoring to Patterns , 2004, XP/Agile Universe.

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

[8]  R. Mark Meyer,et al.  Towards a better visual programming language: critiquing Prograph's control structures , 2000 .

[9]  Guang R. Gao,et al.  Advanced topics in dataflow computing and multithreading , 1994 .

[10]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[11]  William W. Wadge,et al.  Lucid, the dataflow programming language , 1985 .

[12]  Keshav Pingali,et al.  Efficient demand-driven evaluation. Part 1 , 1985, TOPL.

[13]  Keshav Pingali,et al.  Efficient Demand-Driven Evaluation. , 1983 .

[14]  João Saraiva,et al.  Generative and Transformational Techniques in Software Engineering II , 2007, Lecture Notes in Computer Science.

[15]  Ralf Lämmel,et al.  Generative and Transformational Techniques in Software Engineering, International Summer School, GTTSE 2005, Braga, Portugal, July 4-8, 2005. Revised Papers , 2006, GTTSE.

[16]  Oege de Moor,et al.  JunGL: a scripting language for refactoring , 2006, ICSE.