C to Java Translation
Automatic, Complete, Correct; Low Cost + Low Risk



We translate C source code to Java source code. The translation is completely automatic, supports the entire C language and creates functionally equivalent Java code - ready to be executed.
Here are just a few ways you could benefit from our technology:
  • Do you maintain legacy C code? Upgrade to Java: a modern programming language, which current university graduates are comfortable with!
  • Are you a Java developer and would like to use a library that only exists in C? Create a Java interface for the library completely automatically!
  • Do you develop C libraries? Offer them to the Java world with zero maintenance overhead!
  • Are you in the business of Java code analysis (e.g. bug finding)? Expand it to C and double your market!
We offer unique features you will not find anywhere else:
  • 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.
Take a look at the Demo and FAQ sections to get an impression of what you can expect from us.

Demo

C Code

Translated Java Code

Examples:
Maximize

Translated Programs

We have evaluated our translation software on many C programs, including Vim, links, curl, wget, less, XEyes, and micro httpd.
Selected translations are available here. Contact us if you are interested in the others.
Vim
Contains the translation of Vim (executable jar plus source zip) and the C project.
Translated for Linux (x64). Includes the Java Runtime Environment; no additional software is required.
XEyes
Contains the translation of XEyes (executable jar plus source zip) and the C project.
Translated for Windows and Linux (x86). Includes Java Runtime Environments; no additional software is required.

Frequently Asked Questions

Why automatic translation?

An automatic, complete and correct translation - compared to a manual translation - has the advantage that the whole codebase can be migrated instantly (instead of needing months or years) and the resulting translation is fully functional (instead of losing the quality of well-tested software by rewriting it from scratch).
It has the disadvantage however that fully automatic translation cannot always guarantee optimal readability: it may introduce non-natural code fragments, which, however, can be optionally rewritten by hand, at a fraction of the cost of a full manual translation.

How does the quality of the translated code compare to manually written Java code?

Readability and maintainability of the resulting code was one of the main focuses from the start. The translation applies numerous optimizations to make the Java code look as natural as possible. Take a look at the Demo section to get an impression of the code quality you can expect.

Which C standards are supported?

We adhere to specific compiler implementations, not to C standards. This way we can guarantee that the translation is functionally equivalent to the original C code even when that code relies on compiler-specific behavior. We support all recent versions of GCC and can adapt our translation to other compilers and C dialects upon request.

How is a project translated?

Translating a C project is as easy as doing a regular build of it. During compilation our system collects all the required data (C code, linked libraries, ...). After a successful build, the collected data can directly be translated to Java.
Such a translation corresponds to a specific configuration of the C project. If the project has multiple configurations (for example, targeting different platforms), it is translated once for each configuration, and then all the resulting translations are merged into one Java project.

Does it really work?

The theoretical basis for the translation has been developed at ETH Zurich, as part of the PhD thesis of Dr. Marco Trudel. The project website contains a list of peer-reviewed publications that describe the technical details of the translation.

What does a translation cost?

We offer translations in the area of 1 USD per line of C source code, depending on the specifics of the project. It is risk-free: you only pay if you are satisfied with the result.
The cost of a manual migration ranges from 6 to 26 USD per line of code, according to a study of the Gartner Group ("Forecasting the Worldwide IT Services Industry: 1999,1"). The study also estimates the rate of a manual migration at 160 lines of code per day.
Using Gartner's numbers, translating a million lines of code by hand would cost 6 to 26 million USD and take about 17 years. With the automatic, complete and correct translation we offer, you will get the result in a matter of days, for about 1 million USD.

Contact Us

Send us a message. We would be happy to hear from you.

Name
Email
Subject
Message
Send me a copy.

Phone   +41 44 632 85 92
Fax +41 44 632 14 35
info@mtsystems.ch
mtSystems GmbH
Clausiusstrasse 59
8092 Zürich
Switzerland
Copyright © 2014 mtSystems (Migration Technology Systems) GmbH. All rights reserved.