comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: ada to C++ translation
Date: 2 Mar 2002 16:21:16 -0800
Date: 2002-03-03T00:21:16+00:00	[thread overview]
Message-ID: <5ee5b646.0203021621.ce5a579@posting.google.com> (raw)
In-Reply-To: 3c81060d$1@giga.realtime.net

"Ira D. Baxter" <idbaxter@semdesigns.com> wrote in message news:<3c81060d$1@giga.realtime.net>...

> And we have a nice start; our tools already can process 
> Ada9 and C++,

But that's relatively straightforward. After all anyone
can process Ada 95 (I assume that Ada9 is a misprint)
using ASIS, and it is not clear what "processing C++"
means if you are generating C++ as the output.

> so the real task is to define the map between them.

That indeed is the (very difficult for Ada to C++) part.
A translation from Jovial to C is by comparison entirely
trivial, since the languages are both low level languages
with no major semantic problems in the translation that
I can see.

> How such things are defined are usually defined by 
> customer dictate

That's a very tall order for Ada to C++. For example,
in the case of object oriented stuff, the correspondences
are far from trivial, the same is true for generics and
templates.

Going back to the tool environment, it seems clear that
starting with ASIS is the best here, although your tools
may "process" Ada 95, it is very unlikely that they 
generate the full semantic information available from ASIS
and for sure it seems like you need this full information
for an automatic translation to C++.

What is certain is that, even with this starting point,
this translation is a major project.

What is not certain is that it is a practical project.

Of course one can translate Ada to C, just as one can
translate C++ to C (that is after all what C front does),
but most usually people who ask a question about Ada to
C++ translation have legacy Ada code that they want to
magically translate into high level maintainable C++.

I am dubious that this is possible at all, and even more
dubious that it ever makes sense to attempt it.



  reply	other threads:[~2002-03-03  0:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-02 17:13 ada to C++ translation Ira D. Baxter
2002-03-03  0:21 ` Robert Dewar [this message]
2002-03-04 15:06   ` Ira D. Baxter
2002-03-04 19:58     ` Chad R. Meiners
2002-03-05  4:57       ` Robert Dewar
2002-03-27 13:45         ` Steffen Huber
2002-03-04 20:10     ` AdaMax? (was: ada to C++ translation) Ted Dennison
2002-03-05 20:49       ` Rob Veenker
2002-03-05 21:24         ` Darren New
2002-03-06 15:19         ` Ted Dennison
2002-03-05 21:31       ` Marin David Condic
2002-03-06 15:59         ` Ted Dennison
2002-03-06 17:23           ` Marin David Condic
2002-03-12 17:09           ` Dale Pontius
2002-03-16 10:21   ` ada to C++ translation Kevin Cline
2002-03-16 20:20     ` Robert A Duff
2002-03-08 17:52 ` John Tate
2002-03-08 15:46   ` Ted Dennison
2002-03-08 19:36     ` [off-topic] Web "designers" (was: ada to C++ translation) Wes Groleau
2002-03-08 22:41       ` Ted Dennison
2002-03-09  0:31         ` Gary Scott
2002-03-09  2:01         ` tmoran
2002-03-15 22:41     ` ada to C++ translation Ted Dennison
  -- strict thread matches above, loose matches on Subject: below --
2002-03-01  3:09 John Hayward
2002-03-01 13:54 ` Ira D. Baxter
2002-03-01 17:47   ` Jeffrey Carter
2002-03-01 19:48 ` 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