comp.lang.ada
 help / color / mirror / Atom feed
From: alex@MIMSY.CS.UMD.EDU  (Alex Blakemore)
Subject: Re: C to ADA translators.
Date: 7 Apr 93 18:26:09 GMT	[thread overview]
Message-ID: <66126@mimsy.umd.edu> (raw)

In article <C52rx3.B67@crdnns.crd.ge.com> groleau@e7sa.crd.ge.com (Wes Groleau 
X7574) writes:
> 1. I found some free code in C that meets 95% of my requirements.  I want
> to translate to Ada so that I have some hope of meeting the other 5% by my de
adline.

> One of the alleged goals of Ada is to promote re-use.  Well, the tons of 
> FORTRAN and C that are "out there" provide an excellent opportunity!

fine, but before you mechanically try to translate the software to Ada,
why not try to build an Ada binding to the C or FORTRAN code,
(.i.e. RTFM about pragma interface and friends)

this is a lot cheaper and safer than translating and often works well.
You can, with some care, make the binding provide some type safety and
a nice abstract interface with exceptions, decent names etc and hide
all the nasty conversion stuff in the package body of the binding.

its not always portable, but the problems can be restricted to the
binding body.

there is a tool on sgi.com called c2ada which translates C header
files to Ada specs, expect to do some work afterwards, but this can
help build a binding faster.

there are times when this wont meet your needs, but I'ld sure spending
a little time trying to get a binding to work before translating the
whole thing.  If you have to resort to translation, much of the
binding work will still be useful.

if the mandate is the problem, I think there is an exclusion allowed
for new code versus existing code.  If you can certify the existing
code, as not changing by xx% and separate that from the new code that
you must write in Ada then you may be able to get by.  of course, then
your contract officer will be aware what they are buying (which may
already be free) and then should be able to decide what he wants.

-- 
---------------------------------------------------
Alex Blakemore alex@cs.umd.edu   NeXT mail accepted

             reply	other threads:[~1993-04-07 18:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-07 18:26 Alex Blakemore [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-06-19  0:00 C to Ada Translators Greg Kramer
1993-04-08 17:06 C to ADA translators fred j mccall 575-3539
1993-04-07 20:33 Wes Groleau X7574
1993-04-07 19:24 agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!darwin.sura.net!sg
1993-04-07 18:27 howland.reston.ans.net!usc!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!mkso
1993-04-07 17:22 Wes Groleau X7574
1993-04-06 23:25 David Emery
1993-04-06 21:27 timothy shimeall
1993-04-06 19:45 Dave Bashford
1993-04-06 19:43 agate!howland.reston.ans.net!bogus.sura.net!darwin.sura.net!dtix.dt.navy.mil!relay-wo!relay!apssgi.nswc.navy.mil!bwallet
1993-04-06 18:41 Wes Groleau X7574
1993-04-05 21:12 Pat
1993-04-06 12:16 ` Brad Wallet
1988-07-02 19:22 C to Ada translators Mike Linnig
replies disabled

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