From: ae@sei.cmu.edu (Arthur Evans)
Subject: translating Ada to C (long)
Organization: Software Engineering Institute
Date: Thu, 3 Sep 1992 13:10:10 GMT

A few days ago I requested help in automating the translation of C to
Ada, suggesting that folks reply to me and that I would summarize.
Here is the promised summary.

First, though, an explanation: I said I wanted this information for a
client, and several folks asked why anyone would want to translate Ada
to C.  (Translating the other way is of much greater interest in this
discussion group.)  What my client is interested in is preparing some
new products which will be (for good and sensible reasons) written in C
for use on platforms that may not support Ada compilers.  They have a
lot of algorithms expressed in Ada, most of which are part of products
they have written in Ada, and they want to reuse those algorithms in
their new products.

Here are the responses that I received, separated by dashed lines.

Art

----------------------------------------------
Arthur Evans, Jr, PhD           Ada Consultant
461 Fairview Road
Pittsburgh PA  15238-1933
412-963-0839
ae@sei.cmu.edu

------------------------------------------------------------------------

The most interesting response I received was from both Susan Carlson and
Michele Key of the Ada Information Clearing House (AdaIC), who each
provided me a list of COTS products for C to Ada translation (the wrong
direction) described in the AdaIC data base.  Susan Carlson added this
explanation for this response:
    These tools, listed in the AdaIC Products and Tools database as "C
    to Ada" translation tools, may provide some leads for Ada to C
    translation tools.

Category:  C to Ada
Tool Name: C to Ada Translation Service
Vendor: Celeris, Inc.
        9430 Topanga Cyn. Blvd., Ste. #207
        Chatsworth, CA  91311   USA
        (818) 709-2181

Abstract:

Celeris is currently offering a comprehensive service to translate
computer programs written in the C language to equivalent Ada
programs.  Proprietary technology developed at Celeris enables us
to offer this service at a very cost effective price with very
short turnaround times.  Translations can be performed across
hardware platforms and operating systems.  We also offer custom
programming support if the target Ada system does not provide the
same operating system or library capabilities that were available
in the original C system.

    This product description has been provided by the vendor.



Category:  C to Ada
Tool Name: PRODOC re/NuSys Workbench
Vendor: Intelligent Micro Systems, Inc.
        1249 Greentree Lane
        Narberth, PA  19072   USA
        (215) 664-1207

Abstract:

PRODOC re/NuSys Workbench consists of a Designer, Simulator, High
Level Design C Generator, Pseudocode Generator, Reverse Engineer,
Translator and Report Generator, along with full support for
re/NuSys' High Level Design (HLD Library) language and a choice of
two additional languages.  Languages currently available include C,
Ada, Pascal, C++, Fortran and COBOL. The re/NuSys Workbench
provides full life cycle support for most software design, reverse
engineering and code reuse.  With Re/NuSys you reverse engineer
existing code into a visual, hierarchical FLOWform environment
where it can be documented, restructured, regenerated, reused or
even converted into a new language.  You also model any existing or
planned system  and test its logic at a high level of abstraction. 
Successive refinement is continued until contact is made with
available (or assigned) data and process resources.  re/NuSys
operates in interactive mode, or under fully automatic macro
control with batch capabilities.  The re/NuSys Workbench requires
a PC 286/386/486 with a minimum of 2MB RAM. It also is available
under X Windows on Sun, IBM, and other popular UNIX platforms.

    This product description has been provided by the vendor.



Category:  C to Ada
Tool Name: XACT
Vendor: Applied Conversion Technology
        415 U.S. Highway 1 - Suite C
        Lake Park, FL  33403   USA
        (407) 844-0000

Abstract:

