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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c3d0e99376a4f379 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn11feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Interested about number crunching in Ada Reply-To: anon@anon.org (anon) References: <1187235764.909133.180650@19g2000hsx.googlegroups.com> <46c49e6e$1_6@news.bluewin.ch> <46c54d1a$1_5@news.bluewin.ch> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Fri, 17 Aug 2007 23:42:04 GMT NNTP-Posting-Host: 12.64.152.229 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1187394124 12.64.152.229 (Fri, 17 Aug 2007 23:42:04 GMT) NNTP-Posting-Date: Fri, 17 Aug 2007 23:42:04 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:1477 Date: 2007-08-17T23:42:04+00:00 List-Id: As for GNAT converting Ada to C. Try looking at a number of papers of the net on GNAT Ada and also how to write a Frontend compiler for gnu's gcc c compiler. Also, for a direct proof take a look at the C coded procedure called 'gigi' in file "trans.c" in GCC-4.x Ada source packages. The 'gigi" procedure is called from the procedure "Call_Back_End" in file "Back_End.adb". Gnat uses it converts the C (ada tree) tree and generates the assembly code and finally the object code. This is the structure of all GCC type compilers that use GCC as a backend. And there are a number of papers at GNU on this. >From GNAT Documentation: The GIGI procedure is defined as Gnat-To-Gnu. And if you dump each step of the GNAT to object as I stated (see previous post) you can use a gcc or other gnu compilers to continue compiling the code. If building a new version of GNAT once the make process starts build the GNAT compiler it compile the "GNAT1DRV.ADB" and assoc files. Renames the file as GNAT1[.ext] then uses this file to compile the update system. This is because the old installed system may not understand the new features such as an installed non-Ada 2005 compiler trying to compile a new Ada 2005 compiler. But the GNAT1 program only outs assembly code and the assoc ALI file. Then make process must use the "gcc" or "as" to build the object file. After which the make uses the installed "GNATBIND" and then either the gcc linker directly or uses installed "GNATLINK" which calls gcc ln. >As for HP Ada, I don't care about politics, only about performance :-). Well if HP's Ada performance is like TI's PASCAL. It depends on how the system is configured. And if someone alters that system configuration your performance may be altered as well. Politics for computer is money and that still rules the world. It should not but it does. Ad since a programmers job may depend upon it, the programmers must have to know and have to play politics or have to know how to side step it without losing one job. And most programmer who are into "Performance" do spends a few hours to weeks in checking this out before accepting which OS and partition is best and why for them. This is because there is no true absolute system or partition that has perfect "Performance", every partition and OS has its pluses and minuses for performance. And if it is Dynamic like in the case of TI's PASCAL, then the performance may be a ghost type of performance which may cost you later in other ways. And this lesson is never taught in intro computer classes but is learned the HARD WAY! >- F2A is not a Fortran preprocessor for using Ada as the back end; you use it >once and forget the Fortran code, and continue developing the Ada source. >At the end, you have one step. Sorry... I guess you have never tried to increase a codes performance. To prove each step you must start with the original code every time. In the F2A that is, the FORTRAN code. And sometime to increase a codes performance you may need to alter the FORTRAN code which has some documentation and then test it, first. Because for functionally both the FORTRAN and Ada codes must yield the correct results. Both in performance and output. In <46c54d1a$1_5@news.bluewin.ch>, Gautier writes: >anon wrote: > >> As for F2A: >> >> Language converts are nice but in the GNU series they may add useless >> code because of the number of steps take to convert the code from the >> source to object code. >> >> An example: > >... > >> GNAT -- to --> C then using GCC -- to --> asm >> asm then using GCC -- to --> object > ><> >Robert Dewar >Ada Core Technologies (found in groups.google.com) > >> F2A -- to --> Ada then using GNAT -- to --> C >> C using GCC -- to --> asm >> asm then using GCC -- to --> object > >- The "step" asm to machine code in the object is trivial, asm is just a >human-readable writing for the machine code; no transformation there. >- The GNAT-to-C exists only in your imagination. >- F2A is not a Fortran preprocessor for using Ada as the back end; you use it >once and forget the Fortran code, and continue developing the Ada source. >At the end, you have one step. Sorry... > >As for I/O, apart the LOW_LEVEL_IO you mention (never seen before!), the usual >Text_IO, Direct_IO, Sequential_IO are perfectly compatible from Ada 83 through >Ada 2005. Ada 95's Stream_IO works in Ada 2005 (would you expect the reverse >?). Conversely, a SGI Fortran has slightly different I/O than a Lahey Fortran >and DEC/HP Fortran is still a bit different on that point. The situation is >just the reverse that you imagine. > >As for HP Ada, I don't care about politics, only about performance :-). >______________________________________________________________ >Gautier -- http://www.mysunrise.ch/users/gdm/index.htm >Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm > >NB: For a direct answer, e-mail address on the Web site!