Ada-Changer
Is the boundary for this translation integer only (32bit). Is there any provision for 16bit
The translator can generate appropriate C pragmas and bit-field specifications to control packing down to the bit level.
Ada isn't case sensitive and there may be some variables of correct name which have incorrect case. How is this handled with case sensitive C? Does the capitalization of the declaration take precedence?
Ada C/C++ Changer has several different options. The default is to canonicalize the spelling so the first letter is capitalized and the others are lower case in the generated C source code. Ada C/C++ Changer can also use the spelling from the ...
Is there a concern while using of computations with 'pred, 'last, 'first and expressions using them giving the correct answer
A table is used to ensure that 'pred, 'last, etc. produce the right answer, even for enumerations with holes in the representation.
How are Ada arrays with enumerated indices handled? (i.e. Ada allows array indices to start with non-zero, even non-numeric values) How is this mapped to C which must always start at zero?
Enumerated indices are not generally a special case, as enumeration values may be used as indices in C. However, if the Ada enumeration type has an enumeration rep clause which leaves holes in the enumeration sequence, then a table is used to ...
How are Ada packed arrays handled? Are they converted to strings? and if so, do you add 1 extra byte for the null?
Packed arrays are referenced as byte-arrays in C, with appropriate shifting and masking to handle cases where the elements are less than 8-bits/element. We don't generally add an extra byte. Ada strings are converted to C char-arrays, and C string ...
If we have this mapped to a variable-member in a record/rep-spec can we simply assign to it or do we have to do additional mathematics to get the delta of the LSB's to be correct?
The generated C has exactly the same semantics as the original Ada source code. You don't have to do any manual fixups.
How are fixed and scaled integer/floats handled (i.e. Ada delta).
Ada fixed-point types are translated to C integer types, with run-time routines used for special operations such as fixed-fixed multiply and divide where the built-in C operators don't do the right thing.
How are Ada rep-spec 'use at or 'size clauses translated? (iow. how does a record (or variable) get mapped to an address with correct size).
Appropriate padding or packing is specified to ensure the generated C struct matches the specified 'size. For "use at" (i.e. for X'Address use ...) a pointer is used in the C code, with the pointer initialized to the specified address.
How are Ada Classes translated/implemented in C++
They become "struct"s in the generated C++, with separate tables of function pointers used to implement Ada's dispatching operations.
How are "for" loops and "while" loops handled in Ada C/C++ Changer? Will this implement jump statements?.
Both "for" loops and "while" loops in Ada become while loops in C. We don't use "jump" statements in the generated C unless the original Ada had a "goto."
How are task priorities handled?
When a task is created, a run-time routine is called, with the specified task priority as a parameter. If you are using the OS Abstractor, these priorities are passed through to the underlying RTOS. If you are not using the OS abstractor, the ...
How is preemption handled in Ada C/C++ Changer?
If you are using the OS Abstractor, then all task scheduling is handled by the underlying RTOS. If you are using the setjmp/longjmp task switcher, preemption is handled through C signal handling.
How are task delays, waits, scheduling handled?
Again, the answer depends on whether you are using OS Abstractor. If using OS abstractor, all of these things are translated into corresponding operations of the underlying RTOS. If using the setjmp/longjmp task switcher, delays are implemented using ...
With the OS Abstractor we were informed that an OS dependent library call is made for tasks.
The OS Abstractor provides a standard interface that resembles Posix threads. Internally it turns calls on its interfaces into calls on the underlying RTOS.
How is the Ada bit representation for record types converted?
There is a fairly direct translation, with Ada records becoming C/C++ structs, and Ada components becoming C fields, with C/C++ bitfield specifications generated as appropriate.
How is hardware/memory addressing converted – an Ada “use at” statement?
The C struct is referenced through a pointer, which is initialized to the specified address.
How are Ada exceptions converted?
If you are generating C++ rather than C, Ada exceptions are translated into C++ exceptions.
How are calls to Ada library packages converted (wind32, calendar, text_io)
When generating C++, each Ada package becomes a separate C++ namespace. For bindings like Win32, the generated C/C++ code has direct calls on the corresponding C interface, using export "C" {}.
How is memory allocation/deallocation converted?
The standard C library malloc and free routines are called. If using OS Abstractor, these are generally converted into calls on the RTOS malloc/free calls.
How are AdHow are Ada generic packages converted?
Instances of Ada generic packages are expanded at compile-time into non-generic code C/C++. Generic packages themselves do not translate into anything in the C/C++ code. We can provide assistance in a semi-manual procedure for generating C++ ...
How are Ada record types converted? What do they look like if they have bit representations?
Ada C/C++ Changer use C/C++ bit field specifications as necessary to provide an identical "struct" representation as described in above answers.
For the Ada compiler, what target hardware is supported?
As far as the target support it basically depends on the C/C++ compiler that would be used by the customers. Ada-C/C++ Changer has Ada compiling front-end and uses a C/C++ compiler back-end. Many of our customers use GNU compiler which basically ...
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 ...
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 ...
How does Ada-C/C++ Changer compare to Ada2cc?
The following paragraph has appeared on the Ada2cc product description for many years: “How ‘good’ is the translation? We estimate that the current version of the translator converts 90-95% of the code without hand modification. However, 5% is still ...
What is the purpose of Label___dope appearing in my converted code? And more generally anything “dope”?
In Ada, the bounds of an array (the 'First and 'Last) are generally passed as a separate argument. This argument is traditionally called the array "dope" or array "dope vector" (e.g. see https://en.wikipedia.org/wiki/Dope_vector).
What is “rts_ss_mark” and “rts_ss_release” functions appearing in my converted code? I’m not sure I’m following what’s going on there…
Ada uses a "secondary stack" to hold locally declared objects and temporaries whose size is not known at compile time. This secondary stack is managed using a "mark/release" discipline (for background, see "mark-and-release" in ...
Do you support bitwise manipulation?
we have a generic template library which supports this in C++.
What all Abstract tagged record types are supported?
Supported in Ada to C++ conversion. It’s possible that additional nuances that we would need to handle but that’s true of most parts of Ada
Do you support Unchecked Deallocation?
Currently not supported, but this would be something easy to add support for the customer
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 ...
When converting from Ada, which programming language is better, ‘C’ or ‘C++’ ?
C++ comes with powerful tools like object-oriented programming and templates, which can make your code more organized and easier to work with, especially for complex projects. By adopting C++, your team can improve our software development efforts, ...
When converting from Ada, I prefer ‘C’ as my converted target language. What convincing statements you have that will make me choose C++ instead of ‘C’ ?
I understand the concern about the familiarity of our developers with C. While sticking with C might seem like the easier option initially, transitioning to C++ can offer numerous advantages that can greatly benefit our development process and ...
Software Modernization based on AI versus Ada-Changer, a comparison?
https://mapusoft.com/application-modernization-based-on-ai-versus-ada-changer
Which programs or projects Mapusoft has worked on for the DoD in the past?
The engine powering Mapusoft's Ada-C/C++ Changer 2.0 Engine has been used on DoD project since the early 2000s. These projects include: - The Navy Multi-band Terminal (NMT), a SATCOM terminal, which the tools transformed from Ada to C++ - The ...
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 ...
Have it been used to successfully convert something in the range of 140K SLOC of Ada to C++?
Our tool has been used to convert some of the most mission-critical applications in the world. For instance, the Advanced Field Artillery Tactical Data System (AFATDS) conversion alone was well over 3 million lines of Ada to C++.
How to perform Embedded Memory management in conversion?
We have C++ template types which can lay out data structures to the bit same as Ada compiler as specified in the Ada representation clauses
Why Ada-C/C++ Changer is better than most Ada conversion tools?
There are a number of good reasons that our approach is better than others: Our toolset/services are driven by an iterative and model-based approach. One of our first steps is to create a full and complete model of your entire application. We then ...
Does it convert to ISO Standard C++11 or beyond?
We are currently working on a major Ada to C++ modernization targeting C++ 13. I think it depends on the features that may be different in C++ 11 than previous version or newer versions, which might require adaption. I believe we can support this C++ ...
Next page