Xref: utzoo comp.lang.ada:1364 comp.sources.wanted:4524
Path: utzoo!utgpu!water!watmath!clyde!skep2!wcs
From: wcs@skep2.ATT.COM (Bill.Stewart.[ho95c])
Newsgroups: comp.lang.ada,comp.sources.wanted
Subject: Re: WANTED : DEAD OR ALIVE - "C" to ADA Translator
Message-ID: <194@skep2.ATT.COM>
Date: 14 Jul 88 05:39:27 GMT
References: <1079@astroatc.UUCP> <401@csed-1.IDA.ORG>
Reply-To: wcs@skep2.UUCP (46323-Bill.Stewart.[ho95c],2G218,x0705,)
Organization: AT&T Bell Labs Center 4632, Holmdel, NJ
Lines: 31

In article <401@csed-1.IDA.ORG> zweig@csed-1.IDA.ORG (Jonathan Zweig) writes:
:C to Ada translation? I vote hiring somebody to do it by hand at five or
:six bucks an hour. If the code is too icky to translate by hand with a
:sufficiently high degree of confidence that you've preserved the
:functionality, then rewrite the program(s).

Translating Pascal or Fortran to C is reasonable, since the semantics
of C (almost) include the semantics of the other two languages.
Translating C to Ada is another story - there's too much difference in
semantics.

First of all, C makes heavy use of pointers, which Ada
considers to be evil and dangerous, and sometimes it uses them for
things that really *are* evil and dangerous and just can't be faked.
Second, C is a weakly-typed language, and real programs often take
advantage of this - a translator would need too much intelligence about
what's really going on to work around these problems.

Even if you find a translator, don't expect the resulting Ada code to
be human-readable or maintainable - and if you lose that, you lose most
of the reason for Ada.  Either higher some ,
or check out the interfaces between C and Ada provided by your Ada
system.  You'll probably have to write a lot of package definitions.

If you're only using Ada because you're working on a military contract
(shame on you) see how flexible your contracting officer is about such
things - while new code may have to be Ada, existing code usually can
be grandfathered in.
-- 
#				Thanks;
#Bill Stewart, AT&T Bell Labs 2G218 Holmdel NJ 201-949-0705 ho95c.att.com!wcs