Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Achee, B.L., Carver, D.L.: Creating object-oriented designs from legacy FORTRAN code. JSS 39(2), 179–194 (1997)
Chikofsky, E.J., Cross II, J.H.: Reverse engineering and design recovery: A taxonomy. IEEE Software 7(1), 13–17 (1990)
Ó Cinnéide, M., Tratt, L., Harman, M., Counsell, S., Moghadam, I.H.: Experimental assessment of software metrics using automated refactoring. In: ESEM, pp. 49–58. ACM (2012)
Ellison, C., Rosu, G.: An executable formal semantics of C with applications. In: POPL, pp. 533–544 (2012)
Ernst, M.D., Cockrell, J., Griswold, W.G., Notkin, D.: Dynamically discovering likely program invariants to support program evolution. IEEE TSE 27(2), 99–123 (2001)
Fanta, R., Rajlich, V.: Reengineering object-oriented code. In: Proceedings of the International Conference on Software Maintenance, pp. 238–246 (1998)
Fowler, M.: Refactoring: Improving the design of existing code. Addison-Wesley (1999)
Frakes, W.B., Kulczycki, G., Moodliar, N.: An empirical comparison of methods for reengineering procedural software systems to object-oriented systems. In: Mei, H. (ed.) ICSR 2008. LNCS, vol. 5030, pp. 376–389. Springer, Heidelberg (2008)
Gall, H., Klosch, R.: Finding objects in procedural programs: an alternative approach. In: WCRE, pp. 208–216. IEEE (1995)
Jacobson, I., Lindström, F.: Reengineering of old systems to an object-oriented architecture. In: OOPSLA, pp. 340–350. ACM (1991)
Kontogiannis, K., Patil, P.: Evidence driven object identification in procedural code. In: STEP, pp. 12–21. IEEE (1999)
Kovács, L., Voronkov, A.: Finding loop invariants for programs over arrays using a theorem prover. In: Chechik, M., Wirsing, M. (eds.) FASE 2009. LNCS, vol. 5503, pp. 470–485. Springer, Heidelberg (2009)
Livadas, P.E., Johnson, T.: A new approach to finding objects in programs. Journal of Software Maintenance 6(5), 249–260 (1994)
Martin, J., Müller, H.A.: Strategies for migration from C to Java. In: CSMR, pp. 200–210. IEEE Computer Society (2001)
Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall (1997)
Millham, R.: An investigation: reengineering sequential procedure-driven software into object-oriented event-driven software through UML diagrams. In: COMPSAC, 2002, pp. 731–733 (2002)
Mossienko, M.: Automated Cobol to Java recycling. In: CSMR, pp. 40–50. IEEE (2003)
Nadera, B.S., Chitraprasad, D., Chandra, V.S.S.: The varying faces of a program transformation systems. ACM Inroads 3(1), 49–55 (2012)
Necula, G.C., McPeak, S., Rahul, S.P., Weimer, W.: CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs. In: Nigel Horspool, R. (ed.) CC 2002. LNCS, vol. 2304, pp. 213–228. Springer, Heidelberg (2002)
Newcomb, P., Kotik, G.: Reengineering procedural into object-oriented systems. In: WCRE, pp. 237–249. IEEE (1995)
Novosoft. C2J: a C to Java translator (2001), http://www.novosoft-us.com/solutions/product_c2j.shtml
Sneed, H.: Planning the reengineering of legacy systems. IEEE Software 12(1), 24–34 (1995)
Sneed, H.: Migrating from COBOL to Java. In: ICSM, pp. 1–7. IEEE (2010)
Sneed, H.: Migrating PL/I code to Java. In: CSMR, pp. 287–296. IEEE (2011)
Tangible Software Solutions. C++ to C# and C++ to Java, http://www.tangiblesoftwaresolutions.com/
Tilevich, E.: Translating C++ to Java. In: German Java Developers’ Conference Journal. Sun Microsystems Press (1997)
Trudel, M., Furia, C.A., Nordio, M., Meyer, B., Oriol, M.: C to O-O translation: Beyond the easy stuff. In: Proceedings of WCRE, pp. 19–28. IEEE (2012)
Wei, Y., Furia, C.A., Kazmin, N., Meyer, B.: Inferring better contracts. In: ICSE, pp. 191–200. ACM (2011)
Yeh, A., Harris, D., Reubenstein, H.: Recovering abstract data types and object instances from a conventional procedural language. In: WCRE, pp. 227–236 (1995)
Zhong, H., Thummalapenta, S., Xie, T., Zhang, L., Wang, Q.: Mining API mapping for language migration. In: ICSE, pp. 195–204 (2010)
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
Trudel, M., Furia, C.A., Nordio, M., Meyer, B. (2013). Really Automatic Scalable Object-Oriented Reengineering. In: Castagna, G. (eds) ECOOP 2013 – Object-Oriented Programming. ECOOP 2013. Lecture Notes in Computer Science, vol 7920. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39038-8_20
Download citation
DOI: https://doi.org/10.1007/978-3-642-39038-8_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39037-1
Online ISBN: 978-3-642-39038-8
eBook Packages: Computer ScienceComputer Science (R0)