Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT helping C developers; a new/unusual approach(Automatic C to Java translation)
icon7.gif  CDT helping C developers; a new/unusual approach [message #1457722] Fri, 31 October 2014 16:30 Go to next message
Marco Trudel is currently offline Marco TrudelFriend
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

Re: CDT helping C developers; a new/unusual approach [message #1458374 is a reply to message #1457722] Sat, 01 November 2014 09:35 Go to previous messageGo to next message
Klaus km is currently offline Klaus kmFriend
Messages: 142
Registered: November 2011
Senior Member
Hello Marco,

this forum is for CDT Users, discussing about CDT, features, problems and so on...
And, btw, CDT is Open Source and free.
But you add advertising for an expensive, closed source commercial product here.
I think this is the wrong place for advertising and a i would appreciate it if you could remove the ad.
Thanks in advance!

regards


Re: CDT helping C developers; a new/unusual approach [message #1458416 is a reply to message #1458374] Sat, 01 November 2014 10:34 Go to previous message
Marco Trudel is currently offline Marco TrudelFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Klaus

Out of the context of the dev list it indeed seemed more like advertising than a helpful general post.
I now edited it to generally introduce the C -> Java translation approach and list options. This should have general value and be more helpful.
Let me know what you think.

Btw, in my only other post to this forum I asked how to use CDT for something like this. I only got a wrong "I don't think you can do it" answer. At least seeing this post, people will know that it is actually possible.

Thanks
Marco
Previous Topic:Problem with debugging: no source available
Next Topic:Can't compile C++ inside eclipse
Goto Forum:
  


Current Time: Mon Oct 07 02:18:19 GMT 2024

Powered by FUDForum. Page generated in 0.03756 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top