comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: Interested about number crunching in Ada
Date: Fri, 17 Aug 2007 23:42:04 GMT
Date: 2007-08-17T23:42:04+00:00	[thread overview]
Message-ID: <gnqxi.438468$p47.22540@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: 46c54d1a$1_5@news.bluewin.ch

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 <gautier@fakeaddress.nil> 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
>
><<In no sense does GNAT translate your Ada code into C code.>>
>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!




  reply	other threads:[~2007-08-17 23:42 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-16  3:42 Interested about number crunching in Ada holst
2007-08-16  6:43 ` Nasser Abbasi
2007-08-16  9:16   ` Colin Paul Gloster
2007-08-17  9:43   ` Jerry
2007-08-16 11:17 ` anon
2007-08-16 18:59   ` Gautier
2007-08-17  4:44     ` anon
2007-08-17  7:24       ` Gautier
2007-08-17 23:42         ` anon [this message]
2007-08-18 11:22           ` Gautier
2007-08-18 11:40           ` Markus E.L. 2
2007-08-20 22:31             ` To Markus anon
2007-08-17  8:23       ` Interested about number crunching in Ada Markus E.L. 2
2007-08-17  9:01       ` Stuart
2007-08-17  9:39         ` Martin Krischik
2007-08-18  0:47         ` anon
2007-08-18 11:58           ` Markus E.L. 2
2007-08-19  6:43             ` anon
2007-08-19 16:14               ` Markus E.L. 2
2007-08-19 16:23               ` Markus E.L. 2
2007-08-20  8:46           ` Stuart
2007-08-21  1:06             ` Randy Brukardt
2007-08-21  1:28             ` Gary Scott
2007-08-21  8:14               ` History of Ada - was " Stuart
2007-08-22  7:13                 ` anon
2007-08-23 11:24                   ` Stuart
2007-08-23 21:51                     ` Gautier
2007-08-24 13:04                       ` History of Ada - and about the NYU DOS version anon
2007-08-24 16:25                         ` Georg Bauhaus
2007-08-25 11:49                           ` History of Ada - to answer your question anon
2007-11-02 13:51                         ` History of Ada - and about the NYU DOS version adaworks
2007-08-17  1:24   ` Interested about number crunching in Ada Gary Scott
2007-08-16 22:55 ` Jerry
2007-08-17  9:21 ` Nasser Abbasi
2007-08-17  9:52   ` Jerry
2007-08-17 14:35     ` Gautier
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox