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,32cfbb718858528b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-07 20:19:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!wn3feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: <3D002D11.CC706952@adaworks.com> <4519e058.0206071148.9b87acf@posting.google.com> <3D0116F3.7254E263@despammed.com> Subject: Re: Commercial C To Ada 95 compiler X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc51.ops.asp.att.net 1023506359 12.225.227.101 (Sat, 08 Jun 2002 03:19:19 GMT) NNTP-Posting-Date: Sat, 08 Jun 2002 03:19:19 GMT Organization: AT&T Broadband Date: Sat, 08 Jun 2002 03:19:19 GMT Xref: archiver1.google.com comp.lang.ada:25495 Date: 2002-06-08T03:19:19+00:00 List-Id: "Wes Groleau" wrote in message news:3D0116F3.7254E263@despammed.com... > [snip] > A direct translation to Ada will reveal > some bugs at compile time. And the developers > are looking at a language they can read > when they fix those bugs. I disagree. A direct translation to Ada should not reveal any bugs at compile time. In fact it should replicate memory leaks and errant pointers. If it doesn't do so, it is not a direct translation. If C coding errors are translated directly to Ada, the error should be reproduced. However looking at the code that is generated, the error in the source may be obvious if reviewed by a human reader. For example, the C code: for( i = 0 ; i < 10 ; i++ ); { printf( "%d\n", i ); } Should be directly translated to: i : Integer; i := 0; while i < 10 loop i := i + 1; end loop; Ada.Integer.Text_Io.Put( i ); Ada.Text_Io.New_Line; bug and all. To do anything else would not be a direct translation. Once the code has been translated these sort of problems are easy to spot with code walk-thrus. A translator also may be set up do report potential problem areas. In my experince with Pascal to Ada translation, no bugs showed up as a result of direct translation. Bugs only showed up because of incomplete translation and in cases where I refined the code by hand to permit the compiler to make more checks. SteveD > Other bugs will appear as the developers > improve things in the process of working > on the code. > > -- > Wes Groleau > http://freepages.rootsweb.com/~wgroleau