CDT helping C developers; a new/unusual approach [message #1457722] |
Fri, 31 October 2014 16:30 |
Marco Trudel Messages: 5 Registered: July 2009 |
Junior Member |
|
|
Discussing on the CDT developers list how we built an automatic C to Java translator based on CDT [1], I thought that the topic of C to Java translation might also be interesting for some CDT users. So here an overview:
There are three companies offering automatic C to Java translation - providing varying quality:
- Novosoft, C2J: free
- Tangible Software Solutions, C++2Java: free up to 1000 lines, $129 above
- mtSystems, Coot: price based on lines of code
Such a translation allows to:
- Easily upgrade legacy C projects to Java.
- Automatically create interfaces of C libraries.
- Offer services for Java (e.g. code analysis/proofs) also for C.
Our translation (mtSystems) is completely automatic, supports the entire C language and creates functionally equivalent Java code - ready to be executed. Features:
- Pointers are optimized away or translated to readable Java classes, function pointers are translated to method references.
- Full support for unsigned types.
- Full support for goto statements.
- Full support for native libraries; the translated Java project seamlessly interfaces with libraries (GMP, Ncurses, X11, ...) the C project used.
- Macros are translated to Java methods or constants.
- Comments are preserved and reformatted to Javadoc.
- The translated code adheres to the Java design and naming conventions
- ...
We have evaluated our translation software on a number of C programs, including wget, less, xeyes, and micro httpd. We keep extending and optimizing it and will soon also put the translation of vim online.
Maybe this is interesting/helpful for someone here.
Cheers!
Marco
[1] http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg28360.html
[Updated on: Sat, 01 November 2014 10:37] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03756 seconds