Ada-Changer
What specifications or requirements does our Ada code need to meet to be used by Ada-C/C++ Changer?
It must be self-contained and compilable by an Ada 95 or Ada 83 compiler. If you use third-party libraries which are not part of the Ada standard library, you will need to at least include the Ada source code for the package specs for such a library. ...
Our Ada Software is far from modular. We would have a difficult time converting code pieces of the project for trial testing. How do you suggest we go evualuating Ada-C/C++ Changer to make sure it meets our needs? For example, if we just grabbed 5 random .adb files, would ADA-C/C++ Changer handle th
AdaChanger is like a compiler. It requires the "specs" for any package that is "with"ed. It requires the bodies for any generic that is instantiated. It can work on a piece of a program, but that piece must at least include all of the package "spec"s ...
During our transition from Ada to C++, we will likely have developers working in Ada. How does Ada-C/C++ Changer handle development versions? For example, we take a snapshot of our Ada code today for conversion. While we are converting our Ada code and testing our new C++ code, our developers will b
The license is based on the maximum number of lines of code in the code base. There is no extra charge to re-translate the same lines again, nor to translate modified lines. If there are additional lines of code, then the total in the code base must ...
We have both a unclassified repository and a classified repository. The delta of our repositories is about 10,000 SLOCS. If we know the files which are different, can Ada-C/C++ Changer tool convert just those files without requiring a license that would re-count the other 100k lines that are the sam
You would only need to convert the package bodies in the shared code once. The package specs would be needed for both translations.
Can I evaluate Ada-C/C++ Changer?
Yes, you can download an evaluation here: www.mapusoft.com/downloads
What is the difference between Ada-C/C++ Changer and an Ada to C language syntax converter?
Ada-C/C++ Changer is not an Ada to C language syntax converter, which is very inefficient. Ada-C/C++ Changer technology is actually an Ada compiler along with a few command line switches that are used to perform Ada to C conversion. Since the ...
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 ...
What are the components of Ada-C/C++ Changer?
There are six components of Ada-C/C++ Changer: AdaCgen - Ada compiler which automatically compiles all user-registered Ada source and generates interim optimized C files, then the compiler will go through the optimized C files and convert them to ...
How do you migrate the Ada tasking model to C/C++?
If the original code uses Ada tasking, the translated code makes calls on the routines that implement the Ada tasking model. As mentioned above, these are in turn implemented by a layered Ada run-time system that can be hosted on top of most modern ...
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 ...
How is my application’s safety certification maintained or re-asserted after converting to C?
Probably the best analogy is recompiling the system with a new compiler. Clearly you would have to rerun all your tests, but presuming you translate any Ada unit tests/drivers as well, you should be able to achieve the same level of MC/DC coverage ...
Conversion tools like AdaMagic only cover 70% - 80%. Do you have any data about the percentage of your coverage of Ada-C/C++ Changer?
We convert 100% of the Ada source into C, with no human intervention required whatsoever. Our tool is based on a fully validated Ada compiler, which handles the full Ada 95 language. It produces efficient and readable C that exactly matches the ...
Apart from the I/O packages for each instantiation, what is the rate of lines of code increase when converting Ada->C? Also, are there any options in Ada-C/C++ Changer to reduce this increase?
It varies from 1.5 to 1 to 3 to 1, depending on the complexity of the Ada source code. Heavy use of string concatenation and dynamic aggregates produces more C code, since C doesn’t really have any equivalent to these.
While evaluating Ada-C/C++ Changer, C code generated is around 5 times more than ADA code. Why is this?
The amount of C code will depend on the complexity of the Ada constructs being used in the Ada source code.
A lot of types were not converted and carried over to the ‘C’ files. There were no errors issued by the compiler. Why?
All of these types should be carried over into the generated code, unless there was a compilation error. Note that many of these may have ended up in the “.h” file rather than the “.c” file. Be sure to check both.
The interface of functions with Ada String parameters is changed and we had trouble understanding the body of the operation Procedure Printf(Msg: String) was converted to extern void Printf(const Character * const Msg, int32 const * Msg__dope). Explain.
In Ada, every unconstrained array also carries information on its array bounds. This is traditionally called the array “dope.” So when an array is passed, we also need to pass information on the low and high bound of the array, which is represented ...
We don’t understand some of the ADA custom type conversions Type Reset_Data_Type is (One, Two, Three, Four) was converted to Const Integer Reset_data_type_enum_integer_table[4]={3,6,11,15};Const Character Test_data_type_enum_image_table[11]= {“ONETWOTHREEFOUR”}
Ada provides ‘Image’ and ‘Value’ functions for every enumeration type, and so the compiler needs to build up a table of information that allows an internal enumeration value to be turned into a string, and vice-versa. The enum_integer_table and the ...
The .h and .c files were created, but all it contained were the comments. No errors were reported in the command console. Why were these files not converted?
This normally means there was some compile-time error, or it might be that the file produces no code. This might happen for a generic package or generic subprogram, which produce code only when instantiated. We would need a test case to be sure ...
Why are .h and .c files created for each Ada file? I expected the Foo.1.ada file to be converted to Foo.h and the Foo.2.ada to be converted as Foo.c. Instead, I get a pair of .h and .c files for the Foo.1.ada and Foo.2.ada files.
A single Ada source file can have any kind of code within it, though some compilers are more restrictive than that and use specific naming conventions (such as Rational’s .1.ada and .2.ada, or AdaCore’s .ads and .adb). Ada-C/C++ Changer is designed ...
I have several warnings about installation when executing my batch file. Is it a problem?
See joined files “batch.txt + batch.bat”. We will need to provide you with a “SITE/config” file and a “rtl/src/system.spc” that matches your current compiler’s configuration. We ship by default with a configuration that matches a typical 32-bit Intel ...
What I expect from you is a syntax translator. In this particular case, what prevents you from translating it as a C “long long” type?
It will be the job of the C compiler that I will choose independently from Ada-C/C++ Changer, to verify if the long long is implemented on my HW platform. The location where I translate may not be the location where I compile.
Is the code generated from Ada-C/C++ Changer compiler portable and real-time?
Ada-C/C++ Changer is very portable because the Ada-C/C++ Changer RTS relies mostly on the standard C run-time. However, it isn’t truly “real time” because it uses C “setjmp/longjmp” to accomplish multi-threading, which is not very flexible. By ...
The result of your ADA check seems to be a condition to accept translation. In particular, you find an “error” because 1 line of _comment _is more than 210 characters long. This case is not in the supplied trace. Please translate!
The Ada standard identifies 200 characters as the line length that an implementation must support (see Ada RM 2.2(15)). We can alter this if you choose to order the product, but for evaluation purposes you may want to break the long line into two ...
I am an eval customer. Does your management library control the limitation of the number of lines to translate, but performs cross files checks (for “with” dependencies)?
Because the translation to C is done at the “semantic” level rather than at the simple “syntax” level, we need to be able to “compile” the source that we are going to translate. So that means that we require the source code for all “with”ed package ...
In SITE directory, the content of rts_path is wrong. The path is false! Is it a problem?
Yes, this needs to be edited, as explained in the Ada_Magic_Install.txt file, so that it refers to the “rtl” subdirectory of the installation directory.
I have manually modified the rts_path file, but ADA.LIB generated file is still wrong. The tool behaviour does not change. So, in my Files_C directory, the content of ADA.LIB is wrong. The (same) path is false! Is it a problem?
Yes, this is copied from the rts_path file. So you will need to delete the ADA.LIB and rerun after fixing the rts_path file.
Is OS Abstractor & Ada-C/C++ Changer an independently Safety Certified Product? (Approved agencies include, but not limited to, DoD safety boards, National Security Agency, or Federal Aviation Administration)?
They are not independently certified. It has been in use with various applications that require certifications. We will assist our customers with the certification process of the application combined/integrated with MapuSoft code if necessary.
Does Ada-C/C++ Changer accept Ada83 code or is conversion to Ada95 required?
Ada-C/C++ Changer accepts Ada83 code as is and does not require the code to be converted to Ada95
Have any customers moved from Rational APEX with MapuSoft tools?
We generally don't know what compilers the customers were using. The key thing is that you will need to have full access to all of the Ada source code, including that supplied by the compiler vendor, unless it is part of the "standard" Ada library.
Are there any Ada-C/C++ Changer options specifically available for Ada code developed under Rational APEX?
Not really. The "config" file may need to be adjusted to match the target computer, for example if the target has a 64-bit address, or uses a big-endian (as opposed to a little-endian) word representation, etc.
Does the Ada-Changer handle the Ada elaboration aspect correctly?
Yes. Think of Ada-C/C++ Changer just like a validated Ada95 compiler. It handles the full language, and generated C/C++ code that does precisely what the Ada program did.
I understand Ada-C/C++ Changer includes a C/C++ debugger. Does it also include an Ada source level debugger?
Limited Ada source level debugging is supported and it is roughly similar to what is supported by "yacc," where we can associate the Ada source code and the Ada line numbers with particular locations in the C/C++ source code, using "#line" ...
Do you have support for 64 bit when using Ada changer?
Ada-C/C++ Changer does support 64-bit target environment when you do code generation. It is just a question of updating the "config" file. We use it ourselves on a daily basis on a 64-bit Intel target ("X64").
Does Ada-C/C++ Changer automatically convert Ada generics to C/C++ templates?
Automatic conversion is not supported. However, manual conversion is possible by engineers with strong C++ background and if they are able to read Ada generics. If required, MapuSoft could provide a consultant who can do this either remotely or at ...
How is MapuSoft’s Ada-C/C++ Changer compare to simpler tools like Ada2CC?
Ada-C/C++ Changer includes a front-end Ada compiler and provides 100% automated conversion of Ada code to C/C++ there by eliminating the risk associated with the transition. In addition, it is integrated with Cross-OS development platform to support ...
Why can't I see any active code in the translated files? All I can see is the comments after the conversion.
Translation/Conversion could have failed due to the lack of 64-bit integers in the package “System” and in the “config” file that we ship by default.
When trying to run the Ada-C/C++ Changer on some Ada code that uses #IF/#END IF the # is flagged as an illegal character. Is there a way to get the Changer to recognize the preprocessor directives?
Preprocessor directives are not a standard part of the Ada language. Some Ada vendors support them, but they don't all support them the same way. In some cases you can use the standard C preprocessor with the Ada sources, using the "-E" flag to gcc, ...
Are Ada enums directly translated to C enums or defines?
Ada enums are translated to C enums
How are the tick operators handled and translated on enums, such as ('first, 'last, 'count, 'range, 'succ, 'image) i.e. does 'succ and 'pred become ++ and -- does 'image become an sprint
'First, 'Last, etc. are translated to references to the appropriate C enumeration literals. 'Succ and 'Pred do not become "++" and "--" but rather "+1" and "-1". 'Image becomes a call on a run-time routine rts_enumeration_image which we provide. This ...
How are Ada rep-specs translated directly to C-field specs? (i.e. Ada LSB is nominally C-language MSB)
Appropriate C bit-field specifications are include in the C struct definitions. There is a "config" file which can be used to tailor the translator to unusual characteristics of the target C compiler, though the default "config" file works in most ...
Next page