ACT's rulebase-driven technology yields compilable, maintainable
Ada comparable to that produced by the typical project team.  The
process creates Ada source of uniformly high quality at high
production rates.  Standard tools provide intelligent,
comprehensive, context-sensitive translations which include:  1)
proper packaging;  2) Format- and scanf/printf-type I/O transformed
to in-line "GET/PUT" sequences (or - optionally - to packaged
function invocations);  3) original comments preserved.  Structure
diagrams and other software-manufacturing working and reference
documentation are automatically generated from semantic data
extracted during translation.  The flexibility and power of ACT's
technology permits the Company to rapidly customize standard tools
to produce organization-specific and application-specific tools. 
Act's proprietary expert-system-based tools currently translate
FORTRAN, C, and various assembly language(s) to Ada.  COBOL-to-Ada
translation is under development.

    This product description has been provided by the vendor.



Category:  C to Ada
Tool Name: Xinotech Language Translator
Vendor: Xinotech Research, Inc.
        1313 Fifth Street Southeast, Suite 213
        Minneapolis, MN  55414   USA
        (612) 379-3844

Abstract:

The Xinotech Language Translator is a language-independent tool for
the automatic translation of sources from one language to another. 
It represents a major advancement in translation technology,
greatly reducing the dollar cost associated with converting
existing systems to Ada.  All aspects of the source to target
mapping (such as abstract grammar semantics, external views,
attribute grammar semantics, abstraction patterns, guideline
assertions, and embedded PDL and 2167A standards) are expressed
formally through external specifications written in XML, the
Xinotech Meta-Language.  This customizability is ideal when
converting from the CMS-2 or Jovial families to Ada or for dealing
with operating system dependencies such as multi-tasking in CMS-2.

    This product description has been provided by the vendor.



Category:  C to Ada
Tool Name: PRODOC re/NuSys Workbench
Vendor: Scandura Intelligent Systems
        1249 Greentree
        Narberth, PA  19072   USA
        (215) 664-1207

Abstract:

re/NuSys Workbench is a system which provides full life cycle
support for most software design, development and maintenance
situations, with special emphasis on software recycling.  Existing
code is reverse engineered into a visual, hierarchical FLOWform
environment where it can be documented, restructured, regenerated,
reused or even converted into a new language.  A model of an
existing or planned system is made and its logic tested at a high
level of abstraction.  Successive refinement is continued until
contact is made with available data and process resources. 
re/NuSys contains the following components:  developer, maintainer
and translator.  There is also a large project version of this
product.

This product description has been extracted from information
provided by the vendor.

------------------------------------------------------------------------

Here's another response:

GE Corporate Research & Development's Computer Science Program built a tool
that translates Ada to C.  It was developed because one of our customers
wanted to maintain our code in C, even though we had developed it in Ada.
However, we never commercialized the tool.  I suspect that it works well on
the Ada code we write, but may not accept full legal Ada.  For example,
I'm almost certain it won't translate tasks to C.

We may be willing to make it available, probably for a fee, depending on
the customer and their objective.  For more information contact:
Richard Hammond, GE CRD, Schenectady, NY., 518.387.7478, hammondr@crd.ge.com

------------------------------------------------------------------------

Tucker Taft of Intermetrics responded:

Several of Meridian Software's Ada compilers are built on top of an
Ada-to-C translator.  Furthermore, they sell the translator separately
as part of an "Ada kit" for building Ada compilers for new targets.
What this means is that their Ada-to-C translator is quite robust,
validated, etc.  and they have a run-time system to go with it (which
you would need to accompany the translated code).  So, you should
mention "Meridian" to your client.

------------------------------------------------------------------------

Here's another message along the same lines.

Date: Wed, 2 Sep 1992 16:49:05 +0930
From: ptmuller@teaching.cs.adelaide.edu.au (Peetee Moobaa !!)
Message-Id: <9209020719.AA07690@zebedee.teaching.cs.adelaide.edu.au>
To: ae@sei.cmu.edu (Arthur Evans)
Subject: Re: translate Ada to C

Yeah... if you get Meridian Ada, it converts the Ada code to C before
compiling the C code to produce the executable!!  This was found out by
checking the running processes during a long compilation one day...

I don't think you could actually intercept this C code, but maybe you
could try...

Pete Muller.