Really Automatic Scalable Object-Oriented Reengineering

Even when implemented in a purely procedural programming language, properly designed programs possess elements of good design that are expressible through object-oriented constructs and concepts. For example, placing structured types and the procedures operating on them together in the same module achieves a weak form of encapsulation that reduces inter-module coupling. This paper presents a novel technique, and a supporting tool AutoOO, that extracts such implicit design elements from C applications and uses them to build reengineered object-oriented programs. The technique is completely automatic: users only provide a source C program, and the tool produces an object-oriented application written in Eiffel with the same input/output behavior as the source. An extensive evaluation on 10 open-source programs (including the editor vim and the math library libgsl) demonstrates that our technique works on applications of significant size and builds reengineered programs exhibiting elements of good object-oriented design, such as low coupling and high cohesion of classes, and proper encapsulation. The reengineered programs also leverage advanced features such as inheritance, contracts, and exceptions to achieve a better usability and a clearer design. The tool AutoOO is freely available for download.

[1]  Bertrand Meyer,et al.  Inferring better contracts , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[2]  Mark Harman,et al.  Experimental assessment of software metrics using automated refactoring , 2012, Proceedings of the 2012 ACM-IEEE International Symposium on Empirical Software Engineering and Measurement.

[3]  Bertrand Meyer,et al.  Object-Oriented Software Construction, 2nd Edition , 1997 .

[4]  Harry M. Sneed,et al.  Planning the Reengineering of Legacy Systems , 1995, IEEE Softw..

[5]  Gregory Kulczycki,et al.  An Empirical Comparison of Methods for Reengineering Procedural Software Systems to Object-Oriented Systems , 2008, ICSR.

[6]  D. Chitraprasad,et al.  The varying faces of a program transformation systems , 2012, INROADS.

[7]  Perdita Stevens,et al.  Modelling Recursive Calls with UML State Diagrams , 2003, FASE.

[8]  H.A. Muller,et al.  Strategies for migration from C to Java , 2001, Proceedings Fifth European Conference on Software Maintenance and Reengineering.

[9]  D. R. Harris,et al.  Recovering abstract data types and object instances from a conventional procedural language , 1995, Proceedings of 2nd Working Conference on Reverse Engineering.

[10]  Andrei Voronkov,et al.  Finding Loop Invariants for Programs over Arrays Using a Theorem Prover , 2009, FASE.

[11]  K. Kontogiannis,et al.  Evidence driven object identification in procedural code , 1999, STEP '99. Proceedings Ninth International Workshop Software Technology and Engineering Practice.

[12]  Bertrand Meyer,et al.  C to O-O Translation: Beyond the Easy Stuff , 2012, 2012 19th Working Conference on Reverse Engineering.

[13]  Chucky Ellison,et al.  An executable formal semantics of C with applications , 2011, POPL '12.

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

[15]  Richard Millham An investigation: reengineering sequential procedure-driven software into object-oriented event-driven software through UML diagrams , 2002, Proceedings 26th Annual International Computer Software and Applications.

[16]  Theodore Johnson,et al.  A new approach to finding objects in programs , 1994, J. Softw. Maintenance Res. Pract..

[17]  Qing Wang,et al.  Mining API mapping for language migration , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[18]  Harald C. Gall,et al.  Finding objects in procedural programs: an alternative approach , 1995, Proceedings of 2nd Working Conference on Reverse Engineering.

[19]  William G. Griswold,et al.  Dynamically discovering likely program invariants to support program evolution , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[20]  Václav Rajlich,et al.  Reengineering object-oriented code , 1998, Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272).

[21]  Doris L. Carver,et al.  Creating object-oriented designs from legacy FORTRAN code , 1997, J. Syst. Softw..

[22]  Hong Mei,et al.  High Confidence Software Reuse in Large Systems, 10th International Conference on Software Reuse, ICSR 2008, Beijing, China, May 25-29, 2008, Proceedings , 2008, ICSR.

[23]  James H. Cross,et al.  Reverse engineering and design recovery: a taxonomy , 1990, IEEE Software.

[24]  Maxim Mossienko Automated Cobol to Java recycling , 2003, Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings..

[25]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

[26]  Ivar Jacobson,et al.  Re-engineering of Old Systems to an Object-Oriented Database , 1991, Conference on Object-Oriented Programming Systems, Languages, and Applications.

[27]  Gordon Kotik,et al.  Reengineering procedural into object-oriented systems , 1995, Proceedings of 2nd Working Conference on Reverse Engineering.

[28]  Harry M. Sneed,et al.  Migrating from COBOL to Java , 2010, 2010 IEEE International Conference on Software Maintenance.

[29]  Harry M. Sneed Migrating PL/I Code to Java , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.