comp.lang.ada
 help / color / mirror / Atom feed
* Smart compilers?
@ 1998-01-23  0:00 Fredrik Thoernblad
  1998-01-23  0:00 ` Robert Dewar
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Fredrik Thoernblad @ 1998-01-23  0:00 UTC (permalink / raw)



I thought that one reason for using specs and bodies was that when just
a body changed and not the spec there was no need to recompile anything
else than the body.
This feature seems to be overlooked by the compiler manufacturers.
At least with my compiler, verdix, and probably Rationals VADS as well,
haven't had time to try it that much.
Which ada compilers use this feature to reduce compile time?

Fredrik
(fredrik.thornblad@bfs.bofors.se)




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Smart compilers?
  1998-01-23  0:00 Smart compilers? Fredrik Thoernblad
@ 1998-01-23  0:00 ` Robert Dewar
  1998-01-23  0:00   ` Jean-Pierre Rosen
  1998-01-25  0:00 ` Gene Ouye
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Robert Dewar @ 1998-01-23  0:00 UTC (permalink / raw)



<<I thought that one reason for using specs and bodies was that when just
a body changed and not the spec there was no need to recompile anything
else than the body.
This feature seems to be overlooked by the compiler manufacturers.
At least with my compiler, verdix, and probably Rationals VADS as well,
haven't had time to try it that much.
Which ada compilers use this feature to reduce compile time?
>>

Absolutely ALL ada compilers take advantage of this. If you are having
trouble it is because of some misunderstanding of how to use the
compiler. FOr example, with most compilers it is necessarily to put
the body and spec in different files to get this advantage.

Also if you have pragma Inline's around, your compiler may optinoalloy
generate extra dependencies which may cause recompilation (if you think
about it, this is absolutely necessary). The same thing may happen
with generics in some circumstances.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Smart compilers?
  1998-01-23  0:00 ` Robert Dewar
@ 1998-01-23  0:00   ` Jean-Pierre Rosen
  1998-01-23  0:00     ` Nick Roberts
  1998-01-24  0:00     ` Larry A. Barowski
  0 siblings, 2 replies; 9+ messages in thread
From: Jean-Pierre Rosen @ 1998-01-23  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]



Robert Dewar a �crit dans le message ...
><<I thought that one reason for using specs and bodies was that when just
>a body changed and not the spec there was no need to recompile anything
>else than the body.
>This feature seems to be overlooked by the compiler manufacturers.
>At least with my compiler, verdix, and probably Rationals VADS as well,
>haven't had time to try it that much.
>Which ada compilers use this feature to reduce compile time?
>>>
>
>Absolutely ALL ada compilers take advantage of this. If you are having
>trouble it is because of some misunderstanding of how to use the
>compiler. FOr example, with most compilers it is necessarily to put
>the body and spec in different files to get this advantage.


There may be also another source of confusion; if you are using Grasp, it
seems that it saves all files from open windows before compiling, even those
that have not been changed. So if you have a window with the spec open, it
will change the time-stamp of the file, and you will recompile more than is
actually needed.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Smart compilers?
  1998-01-23  0:00   ` Jean-Pierre Rosen
@ 1998-01-23  0:00     ` Nick Roberts
  1998-01-24  0:00     ` Larry A. Barowski
  1 sibling, 0 replies; 9+ messages in thread
From: Nick Roberts @ 1998-01-23  0:00 UTC (permalink / raw)



I've always thought a neat hack in operating systems (file systems, to be
pedantic) would be for them to test a (small) file, when it is closed after
writes have taken place, to see whether anything has _actually_ been
changed (so it would have to do a read-compare-write for every write, yes),
and not update the m-time if nothing has.  These things keep me awake at
night, you know.  Maybe I need help!!! ;-)

-- 

Nick Roberts
Croydon, UK

Proprietor, ThoughtWing Software; Independent Software Development
Consultant
* Nick.Roberts@dial.pipex.com * Voicemail & Fax +44 181-405 1124 *
*** Always game for a verbal joust (usually as the turkey) ***


Jean-Pierre Rosen <rosen.adalog@wanadoo.fr> wrote in article
<6aaik2$2da$1@peuplier.wanadoo.fr>...
> There may be also another source of confusion; if you are using Grasp, it
> seems that it saves all files from open windows before compiling, even
those
> that have not been changed. So if you have a window with the spec open,
it
> will change the time-stamp of the file, and you will recompile more than
is
> actually needed.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Smart compilers?
  1998-01-23  0:00   ` Jean-Pierre Rosen
  1998-01-23  0:00     ` Nick Roberts
@ 1998-01-24  0:00     ` Larry A. Barowski
  1 sibling, 0 replies; 9+ messages in thread
From: Larry A. Barowski @ 1998-01-24  0:00 UTC (permalink / raw)



> 
> There may be also another source of confusion; if you are using Grasp, it
> seems that it saves all files from open windows before compiling, even those
> that have not been changed. So if you have a window with the spec open, it
> will change the time-stamp of the file, and you will recompile more than is
> actually needed.

    The UNIX/Linux version of GRASP temporarily saves
only modified files (modified since the last "save",
not the last compilation), so if you leave lots of
edited windows around without saving this will be a
problem. I'll see if I can change this to modified-since-
last-compilation for the next release.
    The PC version I'm not directly responsible for,
but I'll make sure it at worst only saves modified
files, if this is not already the case.

-Larry




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Smart compilers?
  1998-01-23  0:00 Smart compilers? Fredrik Thoernblad
  1998-01-23  0:00 ` Robert Dewar
@ 1998-01-25  0:00 ` Gene Ouye
  1998-01-26  0:00 ` Mats Weber
  1998-01-28  0:00 ` TConiam
  3 siblings, 0 replies; 9+ messages in thread
