From wfstanle@oakland.edu Fri Apr 3 09:34:07 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id JAA21374; Fri, 3 Apr 1998 09:34:06 -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 JAA26952 for ; Fri, 3 Apr 1998 09:35:22 -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 JAA31910; Fri, 3 Apr 1998 09:32:12 -0500 Received: from cliff.acs.oakland.edu by sw-eng.falls-church.va.us (8.8.8/) id OAA22059; Fri, 3 Apr 1998 14:31:32 GMT Received: from ppp.oakland.edu.acs.oakland.edu (ppp-pm03-dy-17.opr.oakland.edu [141.210.14.238]) by cliff.acs.oakland.edu (8.8.8/8.8.8) with SMTP id JAA12210 for ; Fri, 3 Apr 1998 09:35:14 -0500 (EST) Message-Id: <3.0.1.32.19980403093120.007bb780@cliff.acs.oakland.edu> X-Sender: wfstanle@cliff.acs.oakland.edu X-Mailer: Windows Eudora Light Version 3.0.1 (32) Date: Fri, 03 Apr 1998 09:31:20 -0500 To: ASIS-Technical-Request@sw-eng.falls-church.va.us From: Bill Stanley Subject: "=" and "/=" operators in Asis Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Length: 1065 Status: OR Gentlemen, It appears that there is a small problem with the Asis specification. The Is_Equal function is required because the default "=" operator might not properly evaluate the test for equality (or inequality). This is fine, but it opens the door for possible programming errors. It is very easy during a moment of inattention to use the "=" operator instead of the Is_Equal function. If the default "=" operator does not always give the correct results, we then have an incorrect program. To make matters worse, there are no compiler errors generated by the improper use of the "=" operator. I ran into this issue when using a generic linked list package and instantiated a linked list of Asis.Elements from this package. The generic package uses the "=" operator to test for equality between the generic items. Since it is a relativly easy matter to implement the "=" and "/=" operators, The logical thing to do is to override the default "=" and "/=" functions. This will eliminate a possible source of errors. Best wishes, Bill Stanley From roby Fri Apr 3 10:37:35 1998 Return-Path: Received: by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id KAA21520; Fri, 3 Apr 1998 10:37:34 -0500 From: roby (Clyde Roby) Message-Id: <199804031537.KAA21520@cronus.csed.ida.org> Subject: "=" and "/=" operators in Asis To: ASIS-Technical@SW-Eng.Falls-Church.Va.US (ASIS-Technical) Date: Fri, 3 Apr 1998 10:37:33 -0500 (EST) Cc: roby (Clyde Roby) X-Mailer: ELM [version 2.5 PL0b2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 1631 Status: OR Forwarded message: > From wfstanle@oakland.edu Fri Apr 3 09:34:07 1998 > Message-Id: <3.0.1.32.19980403093120.007bb780@cliff.acs.oakland.edu> > X-Sender: wfstanle@cliff.acs.oakland.edu > X-Mailer: Windows Eudora Light Version 3.0.1 (32) > Date: Fri, 03 Apr 1998 09:31:20 -0500 > To: ASIS-Technical-Request@sw-eng.falls-church.va.us > From: Bill Stanley > Subject: "=" and "/=" operators in Asis > Mime-Version: 1.0 > Content-Type: text/plain; charset="us-ascii" > Content-Length: 1065 > > Gentlemen, > > It appears that there is a small problem with the > Asis specification. The Is_Equal function is required > because the default "=" operator might not properly > evaluate the test for equality (or inequality). This > is fine, but it opens the door for possible programming > errors. It is very easy during a moment of inattention > to use the "=" operator instead of the Is_Equal function. > If the default "=" operator does not always give the > correct results, we then have an incorrect program. > > To make matters worse, there are no compiler errors > generated by the improper use of the "=" operator. > I ran into this issue when using a generic linked > list package and instantiated a linked list of > Asis.Elements from this package. The generic package > uses the "=" operator to test for equality between > the generic items. Since it is a relativly easy matter > to implement the "=" and "/=" operators, The logical > thing to do is to override the default "=" and "/=" > functions. This will eliminate a possible source > of errors. > > Best wishes, > > Bill Stanley From rybin@possum.srcc.msu.su Mon Apr 6 02:10:12 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id CAA26600; Mon, 6 Apr 1998 02:09:53 -0400 Received: from logger.gamma.ru (logger.gamma.ru [194.186.254.23]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id CAA18538 for ; Mon, 6 Apr 1998 02:11:09 -0400 (EDT) Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.7/8.8.7) with UUCP id KAA02929; Mon, 6 Apr 1998 10:10:42 +0400 (MSD) Received: by gamma.srcc.msu.su; Mon, 6 Apr 1998 10:09:17 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Mon, 6 Apr 1998 10:08:27 +0400 To: ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org Cc: asis-comment@sw-eng.falls-church.va.us References: <199804031537.KAA21520@cronus.csed.ida.org> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Mon, 6 Apr 98 10:08:27 +0400 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: "=" and "/=" operators in Asis Lines: 70 Content-Length: 3079 Status: ORr We've discussed this problem with Bill before he sent it to the ASIS forum, and I think, that his comment is really important. It comes from the ASIS application development experience - and the main problem for ASIS 95 process is that we need much more application developers feedback in the ASIS standardization process, that we really have. Now I think, that this is a real bug in the ASIS definition, and technically this bug is very easy to fix (with no additional work to do in ASIS implementations). The fix is strightforward: to add the definition of the "=" operator for every ASIS abstraction, for which Is_Identical query is defined, and to place it in the package where the corresponding ASIS type is declared (to make this "=" override the predefined "="). This will implicitly give the redefinition of the predefined "/=". This will not affect the old application which use Is_Equal/Is_Identical queries, if we keep these queriesas they are defined now. I think, "=" should be (re)defined as Is_Identical, but not as Is_Equal (it will not make any difference for 90% of real applications which use only one Context). The only barrier for fixing this hole may be the formal status of the ASIS definition in the ASIS standardization process. Is it really a barrier now? Sergey Rybin > Forwarded message: > > From wfstanle@oakland.edu Fri Apr 3 09:34:07 1998 > > Message-Id: <3.0.1.32.19980403093120.007bb780@cliff.acs.oakland.edu> > > X-Sender: wfstanle@cliff.acs.oakland.edu > > X-Mailer: Windows Eudora Light Version 3.0.1 (32) > > Date: Fri, 03 Apr 1998 09:31:20 -0500 > > To: ASIS-Technical-Request@sw-eng.falls-church.va.us > > From: Bill Stanley > > Subject: "=" and "/=" operators in Asis > > Mime-Version: 1.0 > > Content-Type: text/plain; charset="us-ascii" > > Content-Length: 1065 > > > > Gentlemen, > > > > It appears that there is a small problem with the > > Asis specification. The Is_Equal function is required > > because the default "=" operator might not properly > > evaluate the test for equality (or inequality). This > > is fine, but it opens the door for possible programming > > errors. It is very easy during a moment of inattention > > to use the "=" operator instead of the Is_Equal function. > > If the default "=" operator does not always give the > > correct results, we then have an incorrect program. > > > > To make matters worse, there are no compiler errors > > generated by the improper use of the "=" operator. > > I ran into this issue when using a generic linked > > list package and instantiated a linked list of > > Asis.Elements from this package. The generic package > > uses the "=" operator to test for equality between > > the generic items. Since it is a relativly easy matter > > to implement the "=" and "/=" operators, The logical > > thing to do is to override the default "=" and "/=" > > functions. This will eliminate a possible source > > of errors. > > > > Best wishes, > > > > Bill Stanley > From eachus@mitre.org Mon Apr 6 10:41:36 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id KAA27094; Mon, 6 Apr 1998 10:41:36 -0400 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 KAA27635 for ; Mon, 6 Apr 1998 10:42:53 -0400 (EDT) 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 KAA83796; Mon, 6 Apr 1998 10:39:33 -0400 Received: from mbunix.mitre.org by sw-eng.falls-church.va.us (8.8.8/) id OAA20700; Mon, 6 Apr 1998 14:38:33 GMT Received: from spectre.mitre.org (spectre.mitre.org [129.83.61.124]) by mbunix.mitre.org (8.8.8/8.8.8/mitre.0) with ESMTP id KAA10358; Mon, 6 Apr 1998 10:42:16 -0400 (EDT) Received: from blofeld (blofeld.mitre.org [129.83.41.77]) by spectre.mitre.org (8.8.5/8.8.5) with SMTP id KAA02363; Mon, 6 Apr 1998 10:42:16 -0400 (EDT) Message-Id: <3.0.1.32.19980406104423.009d19a0@spectre.mitre.org> X-Sender: eachus@spectre.mitre.org (Unverified) X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Mon, 06 Apr 1998 10:44:23 -0400 To: "Sergey I. Rybin" From: "Robert I. Eachus" Subject: Re: "=" and "/=" operators in Asis Cc: ASIS-Technical@sw-eng.falls-church.va.us, asis-comment@sw-eng.falls-church.va.us In-Reply-To: References: <199804031537.KAA21520@cronus.csed.ida.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Length: 778 Status: OR At 10:08 AM 4/6/98 +0400, Sergey I. Rybin wrote: >Now I think, that this is a real bug in the ASIS definition, and >technically this bug is very easy to fix (with no additional work >to do in ASIS implementations)... >The only barrier for fixing this hole may be the formal status of the >ASIS definition in the ASIS standardization process. Is it really >a barrier now? It shouldn't be as I understand the process. The next version to go out will have to be voted up or down, but technical and editorial corrections, whether or not they address specific comments should be okay right now. Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is... From roby Mon Apr 6 14:12:55 1998 Return-Path: Received: by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id OAA27533; Mon, 6 Apr 1998 14:12:53 -0400 From: roby (Clyde Roby) Message-Id: <199804061812.OAA27533@cronus.csed.ida.org> Subject: Re: "=" and "/=" operators in Asis To: rybin@possum.srcc.msu.su (Sergey I. Rybin) Date: Mon, 6 Apr 1998 14:12:53 -0400 (EDT) Cc: ASIS-Technical@SW-Eng.Falls-Church.Va.US (ASIS-Technical), ASIS-Comment@SW-Eng.Falls-Church.Va.US (ASIS-Comment), roby (Clyde Roby) In-Reply-To: from "Sergey I. Rybin" at Apr 06, 1998 10:08:27 AM X-Mailer: ELM [version 2.5 PL0b2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 952 Status: OR Sergey, > Now I think, that this is a real bug in the ASIS definition, and > technically this bug is very easy to fix (with no additional work > to do in ASIS implementations). The fix is strightforward: to > add the definition of the "=" operator for every ASIS abstraction, > for which Is_Identical query is defined, and to place it in the > package where the corresponding ASIS type is declared (to make > this "=" override the predefined "="). This will implicitly give > the redefinition of the predefined "/=". This will not affect > the old application which use Is_Equal/Is_Identical queries, > if we keep these queriesas they are defined now. > > I think, "=" should be (re)defined as Is_Identical, but not as > Is_Equal (it will not make any difference for 90% of real > applications which use only one Context). Should *ALL* occurrences of "=", if they are re-defined, be Is_Equal or should they be Is_Identical? Why or why not? Clyde From dewar@gnat.com Mon Apr 6 22:06:50 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id WAA28796; Mon, 6 Apr 1998 22:06:49 -0400 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 WAA21131 for ; Mon, 6 Apr 1998 22:08:07 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA03815; Mon, 6 Apr 98 22:05:56 EDT Date: Mon, 6 Apr 98 22:05:56 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804070205.AA03815@nile.gnat.com> To: ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org, rybin@possum.srcc.msu.su Subject: Re: "=" and "/=" operators in Asis Cc: asis-comment@sw-eng.falls-church.va.us Content-Length: 230 Status: OR I think that real ASIS implementations should immediately implement "=" to be the same as Is_Indentical as Sergey suggests. Leaving "=" as implementation and wrong cannot be the right choice, regardless of what the standard says! From rybin@possum.srcc.msu.su Mon Apr 6 23:04:38 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id XAA28836; Mon, 6 Apr 1998 23:04:37 -0400 Received: from logger.gamma.ru (logger.gamma.ru [194.186.254.23]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id XAA21766 for ; Mon, 6 Apr 1998 23:05:54 -0400 (EDT) Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.7/8.8.7) with UUCP id XAA10703; Mon, 6 Apr 1998 23:53:35 +0400 (MSD) Received: by gamma.srcc.msu.su; Mon, 6 Apr 1998 23:52:33 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Mon, 6 Apr 1998 22:48:17 +0400 To: roby@ida.org Cc: ASIS-Comment@SW-Eng.Falls-Church.Va.US, ASIS-Technical@SW-Eng.Falls-Church.Va.US References: <199804061812.OAA27533@cronus.csed.ida.org> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Mon, 6 Apr 98 22:48:17 +0400 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: "=" and "/=" operators in Asis Lines: 39 Content-Length: 1563 Status: OR Clyde, > > I think, "=" should be (re)defined as Is_Identical, but not as > > Is_Equal (it will not make any difference for 90% of real > > applications which use only one Context). > > Should *ALL* occurrences of "=", if they are re-defined, be Is_Equal > or should they be Is_Identical? Why or why not? It would be very nice to have at least a small discussion concerning this issue. My current point is: 1. Is_Identical is (Is_Equal and from the same opened Context) for everything but Context, for Context Is_Identical means "the same Context variable", or, taking into account, that Context is a limited type, "the same value of the limited type Context", but Is_Equal means "the same sets of Compilation Units" In both cases Is_Identical is close to the "common sense" meaning of a predefined "=" operator. 2. If an application has only one Context being processed, there is no difference between Is_Equal and Is_Identical. I think, this is the case for 90% (or even 99%) of all the real ASIS applications. 3. The case, when for some X and Y of some ASIS private type Is_Equal (x, Y) is True, but Is_Identical (X, Y) is False, definitely is something special, and if an application assumes, that this is possible, it definitely should use Is_Equal and Is_Identical, but not redefined "=", regardless of the way how it is defined. So my vote would be to redefine "=" as Is_Identical in all cases. But I would also repeat, that I would like to see somebody else opinion concerning this issue. Sergey From dewar@gnat.com Tue Apr 7 05:10:27 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id FAA29117; Tue, 7 Apr 1998 05:10:13 -0400 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 FAA24286 for ; Tue, 7 Apr 1998 05:11:31 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA17723; Tue, 7 Apr 98 05:09:17 EDT Date: Tue, 7 Apr 98 05:09:17 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804070909.AA17723@nile.gnat.com> To: roby@ida.org, rybin@possum.srcc.msu.su Subject: Re: "=" and "/=" operators in Asis Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us Content-Length: 653 Status: OR <<1. Is_Identical is (Is_Equal and from the same opened Context) for everything but Context, for Context Is_Identical means "the same Context variable", or, taking into account, that Context is a limited type, "the same value of the limited type Context", but Is_Equal means "the same sets of Compilation Units" In both cases Is_Identical is close to the "common sense" meaning of a predefined "=" operator. >> I would make "=" unavailable in this case, it can only be confusing that it could mean one of two things. So for this case, make "=" abstract and unavailable (note that thius would be an acceptable solution for all cases). From rybin@possum.srcc.msu.su Tue Apr 7 05:52:52 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id FAA29141; Tue, 7 Apr 1998 05:52:47 -0400 Received: from logger.gamma.ru (logger.gamma.ru [194.186.254.23]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id FAA24425 for ; Tue, 7 Apr 1998 05:54:05 -0400 (EDT) Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.7/8.8.7) with UUCP id NAA16591; Tue, 7 Apr 1998 13:51:26 +0400 (MSD) Received: by gamma.srcc.msu.su; Tue, 7 Apr 1998 13:50:51 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Tue, 7 Apr 1998 13:50:49 +0400 To: dewar@gnat.com, roby@ida.org Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us References: <9804070909.AA17723@nile.gnat.com> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Tue, 7 Apr 98 13:50:49 +0400 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: "=" and "/=" operators in Asis Lines: 24 Content-Length: 1052 Status: OR So, we have two possibilites for "=" for the main ASIS abstractions: - to make it unavailable by declaring it as an abstract subprogram; - to redefine it as Is_Identical; I did not myself think about the first possibility before, but I agree with Robert, that it is definitely better from the point of view of the reliability of ASIS applications > <<1. Is_Identical is (Is_Equal and from the same opened Context) for > everything but Context, for Context Is_Identical means "the same > Context variable", or, taking into account, that Context is a > limited type, "the same value of the limited type Context", but > Is_Equal means "the same sets of Compilation Units" > In both cases Is_Identical is close to the "common sense" meaning > of a predefined "=" operator. > >> > > I would make "=" unavailable in this case, it can only be confusing that > it could mean one of two things. So for this case, make "=" abstract and > unavailable (note that thius would be an acceptable solution for all cases). > From rybin@possum.srcc.msu.su Tue Apr 7 06:41:44 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id GAA29174; Tue, 7 Apr 1998 06:41:44 -0400 Received: from logger.gamma.ru (logger.gamma.ru [194.186.254.23]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id GAA24630 for ; Tue, 7 Apr 1998 06:43:00 -0400 (EDT) Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.7/8.8.7) with UUCP id OAA17042; Tue, 7 Apr 1998 14:42:51 +0400 (MSD) Received: by gamma.srcc.msu.su; Tue, 7 Apr 1998 14:41:51 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Tue, 7 Apr 1998 14:41:44 +0400 To: dewar@gnat.com, roby@ida.org Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us References: <9804070909.AA17723@nile.gnat.com> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Tue, 7 Apr 98 14:41:44 +0400 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: "=" and "/=" operators in Asis Lines: 23 Content-Length: 1152 Status: OR > <<1. Is_Identical is (Is_Equal and from the same opened Context) for > everything but Context, for Context Is_Identical means "the same > Context variable", or, taking into account, that Context is a > limited type, "the same value of the limited type Context", but > Is_Equal means "the same sets of Compilation Units" > In both cases Is_Identical is close to the "common sense" meaning > of a predefined "=" operator. > >> > > I would make "=" unavailable in this case, it can only be confusing that > it could mean one of two things. So for this case, make "=" abstract and > unavailable (note that thius would be an acceptable solution for all cases). There is one problem related to making "=" abstract. If we redefine "=" as Is_Identical (or whatever), this will also give as an implicit redefinition of "/=". But if we define "=" as abstarct, we will still have the predefined "/=" available for ASIS applications. We cannot redefine "/=" as abstract to make it unavailable because of RM95 6.6(5): "An explicit declaration of "/=" shall not have a result type of the predefined type Boolean." From dewar@gnat.com Tue Apr 7 06:46:12 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id GAA29186; Tue, 7 Apr 1998 06:46:11 -0400 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 GAA24667 for ; Tue, 7 Apr 1998 06:47:29 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA10313; Tue, 7 Apr 98 06:45:14 EDT Date: Tue, 7 Apr 98 06:45:14 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804071045.AA10313@nile.gnat.com> To: dewar@gnat.com, roby@ida.org, rybin@possum.srcc.msu.su Subject: Re: "=" and "/=" operators in Asis Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us Content-Length: 1866 Status: OR I do not understand Sergey's reasoning here. It seems quite wrong (and indeed if it were right, the RM would have an obvious bug that would need fixing). If you define "=" you implicitly define "/=", and this of course applies to the abstract definition too, so if you define "=" as abstract, then "/=" is abstract too (Sergey, try it out in GNAT :-) -- From logger.gamma.ru!srcc!possum!possum.srcc.msu.su!rybin@thames.gnat.com Tue Apr 7 06:40 EDT 1998 To: dewar@gnat.com, roby@ida.org Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us From: "Sergey I. Rybin" Date: Tue, 7 Apr 98 14:41:44 +0400 Subject: Re: "=" and "/=" operators in Asis > <<1. Is_Identical is (Is_Equal and from the same opened Context) for > everything but Context, for Context Is_Identical means "the same > Context variable", or, taking into account, that Context is a > limited type, "the same value of the limited type Context", but > Is_Equal means "the same sets of Compilation Units" > In both cases Is_Identical is close to the "common sense" meaning > of a predefined "=" operator. > >> > > I would make "=" unavailable in this case, it can only be confusing that > it could mean one of two things. So for this case, make "=" abstract and > unavailable (note that thius would be an acceptable solution for all cases). There is one problem related to making "=" abstract. If we redefine "=" as Is_Identical (or whatever), this will also give as an implicit redefinition of "/=". But if we define "=" as abstarct, we will still have the predefined "/=" available for ASIS applications. We cannot redefine "/=" as abstract to make it unavailable because of RM95 6.6(5): "An explicit declaration of "/=" shall not have a result type of the predefined type Boolean." From rybin@possum.srcc.msu.su Tue Apr 7 07:35:22 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id HAA29239; Tue, 7 Apr 1998 07:35:21 -0400 Received: from logger.gamma.ru (logger.gamma.ru [194.186.254.23]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id HAA25062 for ; Tue, 7 Apr 1998 07:36:37 -0400 (EDT) Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.7/8.8.7) with UUCP id PAA17577; Tue, 7 Apr 1998 15:35:32 +0400 (MSD) Received: by gamma.srcc.msu.su; Tue, 7 Apr 1998 15:33:35 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Tue, 7 Apr 1998 15:33:30 +0400 To: dewar@gnat.com, roby@ida.org Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us References: <9804071045.AA10313@nile.gnat.com> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Tue, 7 Apr 98 15:33:30 +0400 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: "=" and "/=" operators in Asis Lines: 18 Content-Length: 799 Status: OR > I do not understand Sergey's reasoning here. It seems quite wrong (and indeed > if it were right, the RM would have an obvious bug that would need fixing). > If you define "=" you implicitly define "/=", and this of course applies > to the abstract definition too, so if you define "=" as abstract, then > "/=" is abstract too (Sergey, try it out in GNAT :-) Of course, you are right. (Shame on me, I derived this "consequence" concerning availability of "/=" in case if "=" is defined as abstract from the completely wrong point :( ) And GNAT does not allow to use "/=" in case if "=" is defined as abstract. So, (re)defining "=" as abstract for all the ASIS abstractions which have Is_Equal/Is_Identical tests seems to be the right solution for the problem under discussion Sergey From eachus@mitre.org Tue Apr 7 12:35:05 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id MAA00496; Tue, 7 Apr 1998 12:35:05 -0400 Received: from mbunix.mitre.org (mbunix.mitre.org [129.83.20.100]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id MAA03531 for ; Tue, 7 Apr 1998 12:36:22 -0400 (EDT) Received: from spectre.mitre.org (spectre.mitre.org [129.83.61.124]) by mbunix.mitre.org (8.8.8/8.8.8/mitre.0) with ESMTP id MAA27378; Tue, 7 Apr 1998 12:36:18 -0400 (EDT) Received: from blofeld (blofeld.mitre.org [129.83.41.77]) by spectre.mitre.org (8.8.5/8.8.5) with SMTP id MAA06058; Tue, 7 Apr 1998 12:36:17 -0400 (EDT) Message-Id: <3.0.1.32.19980407123826.00ba7450@spectre.mitre.org> X-Sender: eachus@spectre.mitre.org X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Tue, 07 Apr 1998 12:38:26 -0400 To: "Sergey I. Rybin" From: "Robert I. Eachus" Subject: Re: "=" and "/=" operators in Asis Cc: roby@ida.org, ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us In-Reply-To: References: <199804061812.OAA27533@cronus.csed.ida.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Length: 668 Status: OR At 10:48 PM 4/6/98 +0400, Sergey I. Rybin wrote: >But I would also repeat, that I would like to see somebody else >opinion concerning this issue. I saw the discussion of making "=" abstract, and while it is possible, I think that the much better choice is redefining "=" to map to Is_Identical. My concern is about the potential re-emergence of the predefined equality in records. I think the answer is that this is a potential language caused glitch we just have to live with. Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is... From dewar@gnat.com Tue Apr 7 12:52:50 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id MAA00634; Tue, 7 Apr 1998 12:52:49 -0400 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 MAA04092 for ; Tue, 7 Apr 1998 12:54:01 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA05480; Tue, 7 Apr 98 12:51:30 EDT Date: Tue, 7 Apr 98 12:51:30 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804071651.AA05480@nile.gnat.com> To: eachus@mitre.org, rybin@possum.srcc.msu.su Subject: Re: "=" and "/=" operators in Asis Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org Content-Length: 802 Status: OR <<<< I saw the discussion of making "=" abstract, and while it is possible, I think that the much better choice is redefining "=" to map to Is_Identical. My concern is about the potential re-emergence of the predefined equality in records. I think the answer is that this is a potential language caused glitch we just have to live with. >> >> I strongly disagree with Robert Eachus here. The predefined equality can indeed emerge, and that is a reason FOR making equality abstract, not against. If we teach people that it is OK to use "=", then they are far more likely to bump into the reemergence problem than if we teach them (by making it abstract) that it should not be used. Furthermore, I think the confusion between is_equal and Is_Identical is bad for the writer AND for the reader. From eachus@mitre.org Tue Apr 7 14:42:42 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id OAA01195; Tue, 7 Apr 1998 14:42:41 -0400 Received: from mbunix.mitre.org (mbunix.mitre.org [129.83.20.100]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id OAA07149 for ; Tue, 7 Apr 1998 14:43:59 -0400 (EDT) Received: from spectre.mitre.org (spectre.mitre.org [129.83.61.124]) by mbunix.mitre.org (8.8.8/8.8.8/mitre.0) with ESMTP id OAA22878; Tue, 7 Apr 1998 14:43:52 -0400 (EDT) Received: from blofeld (blofeld.mitre.org [129.83.41.77]) by spectre.mitre.org (8.8.5/8.8.5) with SMTP id OAA07004; Tue, 7 Apr 1998 14:43:52 -0400 (EDT) Message-Id: <3.0.1.32.19980407144601.00af7830@spectre.mitre.org> X-Sender: eachus@spectre.mitre.org X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Tue, 07 Apr 1998 14:46:01 -0400 To: dewar@gnat.com (Robert Dewar) From: "Robert I. Eachus" Subject: Re: "=" and "/=" operators in Asis Cc: eachus@mitre.org, rybin@possum.srcc.msu.su, ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org In-Reply-To: <9804071651.AA05480@nile.gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Length: 1352 Status: OR At 12:51 PM 4/7/98 EDT, Robert Dewar wrote: >I strongly disagree with Robert Eachus here. The predefined equality can >indeed emerge, and that is a reason FOR making equality abstract, not against. That statement I certainly agree with, which is why I raised the issue. >If we teach people that it is OK to use "=", then they are far more likely >to bump into the reemergence problem than if we teach them (by making it >abstract) that it should not be used. But "=" is one of the few cases where a user definable operation composes, and it composes because it is such a useful feature. I expect that cases where components compare equal with one operation and not with another will be rare, and in the context of record components, so rare as to be non-existant. Which is why I am willing to live with the potential glitch. Robert Dewar is apparently not willing to live with it, and there is a possible compromise. Define which ASIS types equality must compose "correctly" for. Implementors can then, if necessary, implement the type using a tagged type. I just can't see the amount of (standards design) work required as worth it for such a small gain. Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is... From rybin@possum.srcc.msu.su Tue Apr 7 14:53:56 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id OAA01212; Tue, 7 Apr 1998 14:53:55 -0400 Received: from logger.gamma.ru (logger.gamma.ru [194.186.254.23]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id OAA07429 for ; Tue, 7 Apr 1998 14:55:06 -0400 (EDT) Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.7/8.8.7) with UUCP id WAA21712 for roby@ida.org; Tue, 7 Apr 1998 22:54:59 +0400 (MSD) Received: by gamma.srcc.msu.su; Tue, 7 Apr 1998 22:54:52 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Tue, 7 Apr 1998 22:13:51 +0400 To: dewar@gnat.com, eachus@mitre.org Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org References: <9804071651.AA05480@nile.gnat.com> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Tue, 7 Apr 98 22:13:51 +0400 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: "=" and "/=" operators in Asis Lines: 26 Content-Length: 1128 Status: OR > <<<< I saw the discussion of making "=" abstract, and while it is possible, I > think that the much better choice is redefining "=" to map to Is_Identical. > My concern is about the potential re-emergence of the predefined equality > in records. > > I think the answer is that this is a potential language caused glitch we > just have to live with. > >> > >> > > I strongly disagree with Robert Eachus here. The predefined equality can > indeed emerge, and that is a reason FOR making equality abstract, not against. I completely agree with Robert Dewar: if somebody would like to use records having ASIS Elements as components, he should NOT able to use the predefined "=" for these records, and he should be forced to provide his own "=" if he would like to use "=" > Furthermore, I think the confusion between is_equal and Is_Identical is bad > for the writer AND for the reader. I would not be so strong in blaming ASIS here - this is just a price to pay for the possibility to have more then one opened Context in an ASIS application, and this possibility looks really important. Sergey From dewar@gnat.com Tue Apr 7 15:48:05 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id PAA01356; Tue, 7 Apr 1998 15:48:05 -0400 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 PAA08906 for ; Tue, 7 Apr 1998 15:49:23 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA08336; Tue, 7 Apr 98 15:46:58 EDT Date: Tue, 7 Apr 98 15:46:58 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804071946.AA08336@nile.gnat.com> To: dewar@gnat.com, eachus@mitre.org Subject: Re: "=" and "/=" operators in Asis Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org, rybin@possum.srcc.msu.su Content-Length: 474 Status: OR << Robert Dewar is apparently not willing to live with it, and there is a possible compromise. Define which ASIS types equality must compose "correctly" for. Implementors can then, if necessary, implement the type using a tagged type. I just can't see the amount of (standards design) work required as worth it for such a small gain. >> So why not just leave them abstract, which better meets the intention of the design, i.e. that these operations not be used at all. From dewar@gnat.com Tue Apr 7 15:53:20 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id PAA01369; Tue, 7 Apr 1998 15:53:20 -0400 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 PAA09030 for ; Tue, 7 Apr 1998 15:54:38 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA08510; Tue, 7 Apr 98 15:52:21 EDT Date: Tue, 7 Apr 98 15:52:21 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804071952.AA08510@nile.gnat.com> To: dewar@gnat.com, eachus@mitre.org, rybin@possum.srcc.msu.su Subject: Re: "=" and "/=" operators in Asis Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org Content-Length: 452 Status: OR <> I am not blaming ASIS It is perfectly reasonable to have Is_Equal and Is_Identical (this is an old distinction, like eq and equal in LISP!) What is confusing is allowing "=" to mean one of these, since it is not obvious which one to choose. From colket@colket.org Wed Apr 8 11:32:53 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id LAA02902; Wed, 8 Apr 1998 11:32:46 -0400 Received: from smtp1.erols.com (smtp1.erols.com [207.172.3.234]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id LAA25277 for ; Wed, 8 Apr 1998 11:34:03 -0400 (EDT) Received: from colket.org (207-172-117-228.s228.tnt12.brd.erols.com [207.172.117.228]) by smtp1.erols.com (8.8.8/8.8.5) with ESMTP id LAA14975; Wed, 8 Apr 1998 11:26:42 -0400 (EDT) Message-ID: <352B9738.56D9A0BF@colket.org> Date: Wed, 08 Apr 1998 11:26:48 -0400 From: Currie Colket Reply-To: colket@colket.org X-Mailer: Mozilla 4.04 [en] (Win95; I) MIME-Version: 1.0 To: Robert Dewar CC: eachus@mitre.org, rybin@possum.srcc.msu.su, ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org Subject: Re: "=" and "/=" operators in Asis References: <9804071952.AA08510@nile.gnat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 885 Status: OR Robert wrote: > < pay for the possibility to have more then one opened Context in an > ASIS application, and this possibility looks really important. > >> > > I am not blaming ASIS > > It is perfectly reasonable to have Is_Equal and Is_Identical (this is an > old distinction, like eq and equal in LISP!) > > What is confusing is allowing "=" to mean one of these, since it is not > obvious which one to choose. It would be very confusing for "=" to mean Is_Identical and not Is_Equal. If "=" is defined in ASIS, it should mean Is_Equal. If most folks would be using "=" to mean Is_Equal then we could easily provide a "=" function with the same semantics as Is_Equal. Otherwise, we should make them abstract eliminating the default "=" operation and eliminating this possibility for confusion. v/r Currie From rybin@possum.srcc.msu.su Wed Apr 8 14:32:31 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id OAA03457; Wed, 8 Apr 1998 14:32:30 -0400 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 OAA29805 for ; Wed, 8 Apr 1998 14:33:48 -0400 (EDT) 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 OAA48796; Wed, 8 Apr 1998 14:30:02 -0400 Received: from logger.gamma.ru by sw-eng.falls-church.va.us (8.8.8/) id SAA02525; Wed, 8 Apr 1998 18:29:02 GMT Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.7/8.8.7) with UUCP id WAA02955; Wed, 8 Apr 1998 22:32:37 +0400 (MSD) Received: by gamma.srcc.msu.su; Wed, 8 Apr 1998 22:31:58 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Wed, 8 Apr 1998 22:32:04 +0400 To: colket@colket.org Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us References: <352B9738.56D9A0BF@colket.org> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Wed, 8 Apr 98 22:32:04 +0400 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: "=" and "/=" operators in Asis Lines: 26 Content-Length: 1056 Status: OR > Robert wrote: > > > < > pay for the possibility to have more then one opened Context in an > > ASIS application, and this possibility looks really important. > > >> > > > > I am not blaming ASIS > > > > It is perfectly reasonable to have Is_Equal and Is_Identical (this is an > > old distinction, like eq and equal in LISP!) > > > > What is confusing is allowing "=" to mean one of these, since it is not > > obvious which one to choose. > > It would be very confusing for "=" to mean Is_Identical and not Is_Equal. If > "=" is defined in ASIS, it should mean Is_Equal. > If most folks would be using "=" to mean Is_Equal then we could easily > provide a "=" function with the same semantics as Is_Equal. Otherwise, we > should make them abstract eliminating the default "=" operation and > eliminating this possibility for confusion. For me this is just one more argument for making "=" and "/=" unavailable by making "=" abstract! Sergey From dewar@gnat.com Thu Apr 9 06:40:45 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id GAA04473; Thu, 9 Apr 1998 06:40:44 -0400 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 GAA12922 for ; Thu, 9 Apr 1998 06:42:02 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA24048; Thu, 9 Apr 98 06:39:39 EDT Date: Thu, 9 Apr 98 06:39:39 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804091039.AA24048@nile.gnat.com> To: colket@colket.org, dewar@gnat.com Subject: Re: "=" and "/=" operators in Asis Cc: ASIS-Comment@sw-eng.falls-church.va.us, ASIS-Technical@sw-eng.falls-church.va.us, eachus@mitre.org, roby@ida.org, rybin@possum.srcc.msu.su Content-Length: 1003 Status: OR < Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id RAA08199; Fri, 10 Apr 1998 17:35:04 -0400 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 RAA24396 for ; Fri, 10 Apr 1998 17:36:19 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA05612; Fri, 10 Apr 98 17:33:50 EDT Date: Fri, 10 Apr 98 17:33:50 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804102133.AA05612@nile.gnat.com> To: ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org Subject: Re: Issue #094: Default "=" /= Is_Equal Cc: Colket@acm.org Content-Length: 527 Status: OR << The ASIS application developer could then define an "=" function as a renames of either the Is_Equal or Is_Identical function. In the write-up, there should be some text stating: "The "=" function is provided to disable the default "=" and implicit "/=" functions. If desired, the user can provide a "=" function by renaming either Is_Equal or Is_Identical." >> I would not mention this possibility. It seems bad programming practice to take advantage of this, and mentioning it is too near encouragement. From rybin@possum.srcc.msu.su Sat Apr 11 08:15:49 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id IAA08855; Sat, 11 Apr 1998 08:15:47 -0400 Received: from logger.gamma.ru (logger.gamma.ru [194.186.254.23]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id IAA29702 for ; Sat, 11 Apr 1998 08:17:05 -0400 (EDT) Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.7/8.8.7) with UUCP id QAA01735; Sat, 11 Apr 1998 16:16:48 +0400 (MSD) Received: by gamma.srcc.msu.su; Sat, 11 Apr 1998 16:16:08 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Sat, 11 Apr 1998 16:16:24 +0400 To: ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org Cc: Colket@ACM.Org References: <199804102011.QAA07938@cronus.csed.ida.org> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Sat, 11 Apr 98 16:16:24 +0400 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: Issue #094: Default "=" /= Is_Equal Lines: 89 Content-Length: 3898 Status: OR > Options to resolve this problem are: My vote is the first option. But I would correct it in the following way. > > 1. Provide an abstract "=" function for each of the above types, > preventing a "=" function with different semantics. The abstract > function would appear with the "Is_Equal" function. For example, > Clause 8.7 would provide: > > function Is_Equal (Left : in Asis.Context; > Right : in Asis.Context) > return Boolean; > function "=" (Left : in Asis.Context; > Right : in Asis.Context) > return Boolean is abstract; > May be, it would be better to have the definition of the abstract "=" functions not in a package defining Is_Equal, but in a package defining the corresponding ASIS abstraction (and the predefined "=" for it). In this case an abstract "=" would override the predefined "=" and make impossible any way of calling the predefined "=" and "/=" operations. But if we have the type Element defined in Asis, and the abstract "=" for Element defined in Asis.Elements, we may have something like this" with Asis, use Asis; with Asis.Elements; -- but NOT use Asis.Elements; ... procedure Test is E1, E2 : Element; ... begin ... if E1 = E2 then -- and here the predefined "=" will work. As for comments related to defining in ASIS abstract "=" functions, I agree with Robert, that ASIS should not encourage an application to use this or that renaming to (re)define "=". Instead I would add an paragraph explaining _why_ the predefined "=" and "/=" are maid unavailable by defining abstract "=" (may be we even need a separate paragraph of this kind for every ASIS abstraction) Sergey Rybin > The ASIS application developer could then define an "=" function as > a renames of either the Is_Equal or Is_Identical function. In the > write-up, there should be some text stating: "The "=" function is > provided to disable the default "=" and implicit "/=" functions. If > desired, the user can provide a "=" function by renaming either > Is_Equal or Is_Identical." > > 2. The Is_Equal functions would be renamed with a name reflecting > nearly equal (e.g., Is_Similar, Is_Almost_Equal, > Is_Nearly_Equal). Then rename all instances of Is_Identical to > Is_Equal. Now an "=" can be defined in ASIS to be equivalent to > Is_Equal. It would have the desired semantics. (Note: the renaming > of Is_Identical is not needed for Id as an Is_Identical function on > Id is not part of ASIS). Currently Is_Equal is used in the > commentary for a number of other functions. This change should not > affect this commentary. If this option is selected, a more specific > name for each current Is_Equal could be developed, such as > Is_Equal_Closed_Context for Clause 8.7 and > Is_Equal_Same_Compilation for Clause 20.16. > > 3. Eliminate the concept of having both an Is_Equal and > Is_Identical. Each function would need to be assessed as which > option was selected. For example, the Is_Identical function on > Context could be deleted. The remaining function would be named > Is_Equal. The functionality of Is_Identical could be provided as a > secondary query. As there will be only one Is_Equal, with the > preferred semantics, the "=" function would be provided with the > identical semantics. > > 4. Simply provide a defined "=" function for each of the existing > Is_Equal functions. This would make the default "=" function > semantically equivalent to each Is_Equal function. Unfortunately, > it would not facilitate an "=" function for Is_Identical as "=" for > the type would be ambiguous. > > Any other thoughts or suggestions? > > v/r > Currie and Clyde > From dewar@gnat.com Sat Apr 11 08:30:38 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id IAA08866; Sat, 11 Apr 1998 08:30:38 -0400 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 IAA29748 for ; Sat, 11 Apr 1998 08:31:56 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA03596; Sat, 11 Apr 98 08:29:38 EDT Date: Sat, 11 Apr 98 08:29:38 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804111229.AA03596@nile.gnat.com> To: ASIS-Technical@sw-eng.falls-church.va.us, roby@ida.org, rybin@possum.srcc.msu.su Subject: Re: Issue #094: Default "=" /= Is_Equal Cc: Colket@acm.org Content-Length: 780 Status: OR <> I am puzzled, is it really the case that Is_Equal is not a primitive operation of Asis.Context? If so I think this is poor design, but perhaps there is no help for it .. but most certainly the abstract "=" MUST be a primitive operation of the type it defines, or it is of no use. From wfstanle@oakland.edu Sat Apr 11 11:58:30 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id LAA08956; Sat, 11 Apr 1998 11:58:29 -0400 Received: from cliff.acs.oakland.edu (cliff.acs.oakland.edu [141.210.10.111]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id LAA01031 for ; Sat, 11 Apr 1998 11:59:48 -0400 (EDT) Received: from ppp.oakland.edu.acs.oakland.edu (pm332-43.dialip.mich.net [207.74.188.53]) by cliff.acs.oakland.edu (8.8.8/8.8.8) with SMTP id LAA18819 for ; Sat, 11 Apr 1998 11:59:38 -0400 (EDT) Message-Id: <3.0.1.32.19980411115505.007bb790@cliff.acs.oakland.edu> X-Sender: wfstanle@cliff.acs.oakland.edu X-Mailer: Windows Eudora Light Version 3.0.1 (32) Date: Sat, 11 Apr 1998 11:55:05 -0400 To: roby@ida.org (Clyde Roby) From: Bill Stanley Subject: Re: Issue #094: Default "=" /= Is_Equal In-Reply-To: <199804102011.QAA07938@cronus.csed.ida.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Length: 1264 Status: OR After listening to the various arguments, it seems to me that the root of the problem is the Is_Identical function. The actual test for equality is provided by the Is_Equal function where the Is_Identical function is a predicate meaning Is_Equal AND "The contexts are equal". Are two elements (or other Asis entity) coming from the exact same source code equal if they are in two different contexts? Since the underlying source code entity is the same in both cases, I would say they are equal even if they are used in different contexts. Question: Given a package "FooBar" that exports a function "Foo" and a variable "Bar" and programs A and B that with package FooBar. Is the function Foo used in program A equal to the function Foo used in program B? The same applies to variable Bar. I would say that they are the same even though they are used in different programs. If the user wanted to expand the test to include a predicate about being used in the same program then this is a different predicate entirely. This expanded predicate does not follow the usual ntion of equality. My point is: Is_Identical is an expanded test for equality that does not necessarily follow the usual notion of the equality predicate. Best wishes, Bill Stanley From rybin@possum.srcc.msu.su Sat Apr 11 14:17:57 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id OAA09031; Sat, 11 Apr 1998 14:17:47 -0400 Received: from logger.gamma.ru (logger.gamma.ru [194.186.254.23]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id OAA01679 for ; Sat, 11 Apr 1998 14:19:03 -0400 (EDT) Received: from srcc.UUCP (uucp@localhost) by logger.gamma.ru (8.8.7/8.8.7) with UUCP id WAA03602; Sat, 11 Apr 1998 22:18:42 +0400 (MSD) Received: by gamma.srcc.msu.su; Sat, 11 Apr 1998 22:18:07 +0400 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Sat, 11 Apr 1998 21:20:08 +0400 To: ASIS-Technical@sw-eng.falls-church.va.us, dewar@gnat.com, roby@ida.org Cc: Colket@acm.org References: <9804111229.AA03596@nile.gnat.com> Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Sat, 11 Apr 98 21:20:08 +0400 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Re: Issue #094: Default "=" /= Is_Equal Lines: 29 Content-Length: 1222 Status: OR > I am puzzled, is it really the case that Is_Equal is not a primitive > operation of Asis.Context? Yes, it is the case, and not only for the Context type. The main ASIS abstractions - Context, Compilation_Unit and Element are defined in the Asis package, and this package has no operations at all defined in it. All the operations are defined in its children > If so I think this is poor design, but perhaps > there is no help for it . I do not think, that this design decision will make any real problems for ASIS applications. It looks like it is hardly possible to use any OO approach for developing ASIS applications, and this because of the nature of the object to process (that is, Ada code), but not because of ASIS. Now my Ph.D. student is trying to provide some alternative design for ASIS-like interface, and the idea is to base this design on the OO pronciples and by means of that to make OO-ASIS suitable for OO development of ASIS tools, but we have serious problems with this design. > but most certainly the abstract "=" MUST > be a primitive operation of the type it defines, or it is of no use. That's what my message was about. Probably, I had to be more short and more persistent :) From dewar@gnat.com Sat Apr 11 15:47:05 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id PAA09085; Sat, 11 Apr 1998 15:47:04 -0400 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 PAA02089 for ; Sat, 11 Apr 1998 15:48:23 -0400 (EDT) Received: by nile.gnat.com (5.0/1.20) id AA15922; Sat, 11 Apr 98 15:45:57 EDT Date: Sat, 11 Apr 98 15:45:57 EDT From: dewar@gnat.com (Robert Dewar) Message-Id: <9804111945.AA15922@nile.gnat.com> To: ASIS-Technical@sw-eng.falls-church.va.us, dewar@gnat.com, roby@ida.org, rybin@possum.srcc.msu.su Subject: Re: Issue #094: Default "=" /= Is_Equal Cc: Colket@acm.org Content-Length: 882 Status: OR Sergey says <> Well I have no idea what people mean when the say "OO approach", but you can be sure when I make a comment like this that it has nothing at all to do with what anyone might think this means, unless they are using it simply as a catch-all for abstraction. It seems perfectly appropriate to define a derived type type My_Context is new ASIS.Context; It does NOT seem aappropriate that you do not inherit Is_Equal (and other basic operations) on the newly derived types. It seems elementary design to me that equality should be a primtive operation of the relevant type! From roby@ida.org Mon Apr 13 10:04:02 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id KAA10607; Mon, 13 Apr 1998 10:04:01 -0400 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 KAA21899 for ; Mon, 13 Apr 1998 10:05:19 -0400 (EDT) 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 KAA145468; Mon, 13 Apr 1998 10:00:23 -0400 Received: from cs.ida.org by sw-eng.falls-church.va.us (8.8.8/) id NAA01592; Mon, 13 Apr 1998 13:59:30 GMT 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 KAA21852 for ; Mon, 13 Apr 1998 10:03:14 -0400 (EDT) Received: by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id KAA10583; Mon, 13 Apr 1998 10:01:55 -0400 From: roby@ida.org (Clyde Roby) Message-Id: <199804131401.KAA10583@cronus.csed.ida.org> Subject: Re: Issue #094: Default "=" /= Is_Equal (fwd) To: ASIS-Technical@sw-eng.falls-church.va.us (ASIS-Technical) Date: Mon, 13 Apr 1998 10:01:55 -0400 (EDT) X-Mailer: ELM [version 2.5 PL0b2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 1867 Status: OR Forwarded message: > From wfstanle@oakland.edu Sat Apr 11 11:58:30 1998 > Message-Id: <3.0.1.32.19980411115505.007bb790@cliff.acs.oakland.edu> > X-Sender: wfstanle@cliff.acs.oakland.edu > X-Mailer: Windows Eudora Light Version 3.0.1 (32) > Date: Sat, 11 Apr 1998 11:55:05 -0400 > To: roby@ida.org (Clyde Roby) > From: Bill Stanley > Subject: Re: Issue #094: Default "=" /= Is_Equal > In-Reply-To: <199804102011.QAA07938@cronus.csed.ida.org> > Mime-Version: 1.0 > Content-Type: text/plain; charset="us-ascii" > Content-Length: 1264 > > After listening to the various arguments, it seems to me that the root of > the problem is the Is_Identical function. The actual test for equality is > provided by the Is_Equal function where the Is_Identical function is a > predicate meaning Is_Equal AND "The contexts are equal". > > Are two elements (or other Asis entity) coming from the exact same source > code equal if they are in two different contexts? Since the underlying > source code entity is the same in both cases, I would say they are equal > even if they are used in different contexts. Question: Given a package > "FooBar" that exports a function "Foo" and a variable "Bar" and programs A > and B that with package FooBar. Is the function Foo used in program A > equal to the function Foo used in program B? The same applies to variable > Bar. I would say that they are the same even though they are used in > different programs. If the user wanted to expand the test to include a > predicate about being used in the same program then this is a different > predicate entirely. This expanded predicate does not follow the usual > ntion of equality. My point is: Is_Identical is an expanded test for > equality that does not necessarily follow the usual notion of the equality > predicate. > > Best wishes, > > Bill Stanley From sblake@sd.aonix.com Thu Apr 16 12:27:23 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id MAA19094; Thu, 16 Apr 1998 12:27:22 -0400 Received: from gw.sd.aonix.com (gw.alsys.com [136.175.17.2]) by cs.ida.org (8.8.7/8.8.7) with SMTP id MAA08896 for ; Thu, 16 Apr 1998 12:28:40 -0400 (EDT) Received: from rasht.sd.aonix.com (mailhub.alsys.com) by gw.sd.aonix.com (4.1/SMI-4.1.1) id AA12909; Thu, 16 Apr 98 09:25:47 PDT Received: from puumba.telesoft by rasht.sd.aonix.com (4.1/TS-1.2c) id AA27114; Thu, 16 Apr 98 09:23:27 PDT Received: by puumba.telesoft (SMI-8.6/SMI-SVR4) id JAA01444; Thu, 16 Apr 1998 09:23:15 -0700 Date: Thu, 16 Apr 1998 09:23:15 -0700 From: sblake@sd.aonix.com (Steve Blake @pulsar) Message-Id: <199804161623.JAA01444@puumba.telesoft> To: ASIS-Technical@sw-eng.falls-church.va.us, dewar@gnat.com, roby@ida.org, rybin@possum.srcc.msu.su Subject: Re: Issue #094: Default "=" /= Is_Equal Cc: Colket@acm.org Content-Length: 1046 Status: OR >From dewar@gnat.com Sat Apr 11 12:50:23 1998 >To: ASIS-Technical@sw-eng.falls-church.va.us, dewar@gnat.com, roby@ida.org, > rybin@possum.srcc.msu.su >Subject: Re: Issue #094: Default "=" /= Is_Equal >Cc: Colket@acm.org > > >It seems perfectly appropriate to define a derived type > > type My_Context is new ASIS.Context; > >It does NOT seem aappropriate that you do not inherit Is_Equal (and other >basic operations) on the newly derived types. It seems elementary design >to me that equality should be a primtive operation of the relevant type! Without making all the operations on Context inherited, it seems pretty useless to derive from it. What good is having a few basic operations without all the others? The same is true for other abstract types; what would be the benefit of creating derived types from an Element or Compilation_Unit? Perhaps the design decison to distribute various operations into child packages simply deters derivation of the ASIS abstractions which has no downside that I can think of. Steve From roby Thu Apr 30 15:19:41 1998 Return-Path: Received: by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id PAA12970; Thu, 30 Apr 1998 15:19:41 -0400 Date: Thu, 30 Apr 1998 15:19:41 -0400 From: roby (Clyde Roby) Message-Id: <199804301919.PAA12970@cronus.csed.ida.org> To: Colket@ACM.Org Cc: croby Subject: issue094.i Content-Length: 3386 Status: OR !ASIS Issue #094 !topic Default "=" /= Is_Equal? !reference ASIS 95-8,9,10,13,20,21,22 !from Bill Stanley 98-04-03 !keywords "=" operator Is_Equal Is_Identical abstract !discussion It appears that there is a small problem with the Asis specification. The Is_Equal function is required because the default "=" operator might not properly evaluate the test for equality (or inequality). This is fine, but it opens the door for possible programming errors. It is very easy during a moment of inattention to use the "=" operator instead of the Is_Equal function. If the default "=" operator does not always give the correct results, we then have an incorrect program. To make matters worse, there are no compiler errors generated by the improper use of the "=" operator. I ran into this issue when using a generic linked list package and instantiated a linked list of Asis.Elements from this package. The generic package uses the "=" operator to test for equality between the generic items. Since it is a relativly easy matter to implement the "=" and "/=" operators, The logical thing to do is to override the default "=" and "/=" functions. This will eliminate a possible source of errors. !resolution Accept, with Modification. !date 98-04-30 Add the following function to clause 3.5, type Context: function "=" (Left : in Context; Right : in Context) return Boolean is abstract; Add the following function to clause 3.6, type Element: function "=" (Left : in Element; Right : in Element) return Boolean is abstract; Add the following function to clause 3.10, type Compilation_Unit: function "=" (Left : in Compilation_Unit; Right : in Compilation_Unit) return Boolean is abstract; Add the following function to clause 9.1, type Container: function "=" (Left : in Container; Right : in Container) return Boolean is abstract; Add the following function to clause 20.1, type Line: function "=" (Left : in Line; Right : in Line) return Boolean is abstract; Add the following function to clause 21.1, type Id: function "=" (Left : in Id; Right : in Id) return Boolean is abstract; Add the following function to clause 22.1, type Record_Component: function "=" (Left : in Record_Component; Right : in Record_Component) return Boolean is abstract; Add the following function to clause 22.3, type Array_Component: function "=" (Left : in Array_Component; Right : in Array_Component) return Boolean is abstract; Add appropriate rationale to the new section D.4.4, Abstract "=" for private types, in Annex D: D.4.4 Abstract "=" for private types An Is_Equal function has been defined for the private types Context (Clause 3.5), Element (Clause 3.6), Compilation_Unit (Clause 3.10), Container (Clause 9.1), Line (Clause 20.1), Id (Clause 21.1), Record_Component (Clause 22.1), and Array_Component (Clause 22.3). An abstract function "=" has been defined for each private type because the semantics for the Is_Equal function for these types may differ from the semantics of the default "=" operator. This prevents improper use of the "=" operator. From colket@colket.org Tue May 5 17:04:15 1998 Return-Path: Received: from cs.ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id RAA23835; Tue, 5 May 1998 17:04:14 -0400 Received: from smtp1.erols.com (smtp1.erols.com [207.172.3.234]) by cs.ida.org (8.8.7/8.8.7) with ESMTP id RAA09764; Tue, 5 May 1998 17:05:35 -0400 (EDT) Received: from colket.org (207-172-53-144.s144.tnt4.brd.erols.com [207.172.53.144]) by smtp1.erols.com (8.8.8/8.8.5) with ESMTP id RAA09490; Tue, 5 May 1998 17:05:20 -0400 (EDT) Message-ID: <354F7EFD.174CBAEC@colket.org> Date: Tue, 05 May 1998 17:05:01 -0400 From: Currie Colket Reply-To: colket@colket.org X-Mailer: Mozilla 4.04 [en] (Win95; I) MIME-Version: 1.0 To: Clyde Roby , ASIS Technical CC: Colket@ACM.Org, croby@ida.org Subject: Issue #094 References: <199804301919.PAA12970@cronus.csed.ida.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 3934 Status: OR Dear asis-technical, Attached is issue #094 with a proposed resolution of ACCEPT and the proposed solution. The solution was developed with the originator. This solution will be made part of the ASIS DIS if there are no negative comments addressed to asis-technical by 15 May. Please send concerns to the asis-technical mailing list with Issue#094 in the subject line. v/r Currie Colket > !ASIS Issue #094 > !topic Default "=" /= Is_Equal? > !reference ASIS 95-8,9,10,13,20,21,22 > !from Bill Stanley 98-04-03 > !keywords "=" operator Is_Equal Is_Identical abstract > !discussion > > It appears that there is a small problem with the > Asis specification. The Is_Equal function is required > because the default "=" operator might not properly > evaluate the test for equality (or inequality). This > is fine, but it opens the door for possible programming > errors. It is very easy during a moment of inattention > to use the "=" operator instead of the Is_Equal function. > If the default "=" operator does not always give the > correct results, we then have an incorrect program. > > To make matters worse, there are no compiler errors > generated by the improper use of the "=" operator. > I ran into this issue when using a generic linked > list package and instantiated a linked list of > Asis.Elements from this package. The generic package > uses the "=" operator to test for equality between > the generic items. Since it is a relativly easy matter > to implement the "=" and "/=" operators, The logical > thing to do is to override the default "=" and "/=" > functions. This will eliminate a possible source > of errors. > > !resolution Accept, with Modification. > !date 98-04-30 > > Add the following function to clause 3.5, type Context: > > function "=" (Left : in Context; > Right : in Context) > return Boolean is abstract; > > Add the following function to clause 3.6, type Element: > > function "=" (Left : in Element; > Right : in Element) > return Boolean is abstract; > > Add the following function to clause 3.10, type Compilation_Unit: > > function "=" (Left : in Compilation_Unit; > Right : in Compilation_Unit) > return Boolean is abstract; > > Add the following function to clause 9.1, type Container: > > function "=" (Left : in Container; > Right : in Container) > return Boolean is abstract; > > Add the following function to clause 20.1, type Line: > > function "=" (Left : in Line; > Right : in Line) > return Boolean is abstract; > > Add the following function to clause 21.1, type Id: > > function "=" (Left : in Id; > Right : in Id) > return Boolean is abstract; > > Add the following function to clause 22.1, type Record_Component: > > function "=" (Left : in Record_Component; > Right : in Record_Component) > return Boolean is abstract; > > Add the following function to clause 22.3, type Array_Component: > > function "=" (Left : in Array_Component; > Right : in Array_Component) > return Boolean is abstract; > > Add appropriate rationale to the new section D.4.4, Abstract "=" for > private types, in Annex D: > > D.4.4 Abstract "=" for private types > > An Is_Equal function has been defined for the private types Context > (Clause 3.5), Element (Clause 3.6), Compilation_Unit (Clause 3.10), > Container (Clause 9.1), Line (Clause 20.1), Id (Clause 21.1), > Record_Component (Clause 22.1), and Array_Component (Clause 22.3). An > abstract function "=" has been defined for each private type because > the semantics for the Is_Equal function for these types may differ > from the semantics of the default "=" operator. This prevents > improper use of the "=" operator.