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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,e7f5eed426d6145 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-18 12:49:21 PST From: "Ira Baxter" Newsgroups: comp.lang.ada References: Subject: Re: C++ to Ada translator? Date: Wed, 18 Sep 2002 14:50:17 -0500 X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 NNTP-Posting-Host: t1-30.realtime.net Message-ID: <3d88d8bf$1@giga.realtime.net> X-Trace: giga.realtime.net 1032378559 t1-30.realtime.net (18 Sep 2002 14:49:19 -0500) Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!giga.realtime.net!not-for-mail Xref: archiver1.google.com comp.lang.ada:29126 Date: 2002-09-18T14:50:17-05:00 List-Id: We build custom translation tools as special cases of out genearlized compiler technology used for analysis and enhancement of large scale software systems. See http://www.semdesigns.com/Products/Services/LegacyMigration.html. We have Ada and C++ modules for our tools, although we have not paired these before. Another poster suggested that the "nature of the C++ code" would be lost. From a purist black and white point of view, probably true. From a practical point of view, perhaps not. C++ classes have decent analogs in Ada95, and so the basic translation seems feasible. Lots of icky details invariably show up. I'd guess type casts in C++ would be gruesome when converted to Ada, and pointer arithmetic truly ugly. Translating macros to something sensible is hard, but there's less macro stuff in C++ code than in C programs. Nasty assumptions about the nature of "strings" (zero terminated in C++) will also show up, probably as a String package coded in Ada to simulate Ada semantics, etc. The resulting code would be ... somewhat readable. (We've had pretty reasonable results with other langauge translations, such as JOVIAL to C, where the basic language concepts are quite similar. We do better than you might expect, copying comments, etc). I'm sure this will start a flame fest over readability. I'm not going to get into that, because the result depends on what a translator actually does. The issue of the OP, if he really needs translation, may be the driving factor. And I suspect the Ada community would much rather see C++ programs moving to Ada than the other way round, even if the answer isn't ideal :-} And these translators, even with our foundation tools and available front-end language modules, still aren't easy or cheap to produce. Just a hell of a lot more practical, if you insist on needing a translation, that lots of other approaches. -- Ira Baxter, Ph.D. CTO Semantic Designs www.semdesigns.com 512-250-1018 "Ivan Paniagua" wrote in message news:c560b18f.0209180558.58d495cc@posting.google.com... > I'm looking for a C++ to Ada translator. > > Can anybody help me? > > Thanks a lot. > Iv�n