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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,73057f1a3ca11607 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!fu-berlin.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Is T an ancestor of T? Date: Wed, 20 Oct 2004 21:41:16 +0000 (UTC) Organization: GMUGHDU Message-ID: References: NNTP-Posting-Host: l1-hrz.uni-duisburg.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: a1-hrz.uni-duisburg.de 1098308476 8890 134.91.1.34 (20 Oct 2004 21:41:16 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Wed, 20 Oct 2004 21:41:16 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:5548 Date: 2004-10-20T21:41:16+00:00 List-Id: Bj�rn Persson wrote: : Georg Bauhaus wrote: : : Then I'd say "ancestor" is also clearly defined: "If a type T2 is a : descendant of a type T1, then T1 is called an ancestor of T2." So if T : is a descendant of T, then T is an ancestor of T. : So far so good. As a tree has a root at one and and trees at the other ends (so there is no end) the definition cannot be mirrored so to speak. :> However, :> "The ultimate ancestor of a type is the :> ancestor of the type that is not a descendant of any other type." : : The one ancestor that isn't a descendant of any type other than itself, : that is, the one that isn't derived, is the ultimate ancestor. At least : that's how I read that. Yes, I think that too, but I don't see it in either in the RM nor in the AARM sentences you quoted. (Which of course means I must be missing something.) : 10.b : A specific type is an ancestor of itself. o.K. : 10.c : Discussion: The terms root, parent, ancestor, and ultimate ancestor are : all related. For example: : : 10.d : * Each type has at most one parent, and one or more ancestor types; : each type has exactly one ultimate ancestor. So we know there is exactly one ultimate ancestor for each type T. If T is at the root of a derivation hierarchy of height 0, is there a named type that is the ultimate ancestor of T? Is it T? By 10.d I would say yes. By the last sentence of (10), the ultimate ancestor (T) "is not a descendant of any other type". So if T is the ultimate ancestor, it is not a descendant of T. Which it is by the first sentence of (10). I must be missing something. Specific types? Then if D is new T with ..., is T the ultimate ancestor of D? (Again I would agree that it is.) If T is the ultimate ancestor of T (and T is the ultimate ancestor of D if D had been defined), can GNAT be right when (T with n => 0) is accepted as an extension aggregate of specific type T? I still don't think so. (type T is tagged record n: Natural; end record;)