From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 7 Apr 93 18:26:09 GMT From: alex@MIMSY.CS.UMD.EDU (Alex Blakemore) Subject: Re: C to ADA translators. Message-ID: <66126@mimsy.umd.edu> List-Id: In article 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