C to O-O Translation: Beyond the Easy Stuff
Marco Trudel, Carlo A. Furia, Martin Nordio, Bertrand Meyer, Manuel, Oriol

TL;DR
This paper introduces C2Eif, an automatic source-to-source translator that converts C code into Eiffel, enabling modern features like type safety and object-orientation while maintaining functional equivalence.
Contribution
It presents a comprehensive, fully automatic translation tool supporting full C language features, including extensions and inline assembly, to produce safe, object-oriented Eiffel code.
Findings
Successfully translated large C applications like vim and libgsl
Handled complex benchmarks such as GCC torture tests
Produced functionally equivalent Eiffel code with enhanced safety
Abstract
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 object-oriented features to produce safe and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
