From rybin@possum.srcc.msu.su Thu Mar 6 03:51:13 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id DAA19482; Thu, 6 Mar 1997 03:51:12 -0500 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA03633; Thu, 6 Mar 97 03:51:42 EST Received: from crocus.gamma.ru by sw-eng.falls-church.va.us (8.7.1/) id IAA23065; Thu, 6 Mar 1997 08:45:15 GMT Received: from srcc.UUCP (uucp@localhost) by crocus.gamma.ru (8.7.6/8.7.3) with UUCP id LAA11217 for asis-comment@sw-eng.falls-church.va.us; Thu, 6 Mar 1997 11:47:54 +0300 (MSK) Received: by gamma.srcc.msu.su; Thu, 6 Mar 1997 11:47:29 +0300 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Thu, 6 Mar 1997 11:38:36 +0300 To: asis-comment@sw-eng.falls-church.va.us Cc: rybin@crocus.gamma.ru Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Thu, 6 Mar 97 11:38:36 +0300 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Enclosing_Generic - let's remove it!(?) Lines: 45 Content-Length: 1767 Status: OR !topic Enclosing_Generic - why do we need it? !reference ASIS 95-13.37 !from Sergey Rybin !keywords Enclosing_Generic !discussion ASIS contains the following query in Asis.Elements: ------------------------------------------------------------------------------ -- Section 13.37 function Enclosing_Generic ------------------------------------------------------------------------------ function Enclosing_Generic (Element : Asis.Element) return Asis.Element; ------------------------------------------------------------------------------ -- Element - Specifies an Element that may be part of a generic declaration -- or the body of a generic declaration -- -- Returns the generic declaration, or the generic body declaration, that -- encloses the given Element. -- -- Returns a Nil_Element if the Element is not part of any generic declaration -- or body. -- -- Raises Asis_Inappropriate_Element when given a Nil_Element. -- ------------------------------------------------------------------------------ The question is - do we really need this query? First, it looks like secondary: it may be implemented as applying Enclosing_Element and checking if the result is a program unit, and when the program unit finally is reached, the last check is if this unit is a generic unit (spec or body). Second, it does not look as very useful for applications. It is specific for generics only. It might make sense to get for a given element the enclosing program unit or the enclosing declarative region, but why is it limited to generics only? Another useful capability might be to get for Is_Part_Of_Instance Element the corresponding instantiation, but this is not what this query does. I would suggest to remove this query at all. Sergey Rybin From sblake@alsys.com Tue Mar 11 12:08:30 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id MAA00016; Tue, 11 Mar 1997 12:08:30 -0500 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA17407; Tue, 11 Mar 97 12:08:55 EST Received: from gw.alsys.com by sw-eng.falls-church.va.us (8.7.1/) id QAA23581; Tue, 11 Mar 1997 16:53:05 GMT Received: from rasht.alsys.com (mailhub.alsys.com) by gw.alsys.com (4.1/SMI-4.1.1) id AA08231; Tue, 11 Mar 97 08:56:10 PST Received: from puumba.telesoft by rasht.alsys.com (4.1/TS-1.2c) id AA16357; Tue, 11 Mar 97 08:55:16 PST Received: by puumba.telesoft (SMI-8.6/SMI-SVR4) id IAA12838; Tue, 11 Mar 1997 08:55:15 -0800 Date: Tue, 11 Mar 1997 08:55:15 -0800 From: sblake@alsys.com (Steve Blake @pulsar) Message-Id: <199703111655.IAA12838@puumba.telesoft> To: asis-comment@sw-eng.falls-church.va.us, rybin@possum.srcc.msu.su Subject: Re: Enclosing_Generic - let's remove it!(?) Cc: rybin@crocus.gamma.ru Content-Length: 876 Status: OR >From rybin@possum.srcc.msu.su Thu Mar 6 01:05:08 1997 >To: asis-comment@sw-eng.falls-church.va.us >Cc: rybin@crocus.gamma.ru >Subject: Enclosing_Generic - let's remove it!(?) > >!topic Enclosing_Generic - why do we need it? >!reference ASIS 95-13.37 >!from Sergey Rybin >!keywords Enclosing_Generic >!discussion > >ASIS contains the following query in Asis.Elements: > >------------------------------------------------------------------------------ >-- Section 13.37 function Enclosing_Generic >------------------------------------------------------------------------------ > > function Enclosing_Generic (Element : Asis.Element) return Asis.Element; > >------------------------------------------------------------------------------ > ... >The question is - do we really need this query? > ... >I would suggest to remove this query at all. > >Sergey Rybin I agree.