From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6a7cfec93e22adfc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-02 16:21:16 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: ada to C++ translation Date: 2 Mar 2002 16:21:16 -0800 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0203021621.ce5a579@posting.google.com> References: <3c81060d$1@giga.realtime.net> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1015114876 24804 127.0.0.1 (3 Mar 2002 00:21:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 3 Mar 2002 00:21:16 GMT Xref: archiver1.google.com comp.lang.ada:20702 Date: 2002-03-03T00:21:16+00:00 List-Id: "Ira D. Baxter" 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.