From: Gene Ouye @ 1998-01-25  0:00 UTC (permalink / raw)



Fredrik Thoernblad wrote:
> 
> I thought that one reason for using specs and bodies was that when just
> a body changed and not the spec there was no need to recompile anything
> else than the body.
> This feature seems to be overlooked by the compiler manufacturers.
> At least with my compiler, verdix, and probably Rationals VADS as well,
> haven't had time to try it that much.
> Which ada compilers use this feature to reduce compile time?
> 
> Fredrik
> (fredrik.thornblad@bfs.bofors.se)

Rational's Ada compilers and every other Ada compiler I can think of
makes use of this feature.  Others have already suggested possible
problems with your code, or perhaps you are inadvertantly doing
something that results in the extra compilation, or perhaps you are
seeing messages and inferring that things are happening when they are
not.

If you believe that your compiler really is doing somthing that it
should not be doing, send an example to me and I will look at it.

Gene Ouye <geneo@{my_company}.com>
(sorry for the games, I'm just sick of the spam -- {my_company} is
rational)




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Smart compilers?
  1998-01-23  0:00 Smart compilers? Fredrik Thoernblad
  1998-01-23  0:00 ` Robert Dewar
  1998-01-25  0:00 ` Gene Ouye
@ 1998-01-26  0:00 ` Mats Weber
  1998-01-28  0:00 ` TConiam
  3 siblings, 0 replies; 9+ messages in thread
From: Mats Weber @ 1998-01-26  0:00 UTC (permalink / raw)



Fredrik Thoernblad wrote:
> 
> I thought that one reason for using specs and bodies was that when just
> a body changed and not the spec there was no need to recompile anything
> else than the body.
> This feature seems to be overlooked by the compiler manufacturers.
> At least with my compiler, verdix, and probably Rationals VADS as well,

Verdix and Rational VADS is the same compiler. Rational bought Verdix a few
yers ago.

> haven't had time to try it that much.
> Which ada compilers use this feature to reduce compile time?

Most compilers do, including Verdix. But Verdix introduces additional program
units in an attempt to optimize the compilation of generics, and that
mechanism often goes wrong. I very often have to zap the library and recompile
everything from scratch to get a working executable. You can check if you are
in trouble by doing a.make -v twice, and if something gets compiled the second
time, it's best to zap the library.

I must say that in this case, GNAT's simple "one object file per unit" model
is a breath of fresh air. It does take a little longer to compile complicated
nested generics, but library corruption is totally gone.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Smart compilers?
  1998-01-23  0:00 Smart compilers? Fredrik Thoernblad
                   ` (2 preceding siblings ...)
  1998-01-26  0:00 ` Mats Weber
@ 1998-01-28  0:00 ` TConiam
  1998-01-28  0:00   ` Larry Kilgallen
  3 siblings, 1 reply; 9+ messages in thread
From: TConiam @ 1998-01-28  0:00 UTC (permalink / raw)



>I thought that one reason for using specs and bodies was that when just
>a body changed and not the spec there was no need to recompile anything
>else than the body.

This is true by definition, what many may have missed is the way several of the
new compilers deal with files.  Since there is no need for a central library
(as in Ada 83) many compilers read files as needed.  If you compile a body the
spec will be needed.  The compiler is actually avoiding the need to update a
central library database. 

 On the old Alsys 4.4.2 16-bit compiler for DOS our project rules stated that
we kill and recreate the library anytime we did a system-wide compile.  Our
250K SLOC system would compile in under 2 Hours on a 33MHz 386 with a new
library. With the library starting with the prior version, the compiler spent
so much time updating the library that it took 12-14 hours!
Todd Coniam       tconiam@aol.com




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Smart compilers?
  1998-01-28  0:00 ` TConiam
@ 1998-01-28  0:00   ` Larry Kilgallen
  0 siblings, 0 replies; 9+ messages in thread
From: Larry Kilgallen @ 1998-01-28  0:00 UTC (permalink / raw)



In article <19980128043301.XAA22999@ladder03.news.aol.com>, tconiam@aol.com (TConiam) writes:

>  On the old Alsys 4.4.2 16-bit compiler for DOS our project rules stated that
> we kill and recreate the library anytime we did a system-wide compile.  Our
> 250K SLOC system would compile in under 2 Hours on a 33MHz 386 with a new
> library. With the library starting with the prior version, the compiler spent
> so much time updating the library that it took 12-14 hours!

Using DEC's library-style Ada 83 compiler, I get about 12 minutes for
25K SLOC on an old library where everything is forced to be recompiled.
An example of a recent requirement to recompile everything is where
wording of the copyright statement was changed in every file.

Typical modifications to widely utilized packages compile in less than
20 seconds due to DEC's "smart recompilation" feature, since units that
refer to the modified package only get recompiled if they refer to the
part that got modified.  (I missed the beginning of this thread, and I
apologize if this capability has already been discussed.)

Larry Kilgallen




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1998-01-28  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-23  0:00 Smart compilers? Fredrik Thoernblad
1998-01-23  0:00 ` Robert Dewar
1998-01-23  0:00   ` Jean-Pierre Rosen
1998-01-23  0:00     ` Nick Roberts
1998-01-24  0:00     ` Larry A. Barowski
1998-01-25  0:00 ` Gene Ouye
1998-01-26  0:00 ` Mats Weber
1998-01-28  0:00 ` TConiam
1998-01-28  0:00   ` Larry Kilgallen

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