From rybin@possum.srcc.msu.su Fri Feb 6 05:37:55 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id FAA05065; Fri, 6 Feb 1998 05:37:54 -0500 Received: from mail.acm.org (mail.acm.org [199.222.69.4]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id FAA15194 for ; Fri, 6 Feb 1998 05:39:10 -0500 (EST) Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us [199.75.54.2]) by mail.acm.org (8.8.5/8.7.5) with ESMTP id FAA92378; Fri, 6 Feb 1998 05:38:25 -0500 Received: from gw-srcc.gamma.ru by sw-eng.falls-church.va.us (8.8.8/) id KAA05453; Fri, 6 Feb 1998 10:35:08 GMT Received: from srcc.UUCP (uucp@localhost) by gw-srcc.gamma.ru (8.8.5/8.8.5) with UUCP id NAA05634 for asis-comment@sw-eng.falls-church.va.us; Fri, 6 Feb 1998 13:38:40 +0300 (MSK) Received: by gamma.srcc.msu.su; Fri, 6 Feb 1998 13:37:34 +0300 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Fri, 6 Feb 1998 13:39:48 +0300 To: asis-comment@sw-eng.falls-church.va.us Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Fri, 6 Feb 98 13:39:48 +0300 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Corresponding_Expression_Type: what does unwinding of subtyping/deriving mean here? Lines: 27 Content-Length: 1055 Status: OR Section 17.1 (function Corresponding_Expression_Type) says: -- Returns the type_declaration for the type of the expression. This query -- does not "unwind" subtypes or derived types to get to the -- Corresponding_First_Subtype or Corresponding_Parent_Subtype declarations. Two questions: 1. What does "ubwinding subtypes" mean here? suppose we have type Int is range -10_000 .. 10_000 subtype Sub_Int is Int range -10 .. 10; Var : Sub_Int; What should be returned as Corresponding_Expression_Type for Sub_Int - the Element representing the declaration of type Int (but this would look like unwinding subtyping) or the declaration of subtype Sub_Int (this would look more logical and useful for applications, but this would contradict with "Returns the type_declaration for the type of the expression" ^^^^^^^^^^^^^^^^ 2. What unwinding derived types mean here? ^^^^^^^ If you unwind _derived_ types (opposite to unvinding subtyping), you change the type. Sergey From roby Thu Feb 12 18:16:51 1998 Return-Path: Received: by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id SAA22495; Thu, 12 Feb 1998 18:16:50 -0500 From: roby (Clyde Roby) Message-Id: <199802122316.SAA22495@cronus.csed.ida.org> Subject: Re: Corresponding_Expression_Type: what does unwinding of subtyping/deriving mean here? To: rybin@possum.srcc.msu.su (Sergey I. Rybin) Date: Thu, 12 Feb 1998 18:16:50 -0500 (EST) Cc: roby (Clyde Roby), Colket@ACM.Org (Currie Colket), ASIS-Comment@SW-Eng.Falls-Church.Va.US (ASIS-Comment) In-Reply-To: from "Sergey I. Rybin" at Feb 6, 98 01:39:48 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1891 Status: OR Sergey, > Section 17.1 (function Corresponding_Expression_Type) says: > > -- Returns the type_declaration for the type of the expression. This query > -- does not "unwind" subtypes or derived types to get to the > -- Corresponding_First_Subtype or Corresponding_Parent_Subtype declarations. > > Two questions: > > 1. What does "unwinding subtypes" mean here? suppose we have > > type Int is range -10_000 .. 10_000 > subtype Sub_Int is Int range -10 .. 10; > Var : Sub_Int; > > What should be returned as Corresponding_Expression_Type for Sub_Int - > the Element representing the declaration of type Int (but this would look > like unwinding subtyping) or the declaration of subtype Sub_Int > (this would look more logical and useful for applications, but this > would contradict with "Returns the type_declaration for the type of > ^^^^^^^^^^^^^^^^ > the expression" Sub_Int should be returned. We are proposing to change the phrase: "Returns the type_declaration for the type of the expression." to: "Returns the type declaration for the type or subtype of the expression." so that we are more precise. Perhaps clearer wording can be used. Are you happy with this proposed change? > 2. What does unwinding derived types mean here? > ^^^^^^^ > If you unwind _derived_ types (opposite to unwinding subtypes), you > change the type. Perhaps this should be stated more clearly, too. Suppose we have: type Int is range -5_000 .. 5_000; type My_Int is new Int; type Good_Int is new My_Int; Var : Good_Int; Similarly to the example in the first question above, the type declaration for Good_Int should be returned. The "unwinding" should not occur. The type declaration for either My_Int or Int should not be returned in this example. Clyde and Currie From rybin@gnat.com Fri Feb 13 10:10:52 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id KAA24245; Fri, 13 Feb 1998 10:10:52 -0500 Received: from lglsun11.epfl.ch (root@lglsun11.epfl.ch [128.178.76.29]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id KAA16969 for ; Fri, 13 Feb 1998 10:11:58 -0500 (EST) Received: from lglsun4.epfl.ch (lglsun4 [128.178.76.9]) by lglsun11.epfl.ch (8.8.X/EPFL-8.1a) with ESMTP id QAA12374; Fri, 13 Feb 1998 16:10:57 +0100 (MET) Received: from lglsun4 (localhost [127.0.0.1]) by lglsun4.epfl.ch (8.8.X/EPFL-8.1a) with SMTP id QAA04124; Fri, 13 Feb 1998 16:10:26 +0100 (MET) Sender: rybin@lglsun11.epfl.ch Message-ID: <34E46243.3CF9@gnat.com> Date: Fri, 13 Feb 1998 16:09:55 +0100 From: Sergey Rybin Organization: Ada Core Technologies X-Mailer: Mozilla 3.04Gold (X11; I; SunOS 5.5.1 sun4u) MIME-Version: 1.0 To: Clyde Roby CC: "Sergey I. Rybin" , Currie Colket , ASIS-Comment Subject: Re: Corresponding_Expression_Type: what does unwinding of subtyping/deriving mean here? References: <199802122316.SAA22495@cronus.csed.ida.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2061 Status: OR Clyde Roby wrote: > > We are proposing to change the phrase: > > "Returns the type_declaration for the type of the expression." > > to: > > "Returns the type declaration for the type or subtype > of the expression." > > so that we are more precise. Perhaps clearer wording can be used. > Are you happy with this proposed change? Not completely - "the type declaration for the ... subtype" sounds strange. I am afraid, that we have to say something like this here: "returns the type or subtype declaration, which defines the (sub)type of the expression. An implementation is encouraged, but not required to return the subtype declaration defining the exact subtype of the expression, otherwise it should return the type declaration" Suppose we have for I in 1 .. 10 loop ... It to return the definition of the SUBtype of I, we need A_Loop_Parameter_Specification element. What would be better in this case to have as the result of Corresponding_Expression_Type - this A_Loop_Parameter_Specification element or An_Ordinary_Type_Declaration element representing the declaration of the predefined Integer type? Another example: suppose we have some function call - what would we like to see as its Corresponding_Expression_Type: a type or a subtype declaration? > > > 2. What does unwinding derived types mean here? > > ^^^^^^^ > > If you unwind _derived_ types (opposite to unwinding subtypes), you > > change the type. > > Perhaps this should be stated more clearly, too. Suppose we have: > > type Int is range -5_000 .. 5_000; > type My_Int is new Int; > type Good_Int is new My_Int; > Var : Good_Int; > > Similarly to the example in the first question above, the type > declaration for Good_Int should be returned. The "unwinding" should > not occur. The type declaration for either My_Int or Int should not > be returned in this example. I would just get rid of all the wording related to unwinding derivations in the documentation of this query. Sergey From dewar@gnat.com Fri Feb 13 10:14:39 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id KAA24253; Fri, 13 Feb 1998 10:14:38 -0500 Received: from nile.gnat.com (NILE.GNAT.COM [205.232.38.5]) by cs.ida.org (8.8.7/8.8.7) with SMTP id KAA17047 for ; Fri, 13 Feb 1998 10:15:54 -0500 (EST) Received: by nile.gnat.com (5.0/1.20) id AA25181; Fri, 13 Feb 98 10:14:56 EST Date: Fri, 13 Feb 98 10:14:56 EST From: dewar@gnat.com (Robert Dewar) Message-Id: <9802131514.AA25181@nile.gnat.com> To: roby@ida.org, rybin@gnat.com Subject: Re: Corresponding_Expression_Type: what does unwinding of subtyping/deriving mean here? Cc: ASIS-Comment@sw-eng.falls-church.va.us, Colket@acm.org, rybin@possum.srcc.msu.su Content-Length: 348 Status: OR <> Why? All type declarations introduce a subtype name. I agree that Ada has odd usage for type and subtype, but that is an absolutely standard oddity. type x is range 1 .. 10; introduces a subtype name x. From rybin@gnat.com Fri Feb 13 11:09:30 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id LAA24666; Fri, 13 Feb 1998 11:09:29 -0500 Received: from lglsun11.epfl.ch (root@lglsun11.epfl.ch [128.178.76.29]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id LAA18630 for ; Fri, 13 Feb 1998 11:10:44 -0500 (EST) Received: from lglsun4.epfl.ch (lglsun4 [128.178.76.9]) by lglsun11.epfl.ch (8.8.X/EPFL-8.1a) with ESMTP id RAA12772; Fri, 13 Feb 1998 17:10:20 +0100 (MET) Received: from lglsun4 (localhost [127.0.0.1]) by lglsun4.epfl.ch (8.8.X/EPFL-8.1a) with SMTP id RAA04198; Fri, 13 Feb 1998 17:09:48 +0100 (MET) Sender: rybin@lglsun11.epfl.ch Message-ID: <34E4702E.11D1@gnat.com> Date: Fri, 13 Feb 1998 17:09:18 +0100 From: Sergey Rybin Organization: Ada Core Technologies X-Mailer: Mozilla 3.04Gold (X11; I; SunOS 5.5.1 sun4u) MIME-Version: 1.0 To: Robert Dewar CC: roby@ida.org, ASIS-Comment@sw-eng.falls-church.va.us, Colket@acm.org, rybin@possum.srcc.msu.su Subject: Re: Corresponding_Expression_Type: what does unwinding of subtyping/deriving mean here? References: <9802131514.AA25181@nile.gnat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 514 Status: OR Robert Dewar wrote: > > < strange. > I am afraid, that we have to say something like this here: > >> > > Why? All type declarations introduce a subtype name. > > I agree that Ada has odd usage for type and subtype, but that is > an absolutely standard oddity. > > type x is range 1 .. 10; > > introduces a subtype name x. I agree, we may just follow RM here, instead of introducing a new level of "explanations about explanations" Sergey From roby@ida.org Tue Feb 24 16:56:52 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id QAA17681; Tue, 24 Feb 1998 16:56:51 -0500 Received: from mail.acm.org (mail.acm.org [199.222.69.4]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id QAA05481 for ; Tue, 24 Feb 1998 16:58:05 -0500 (EST) Received: from cs.ida.org (cs.ida.org [129.246.101.11]) by mail.acm.org (8.8.5/8.7.5) with ESMTP id QAA44468; Tue, 24 Feb 1998 16:56:00 -0500 Received: from cronus.csed.ida.org (cronus.csed.ida.org [129.246.83.36]) by cs.ida.org (8.8.7/8.8.7) with SMTP id QAA05452; Tue, 24 Feb 1998 16:57:25 -0500 (EST) Received: by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id QAA17677; Tue, 24 Feb 1998 16:56:08 -0500 From: roby@ida.org (Clyde Roby) Message-Id: <199802242156.QAA17677@cronus.csed.ida.org> Subject: Re: Corresponding_Expression_Type: what does unwinding of subtyping/deriving mean here? To: Rybin@GNAT.Com (Sergey Rybin), Dewar@GNAT.Com (Robert Dewar) Date: Tue, 24 Feb 1998 16:56:08 -0500 (EST) Cc: ClydeRoby@ACM.Org (Clyde Roby at ACM), Colket@ACM.Org (Currie Colket at ACM) In-Reply-To: from "Sergey I. Rybin" at Feb 6, 98 01:39:48 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1891 Status: OR Sergey, > Section 17.1 (function Corresponding_Expression_Type) says: > > -- Returns the type_declaration for the type of the expression. This query > -- does not "unwind" subtypes or derived types to get to the > -- Corresponding_First_Subtype or Corresponding_Parent_Subtype declarations. > > Two questions: > > 1. What does "unwinding subtypes" mean here? suppose we have: > > type Int is range -10_000 .. 10_000 > subtype Sub_Int is Int range -10 .. 10; > Var : Sub_Int; > > What should be returned as Corresponding_Expression_Type for Sub_Int - > the Element representing the declaration of type Int (but this would look > like unwinding subtyping) or the declaration of subtype Sub_Int > (this would look more logical and useful for applications, but this > would contradict with "Returns the type_declaration for the type of the > ^^^^^^^^^^^^^^^^ > expression" In our original response, we said that "Sub_Int" should be returned. We had also proposed to change the phrase: "Returns the type_declaration for the type of the expression." to: "Returns the type_declaration for the type or subtype of the expression." However, after further email discussion with you and Robert Dewar, we think that there should be no change to that phrase. This is based upon the fact that all Ada type declarations introduce a subtype name -- as Robert said, "an absolutely standard oddity". > 2. What unwinding derived types mean here? > ^^^^^^^ > If you unwind _derived_ types (opposite to unwinding subtyping), you > change the type. As you suggested, we should get rid of the phrasing related to "unwinding" subtypes or derived types. Thus, we are proposing to remove the sentence "This query ... declarations." Do you or Robert have any further comments? Clyde (and Currie) From rybin@possum.srcc.msu.su Wed Feb 25 02:15:22 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id CAA18225; Wed, 25 Feb 1998 02:15:22 -0500 Received: from gw-srcc.gamma.ru (gw-srcc.gamma.ru [158.250.39.18]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id CAA11638 for ; Wed, 25 Feb 1998 02:16:35 -0500 (EST) Received: from srcc.UUCP (uucp@localhost) by gw-srcc.gamma.ru (8.8.5/8.8.5) with UUCP id KAA23697; Wed, 25 Feb 1998 10:16:11 +0300 (MSK) Received: by gamma.srcc.msu.su; Wed, 25 Feb 1998 10:14:45 +0300 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Wed, 25 Feb 1998 09:52:16 +0300 To: Dewar@gnat.com, roby@ida.org Cc: ClydeRoby@ACM.Org, Colket@ACM.Org References: <199802242156.QAA17677@cronus.csed.ida.org> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Wed, 25 Feb 98 09:52:16 +0300 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: Corresponding_Expression_Type: what does unwinding of subtyping/deriving mean here? Lines: 7 Content-Length: 96 Status: OR > Do you or Robert have any further comments? > > Clyde (and Currie) No, I do not. Sergey