It says the translation is correct, is there any proof of that ?
Only in the form of translating and running dozens of C applications (programs and libraries) and running their testsuites. E.g. libcurl comes with a great extensive testsuite (a perl script running against the binary). Translated applications still need to be thoroughly tested and usually some bugs are still found. So we didn't formalize and verify our translation. Interestingly enough, we run into bugs in javac and…
C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
31–40 of 55 posts
Re: C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
#32Re: C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
#33Main author here. Let me know if you have any questions. I’d be happy to answer.
If it really works - very impressive! Have you considered using sun.misc.Unsafe for things like pointer arithmetic?
Re: C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
#34Earlier quoted context omitted.
> Why do young students no longer learn C? Who said they don't? This project is about porting existing stuff, for interoperability, etc. Not as a way to "avoid learning C". > Don't you want to be closer to the underlying OS? No, why would I want to do that unless I have a specific need for that?
No, why would I want to do that unless I have a specific need for that? At least if you're using a Unix-like system, then understanding POSIX is essential for knowing how things work starting on an intermediate level.
Anyway, C is a horrible language. Between Fortran and Ada it's unclear to me why C should be chosen for anything, inertia and herdthink aside.
Re: C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
#35Pretty neat. I did find a bug while I was playing around with it though: it doesn't correctly translate Duff's device.
Thanks!
Re: C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
#36Interesting how gotos are translated to switches 90% of C should be pretty easy to translate, but of course, the devil (and a lot of functionality in existing libraries) is in the details. There would be probably money in translating COBOL to Java, but maybe there are solutions already?
The main problem being undefined behaviour that is actually undefined and varies from compiler to compiler!
Re: C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
#37Main author here. Let me know if you have any questions. I’d be happy to answer.
it's very kind of you to translate open source projects for free. I personally think you should give that more attention rather then just an italic sentence at the bottom of the page.
But of course a lot of development and money went into our translation framework. So the main aim has to be to make money with it. But as long as we have capacity, we're happy to translate open-source software and improving our translation while doing so.
Re: C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
#38Pretty neat. I did find a bug while I was playing around with it though: it doesn't correctly translate Duff's device.
Can you elaborate on that? What's the C code, the translated Java code and your expected Java code? Thanks!
Re: C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
#39Earlier quoted context omitted.
Only in the form of translating and running dozens of C applications (programs and libraries) and running their testsuites. E.g. libcurl comes with a great extensive testsuite (a perl script running against the binary). Translated applications still need to be thoroughly tested and usually some bugs are still found. So we didn't formalize and verify our translation. Interestingly enough, we run into bugs in javac and…
This sounds like a great spin off - bug finding in C code. Have you put much thought into pursuing this?
Re: C to Java Translation. Automatic, Complete, Correct. Free for Open-Source.
#40I wonder what the performance impact is. Why do young students no longer learn C? Don't you want to be closer to the underlying OS?