The Community for Technology Leaders
2013 20th Working Conference on Reverse Engineering (WCRE) (2012)
Kingston, ON, Canada Canada
Oct. 15, 2012 to Oct. 18, 2012
ISSN: 1095-1350
ISBN: 978-1-4673-4536-1
pp: 19-28
Can we reuse some of the huge code-base developed in C to take advantage of modern programming language features such as type safety, object-orientation, and contracts? This paper presents a source-to-source translation of C code into Eiffel, a modern object-oriented programming language, and the supporting tool C2Eif. The translation is completely automatic and supports the entire C language (ANSI, as well as many GNU C Compiler extensions, through CIL) as used in practice, including its usage of native system libraries and inlined assembly code. Our experiments show that C2Eif can handle C applications and libraries of significant size (such as vim and libgsl), as well as challenging benchmarks such as the GCC torture tests. The produced Eiffel code is functionally equivalent to the original C code, and takes advantage of some of Eiffel's features to produce safe and easy-to-debug translations.
Libraries, Arrays, Runtime, Contracts, Standards, Memory management, Syntactics
Marco Trudel, Carlo A. Furia, Martin Nordio, Bertrand Meyer, Manuel Oriol, "C to O-O Translation: Beyond the Easy Stuff", 2013 20th Working Conference on Reverse Engineering (WCRE), vol. 00, no. , pp. 19-28, 2012, doi:10.1109/WCRE.2012.12
290 ms
(Ver 3.3 (11022016))