comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@attbi.com>
Subject: Re: Crosspost: Help wanted from comp.compilers
Date: Sat, 19 Jul 2003 05:25:37 GMT
Date: 2003-07-19T05:25:37+00:00	[thread overview]
Message-ID: <3F18D647.9020505@attbi.com> (raw)
In-Reply-To: 1058539398.178565@master.nyc.kbcfp.com

Hyman Rosen wrote:

> 10.1.4/5 says
>     When a compilation unit is compiled, all compilation units
>     upon which it depends semantically shall already exist in
>     the environment;
> 
> Where does it say that when a compilation unit is compiled all
> compilation units which depend on it must be recompiled?

It DOESN'T!  What you want is found in 10.2(27): "The implementation 
shall ensure that all compilation units included in a partition are 
consistent with one another, and are legal according to the rules of the 
language."

I won't go very deeply into why an environment is allowed to contain 
illegal units.  (It supports certain types of version control systems.) 
  But the result is that an environment may contain many mutually 
illegal compilation units.  The process of creating a partition (think 
linking) is only allowed to select a set of mutually legal and 
consistant units.

Now go back to 10.1.4(5), when you compile a compilation unit, "all 
compilation units on which it depends semantically shall already exist 
in the environment." So if you (successfully) recompile a unit on which 
another unit semantically depends, those two units are now mutually 
illegal.  How do you fix that?  You recompile the dependent unit.  Got it?

But why am I spending this effort responding to a troll?  I guess 
because I like to see this newsgroup as a resource for people learning 
Ada, or interested in learning it better.  And that requires some 
attempts to preserve the ability to get accurate answers here.

This is a very subtle area of the reference manual, because it 
simultaneously wants to allow the widest possible array of configuration 
management approaches, while having some very strict rules about 
consistancy of programs.  So environments are, as you will see if you 
read all of clause 10, welcome to contain inconsistant and illegal 
compilation units.  Partitions and programs are not.

So we went to a lot of effort to word this part of the manual so that an 
environment is not required to "throw away" compilation units, but the 
process of putting together a program or partition must do that weeding. 
  You can have two versions of a library unit in the environment, one 
old, one new, and two different main programs in the environment, where 
it is possible to construct legal partitions around these main programs 
one that contains the old version of the library unit, one that contains 
the new.  All that is intentional, and I do have some environments that 
I use that way.  (Multiple main programs with possibly mutually 
inconsistant subunits.  Usually the difference is that one set of 
library units is compiled with -gnata, the other without.)

-- 

                                                        Robert I. Eachus

�In an ally, considerations of house, clan, planet, race are 
insignificant beside two prime questions, which are: 1. Can he shoot? 2. 
Will he aim at your enemy?� -- from the Laiden novels by Sharon Lee and 
Steve Miller.




  reply	other threads:[~2003-07-19  5:25 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-15  5:46 Crosspost: Help wanted from comp.compilers John R. Strohm
2003-07-15 13:30 ` Hyman Rosen
2003-07-15 14:07   ` Larry Kilgallen
2003-07-15 21:02   ` John R. Strohm
2003-07-15 23:00     ` Robert I. Eachus
2003-07-16  1:52     ` Jeffrey Carter
2003-07-16  4:45       ` John R. Strohm
2003-07-16  3:21     ` Hyman Rosen
2003-07-16 17:15       ` Robert I. Eachus
2003-07-16 17:38         ` Larry Kilgallen
2003-07-16 18:04         ` Hyman Rosen
2003-07-16 21:05           ` John R. Strohm
2003-07-16 21:23             ` Hyman Rosen
2003-07-16 23:23               ` Marin David Condic
2003-07-17  1:39                 ` Hyman Rosen
2003-07-17 12:25                   ` Marin David Condic
2003-07-17  1:48               ` Randy Brukardt
2003-07-17  2:06                 ` Hyman Rosen
2003-07-17  6:44                   ` tmoran
2003-07-17  7:59                     ` Hyman Rosen
2003-07-17 18:02                       ` tmoran
2003-07-19 16:51                     ` Richard Riehle
2003-07-20 10:38                       ` Marin David Condic
2003-07-22 20:29                     ` Simon Wright
2003-07-17  8:37                   ` tmoran
2003-07-17 14:10                     ` Larry Kilgallen
2003-07-17 18:02                       ` tmoran
2003-07-17 18:14                         ` Larry Kilgallen
2003-07-17 19:29                         ` Robert A Duff
2003-07-17 13:12                   ` Frank J. Lhota
2003-07-17 13:33                     ` Hyman Rosen
2003-07-17  4:29               ` John R. Strohm
2003-07-17  4:58                 ` Hyman Rosen
2003-07-17  6:44                   ` tmoran
2003-07-17  7:50                     ` Hyman Rosen
2003-07-17 18:02                       ` tmoran
2003-07-17 18:14                         ` Ed Falis
2003-07-17 18:35                           ` David C. Hoos
2003-07-17 19:13                             ` Ed Falis
2003-07-17 19:24                           ` Robert A Duff
2003-07-17 19:39                             ` Ed Falis
2003-07-17 20:20                               ` Robert A Duff
2003-07-17 20:31                                 ` Ed Falis
2003-07-17 19:40                           ` tmoran
2003-07-17 19:47                             ` Ed Falis
2003-07-17 21:23                               ` tmoran
2003-07-17 22:38                                 ` Ed Falis
2003-07-17  6:46                   ` Lutz Donnerhacke
2003-07-17  9:50                   ` Preben Randhol
2003-07-17 21:45                     ` Hyman Rosen
2003-07-18  1:22                       ` John R. Strohm
2003-07-18  3:15                         ` Hyman Rosen
2003-07-18  6:18                           ` John R. Strohm
2003-07-18 14:43                             ` Hyman Rosen
2003-07-19  5:25                               ` Robert I. Eachus [this message]
2003-07-20 14:42                                 ` Hyman Rosen
2003-07-20 18:46                                   ` Chad R. Meiners
2003-07-21 15:37                                     ` Hyman Rosen
2003-07-21 17:59                                       ` Chad R. Meiners
2003-07-20 23:06                                   ` Robert I. Eachus
2003-07-21 15:14                                     ` Hyman Rosen
2003-07-21 20:11                                       ` Robert I. Eachus
2003-07-22  2:19                                         ` Hyman Rosen
2003-07-22  4:54                                           ` John R. Strohm
2003-07-22  5:02                                           ` Robert I. Eachus
2003-07-22 11:53                                             ` Marin David Condic
2003-07-22 17:58                                             ` Randy Brukardt
2003-07-22 19:16                                             ` Hyman Rosen
2003-07-23  7:20                                               ` Vinzent Hoefler
2003-07-23 14:27                                                 ` Hyman Rosen
2003-07-23 15:08                                                   ` Vinzent Hoefler
2003-07-21 16:00                                     ` tmoran
2003-07-21 23:54                                       ` Robert I. Eachus
2003-07-18 11:31                           ` Larry Kilgallen
     [not found]                           ` <bf83qt$ju3@library2.airnews.netOrganization: LJK Software <lSNU7JdZau5p@eisner.encompasserve.org>
2003-07-18 14:43                             ` Robert I. Eachus
2003-07-18 11:28                         ` Larry Kilgallen
2003-07-16 23:14             ` Marin David Condic
2003-07-17  4:08               ` John R. Strohm
2003-07-17  9:42         ` Preben Randhol
2003-07-18 17:18           ` Robert I. Eachus
2003-07-18 17:42             ` Hyman Rosen
2003-07-15 21:59   ` Christopher Browne
replies disabled

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