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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b51f5cdf0bd6c5a5,start X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,9d70997ff2ae4301 X-Google-Attributes: gid109fba,public From: Richard Riehle Subject: Re: Ada to C++ Date: 1996/05/19 Message-ID: #1/1 X-Deja-AN: 155619514 references: <319C22D2.608F@ix.netcom.com> <319CF01A.2B86@servtech.com> to: Wayne Lawton cc: Jeff Pimper content-type: TEXT/PLAIN; charset=US-ASCII organization: National University, San Diego mime-version: 1.0 newsgroups: comp.lang.c++,comp.lang.ada Date: 1996-05-19T00:00:00+00:00 List-Id: On Fri, 17 May 1996, Wayne Lawton wrote: > Jeff Pimper wrote: > > > > I work at Lawrence Livermore National Laboratory where I have been made > > responsible for a large Ada code which runs on Open VMS Alphas and uses > > both Motif and Sherrill-Lubinsky's Graphic Management System. I have > > been asked to port to the code to HP machines running Unix. One option > > is to just port the Ada code, assuming I can find bindings for Motif > > and GMS. > > Ada bindings to Motif are reasonably available. Quality of bindings are another story. > > > > >Unfortunately this is an old program with lots of obsolete > > legacy code which should be deleted or at least rewritten. > > > > The other option is to translate the code to C++, which would make the > > code both easier and cheaper to maintain in the future. Gasp! This is patently untrue. Ada 95 will provide a vastly better environment for long-term maintenance than C++. > >Please, no religious wars. There are studies which prove the statement both ways. Every reputable study has demonstrated that one of Ada's stongest virtues is maintainability. The Ada 95 standard provides an even stronger model for maintainability. It significantly improves over the somewhat flimsy, and definitely fragile model of C++. > If you have not researched the area specifically, I would recommend that you do so. Do not simply > accept common wisdom unilaterally. And what is the common wisdom? > >Does anyone know > > of any tools to aid this translation? Like an Ada to C++ translator, > > some sort of case tool, or anything else? There is no need to do this. Plus, it will be more expensive than simply moving your code to Ada 95 and taking advantage of the upward compatibility of Ada 95 with Ada 83. > >There are several case tools that can provide some form of Ada reverse engineering followed by > forward engineering C++. I have worked with both Paradigm Plus (by protosoft) and Rational > Software's tools for several years with mixed results. > > The difficult problem to solve is that any given code is only the implementation of a design that > was created with the language in mind (to a lesser or greater extent). Consequently, there are > often design decisions made that reflect a specific languages capabilities. Common idioms in Ada > are simply unavailable in C++, and vice versa. Anything you can do in C++ can be done in Ada 95. The correct choice is to simply acquire an Ada 95 compiler, re-do that part of the design you think is in need of improvement. Furthermore, simply translating the code to C++ would buy you nothing. You will still be stuck with the original design. What you probably need to do is reassess the architectural design, and then make the changes you deem necessary. Under no circumstances is it appropriate to do an automatic translation to C++. That will just buy you even more trouble than you already have. > >My management is more > > concerned with time than with immediate expense. > > If this is the case, I would highly recommend contracting several VERY senior software engineers. > > You're fastest, highest quality results will come from senior engineers that have 5+ years working > with both languages. They will also have the ability to put language wars aside and concentrate > on the job at hand. OK. But be sure they are not still stuck in Ada 83. The new Ada 95 standard is a fully object-oriented ISO/ANSI standard (which C++ still is not) and significantly raises the ante. It is an improvement over both Ada 83 and C++. > > > > Any help would be most appreciated. > > > > Jeff Pimper > > pimper1@llnl.gov > > > My thoughts only. Based on 16 years experience. 13 with Ada. 5 with C++. Currently both. > > Wayne R. Lawton > WLawton@servtech.com > >