From: jgv@swl.msd.ray.com (John Volan)
Subject: Elaboration order [was: cross linking packages]
Date: Mon, 5 Dec 1994 20:57:53 GMT
Date: 1994-12-05T20:57:53+00:00 [thread overview]
Message-ID: <D0CvKI.I3K@swlvx2.msd.ray.com> (raw)
In-Reply-To: 3bj0br$mri@network.ucsd.edu
dewar@cs.nyu.edu (Robert Dewar) writes:
>Matt a brief answer to your question is that order of elaboration of
>types is critical, and in particular if package a with's package b,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>it is essential that the spec of b be elaborated before the spec of a.
Did you mean to say:
(1) "if the *spec* of package A with's package B, then the spec of B
must be elaborated before the spec of A"
or did you mean:
(2) "if package A (anywhere, either in its spec or its body) with's
package B, then the spec of B must be elaborated before the spec of A"
Without hunting through the RM9X for a relevant chapter and verse, it
seems to me that Ada only requires (1) to be enforced. If (2) were
the case, then it would be impossible to have "mutually-coupled"
packages, where the bodies of A and B both "with" each other's specs.
But clearly this is allowed. (Moreover, it seems to work very nicely
in GNAT.) Of course, the spec of A must be elaborated before the body
of B, and the spec of B must be elaborated before the body of A. But
does Ada require any ordering of the elaborations of the two bodies?
Or perhaps I should ask, under what circumstances would Ada require
a particular order of elaboration between two package bodies?
-- John Volan
--------------------------------------------------------------------------------
-- Me : Person := (Name => "John Volan",
-- Company => "Raytheon Missile Systems Division",
-- E_Mail_Address => "jgv@swl.msd.ray.com",
-- Affiliation => "Enthusiastic member of Team Ada!",
-- Humorous_Disclaimer => "These opinions are undefined " &
-- "by my employer and therefore " &
-- "any use of them would be " &
-- "totally erroneous.");
--------------------------------------------------------------------------------
next prev parent reply other threads:[~1994-12-05 20:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-11-28 12:56 cross linking packages Rene Burema
1994-11-29 18:28 ` Norman H. Cohen
1994-11-29 22:07 ` Robert Dewar
1994-11-30 16:33 ` David Weller
1994-12-01 13:44 ` Robert I. Eachus
1994-11-30 23:03 ` Matt Kennel
1994-12-02 14:30 ` Norman H. Cohen
1994-12-05 20:57 ` John Volan [this message]
1994-12-06 16:11 ` Elaboration order [was: cross linking packages] Robert Dewar
1994-12-05 13:30 ` cross linking packages John Volan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox