Why should an automated conversion tool first compile the Ada code?

Why should an automated conversion tool first compile the Ada code?

For any automated conversion method you will require that the Ada source code be compilable by the tool. Unless you can compile Ada source code, there is really no way to know what it is doing. For example, in Ada, something as simple as "F(X)" can mean about five different things, such as calling a function called F, indexing into an array called F, converting to the type called F, calling a function called F which returns a pointer to an array, and then indexing into that, or selecting the "X"th dimension of a multi-dimensional array F. So unless you can compile the code, there is no way to properly translate "F(X)" into C or C++, because without compiling, the tool won't know what is the exact meaning of "F" nor the exact meaning of "X," both of which can affect what is the proper translation for "F(X)". Therefore, our tool first compiles the code before it will start the translation so that you know the outputted code will compile and run. Assuming that Ada libraries are available in source code format, Ada-C/C++ Changer can be easily configured to support various Ada compiler code generation formats. We also provide GNAT compatibility to assist in moving from GNAT compiler. Our tool supports variety of host platforms and also handles various re-hosting scenarios.
    • Related Articles

    • Can Ada-C/C++ Changer tool be used outside of AppCOE IDE?

      Yes. There is no need for everyone to use AppCOE to do Ada to C/C++ conversion, if you wish, the tool can be used outside of the AppCOE with our standalone tools for Ada compile/conversion. Even if you choose to use the AppCOE tool initially, you can ...
    • What does the Ada-C/C++ changer tool consist of?

      This tool uses the same Ada 95 font end that is used by Green Hills, Aonix, Analog Devices and Raytheon for their validated Ada 95 compilers. The C-generating “emitter” is used on daily basis both in-house and at customer sites, compiling millions of ...
    • How does Ada-C/C++ Changer handle run-time errors?

      Ada language, by default, automatically handles various run-time errors that are not handled by the application. It is recommended that the Ada code be first inspected manually or using Ada Inspector tool to ensure there is enough error handling code ...
    • Which ada constructs does your tool NOT support?

      Here is some info on what we support .. • Supports conversion of Ada 83 and Ada 95 source code to ANSI C++ 03 output • Preserves Ada comments, files structures and variable names for easier code maintenance • Converts Ada generics to C++ templates ...
    • Could you please explain about Ada-C/C++ Changer Tool Tuning?

      Every time that we use the tool to complete a project, we make adaptations to it based on the language constructs used in the source system and the desired target output (including desired coding standards, architecture, language, target language ...