comp.lang.ada
 help / color / mirror / Atom feed
From: dweller@dfw.net (David Weller)
Subject: Re: Ada to C/C++ translator needed
Date: 1996/10/04
Date: 1996-10-04T00:00:00+00:00	[thread overview]
Message-ID: <53364e$lk1@dfw.dfw.net> (raw)
In-Reply-To: 3251C855.41C6@etek.chalmers.se


In article <3251C855.41C6@etek.chalmers.se>,
B|rje Norden  <yes@etek.chalmers.se> wrote:
>David Weller wrote:
>> 
>> In article <32499FA0.4B5E@magic.fr>,
>> Emmanuel Champommier  <echampommier@magic.fr> wrote:
>> >I'm looking for an Ada to C (or C++) translator.
>> >Does anyone knows where I could find it ?
>
>>         2) None will likely ever exist (This is for various market
>>         reasons, as well as the fact that translating various Ada
>>         constructs, especially when used in combinations, would be
>>         literally impossible to translate (portably, or even
>>         semi-portably) into C _or_ C++)
>Apart from ADA's multitasking features,most of the constructs in ADA/C++
>is actually quite similar (apart from syntax, that is...); I don't think
>it would be too difficult to make an ADA to C++ converter if there was a
>good way of handling the multitasking bits (ADA to C, on the other hand,
>would be a nightmare to accomplish...;-)). And what do you mean by
>various market reasons ? Please explain yourself.
>

What you probably saw was the old Meridian Ada compiler for MPW on the
Mac.  My memory is just as foggy :-), but I seem to recall there were
a lot of little rules about what was, and was not, supported
syntactically.  I don't think any multitasking was supported.  Perhaps
somebody more familiar with that product could speak up.  I do recall
it had a very short life, however.

As for "market reasons", there simply isn't any benefit.  Quite
frankly, the same market reasons apply in the reverse direction.  The
truth of the entire matter is this:  Current and future languages will
be noted more by how friendly they are to "foreign languages" than by
how feature-laden they are.  As software developers, we learn, more
and more, that the world isn't monolingual when it comes to
programming languages.  I personally shift between Perl, Java, C++,
and Ada almost every day (maybe in hopes that one of these days, Ada
will recognize the $_ variable :-).  I'm writing a C++ to Ada
translator to reduce translation errors in migrating a series of
software components.  I have no hopes of selling it, but some people
may find it useful for various reasons (some may be working to a
demand to move from C++ to Ada, others may want to use it to help find
weaknesses in the C++ typing model to improve their C++ code, and,
what I REALLY hope it will be used for: people will have a
tool that will help them start to objectively compare C++ and Ada)

>> 
>> Good news (kind of):
>>         1) A C to Ada traslator exists
>>         (http://www.inmet.com/~mg/c2ada/c2ada.html)
>>         2) A C++ to Ada translator is in early prototype stages
>This would be just as hard as ADA to C++...
>

Hmm...no, I don't think so, but it would be an excellent experiment
for somebody to do (I'm keeping track of the time I apply to creating
my converter, they're welcome to use that to compare level of effort,
if nothing else).  On the simplest level, the interaction between
protected types, tasks, and controlled types in Ada would be VERY hard
to duplicate through a converter.  You'd have to have a non-trivial,
portable library to support such a thing.  I've yet to find a need to
have _any_ such library/package for the C++ to Ada translation.  

And, of course, I have no desire to waste my time with an Ada to C++
translator (but if offered the right amount of money ... :-)

-- 
    Visit the Ada 95 Booch Components Homepage: www.ocsystems.com/booch
           This is not your father's Ada -- lglwww.epfl.ch/Ada




  reply	other threads:[~1996-10-04  0:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-25  0:00 Ada to C/C++ translator needed Emmanuel Champommier
1996-09-25  0:00 ` David Weller
1996-10-02  0:00   ` B|rje Norden
1996-10-04  0:00     ` David Weller [this message]
1996-10-05  0:00     ` Robert Dewar
1996-10-05  0:00       ` Frank Manning
1996-10-06  0:00         ` Samuel Tardieu
1996-10-07  0:00           ` Richard Kenner
1996-10-07  0:00             ` Robert Dewar
1996-10-08  0:00             ` Stephen Leake
1996-10-07  0:00         ` Robert Dewar
1996-10-08  0:00           ` Frank Manning
1996-10-07  0:00   ` Erik Magnuson
1996-09-26  0:00 ` Ian Ward
     [not found]   ` <52feul$os2@goanna.cs.rmit.edu.au>
1996-09-28  0:00     ` Tim Behrendsen
1996-09-29  0:00       ` Ken Pizzini
1996-09-29  0:00         ` Tim Behrendsen
1996-09-29  0:00           ` Robert Dewar
1996-09-30  0:00             ` Tim Behrendsen
1996-09-30  0:00               ` Matthew Heaney
1996-09-30  0:00                 ` Tim Behrendsen
1996-09-30  0:00               ` William Clodius
1996-10-01  0:00               ` Richard A. O'Keefe
1996-09-30  0:00           ` Richard A. O'Keefe
1996-09-30  0:00             ` Tim Behrendsen
1996-09-30  0:00       ` Richard A. O'Keefe
1996-09-30  0:00         ` Tim Behrendsen
1996-09-30  0:00           ` Peter Seebach
1996-09-30  0:00             ` Tim Behrendsen
1996-10-01  0:00           ` Richard A. O'Keefe
1996-10-01  0:00             ` Tim Behrendsen
1996-10-02  0:00               ` Ian Ward
1996-10-02  0:00                 ` Tim Behrendsen
1996-09-30  0:00         ` Peter Seebach
1996-10-02  0:00           ` Richard A. O'Keefe
1996-10-05  0:00             ` Lawrence Kirby
1996-10-06  0:00     ` Tanmoy Bhattacharya
1996-10-06  0:00       ` Lawrence Kirby
1996-10-08  0:00         ` Peter Seebach
1996-10-07  0:00     ` Tanmoy Bhattacharya
1996-10-02  0:00   ` Jon S Anthony
1996-10-02  0:00   ` Jon S Anthony
  -- strict thread matches above, loose matches on Subject: below --
1996-10-02  0:00 Simon Johnston
1996-10-07  0:00 ` Richard Riehle
1996-10-09  0:00   ` Richard A. O'Keefe
1996-10-15  0:00     ` Tucker Taft
replies disabled

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