comp.lang.ada
 help / color / mirror / Atom feed
From: wcs@skep2.ATT.COM (Bill.Stewart.[ho95c])
Subject: Re: WANTED : DEAD OR ALIVE - "C" to ADA Translator
Date: 14 Jul 88 05:39:27 GMT	[thread overview]
Message-ID: <194@skep2.ATT.COM> (raw)
In-Reply-To: 401@csed-1.IDA.ORG

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 <undergrads or contractors>,
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

      reply	other threads:[~1988-07-14  5:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1988-07-01  0:19 WANTED : DEAD OR ALIVE - "C" to ADA Translator Phil Mason
1988-07-01  0:22 ` Phil Mason
1988-07-07 18:39 ` Jonathan Zweig
1988-07-14  5:39   ` Bill.Stewart.[ho95c] [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox