From owner-sigada-asis-tech@ACM.ORG Sat Oct 3 15:16:29 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (8.8.8+Sun/SMI-SVR4) id PAA28786; Sat, 3 Oct 1998 15:16:28 -0400 (EDT) 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 PAA04439 for ; Sat, 3 Oct 1998 15:16:28 -0400 (EDT) Received: from mail (mail.acm.org [199.222.69.4]) by mail.acm.org (8.8.5/8.7.5) with ESMTP id PAA15682; Sat, 3 Oct 1998 15:03:12 -0400 Received: from ACM.ORG by ACM.ORG (LISTSERV-TCP/IP release 1.8c) with spool id 1309761 for SIGADA-ASIS-TECH@ACM.ORG; Sat, 3 Oct 1998 15:03:11 -0400 Received: from logger.gamma.ru (logger.gamma.ru [194.186.254.23]) by mail.acm.org (8.8.5/8.7.5) with ESMTP id OAA19556 for ; Sat, 3 Oct 1998 14:53:06 -0400 Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.8/8.8.8) with UUCP id XAA22038 for SIGAda-ASIS-Tech@ACM.Org; Sat, 3 Oct 1998 23:03:40 +0400 (MSD) (envelope-from possum!possum.srcc.msu.su!rybin@gamma.srcc.msu.su) Received: by gamma.srcc.msu.su; Sat, 3 Oct 1998 23:02:57 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Sat, 3 Oct 1998 23:04:32 +0300 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Lines: 52 Message-ID: Date: Sat, 3 Oct 1998 23:04:32 +0400 Reply-To: "Sergey I. Rybin" Sender: ACM SIGADA ASIS Technical Discussion Group From: "Sergey I. Rybin" Organization: Information Systems, SRCC, MSU Subject: A_Formal_Package_Declaration as an appropriate argument for Corresponding_Declaration To: SIGADA-ASIS-TECH@ACM.ORG Content-Length: 1756 Status: OR I'm afraid, that there is one more hole in the current ASIS definition. Consider the following example: generic package Genpack is function F return Integer; end Genpack; package body Genpack is function F return Integer is begin return 0; end F; end Genpack; with Genpack; Generic with package P is new Genpack; --<<--- (2) package Genpack2 is function F return Integer; end Genpack2; package body Genpack2 is function F return Integer is begin return P.F; -- <<--- (1) end F; end Genpack2; Consider the function call P.F at point (1). There is no formal reason for Corresponding_Called_Function to return Nil_Element for it. But what happens if we apply Enclosing_Element to the result of Corresponding_Called_Function? What happens if we apply it several times? There is nothing in the ASIS which could help to answer this question. The most logical solution would probably be to consider the function declaration which should be returned in this case as belonging to the expanded geclaration of the generic package Genpack at point (2), but the problem is, that this expanded generic spec would correspond to a formal package declaration, but not to a package instantiation. In the same time, Asis.Declarations.Corresponding declaration can be applied to a package instantiation (and it will return an expanded spec in this case), but it cannot be applied to a formal package declaration (which in fact is also some kind of package instantiation). It looks like formal packages as appropriate arguments for Corresponding_Name_Declarations were missed when ASIS 83 was evolved to ASIS 95. Sergey (on the base of the bug report sent by Alain, so Alain shares the responsibility for finding this hole) From owner-sigada-asis-tech@ACM.ORG Sat Oct 3 16:09:26 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (8.8.8+Sun/SMI-SVR4) id QAA28823; Sat, 3 Oct 1998 16:09:25 -0400 (EDT) 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 QAA04698 for ; Sat, 3 Oct 1998 16:09:25 -0400 (EDT) Received: from mail (mail.acm.org [199.222.69.4]) by mail.acm.org (8.8.5/8.7.5) with ESMTP id PAA19416; Sat, 3 Oct 1998 15:58:11 -0400 Received: from ACM.ORG by ACM.ORG (LISTSERV-TCP/IP release 1.8c) with spool id 1309892 for SIGADA-ASIS-TECH@ACM.ORG; Sat, 3 Oct 1998 15:58:09 -0400 Received: from ulla.irisa.fr (ulla.irisa.fr [131.254.43.50]) by mail.acm.org (8.8.5/8.7.5) with ESMTP id PAA49824 for ; Sat, 3 Oct 1998 15:48:02 -0400 Received: from myrtille.irisa.fr (myrtille.irisa.fr [131.254.43.44]) by ulla.irisa.fr (8.9.1a/8.9.1) with ESMTP id VAA08753; Sat, 3 Oct 1998 21:58:33 +0200 (MET DST) References: Lines: 7 X-Mailer: Gnus v5.3/Emacs 19.34 Message-ID: Date: Sat, 3 Oct 1998 21:58:33 +0200 Reply-To: Alain.Le_Guennec@IRISA.FR Sender: ACM SIGADA ASIS Technical Discussion Group From: Alain Le Guennec Subject: Re: A_Formal_Package_Declaration as an appropriate argument for Corresponding_Declaration Comments: To: "Sergey I. Rybin" To: SIGADA-ASIS-TECH@ACM.ORG In-Reply-To: "Sergey I. Rybin"'s message of Sat, 3 Oct 1998 23:04:32 +0400 Content-Length: 168 Status: OR I already submitted this issue to ASIS-technical, and it is recorded as technical-issue #086. See: http://info.acm.org/sigs/sigada/wg/asiswg/issues/issue086.i /Alain