From rybin@possum.srcc.msu.su Sat Jan 11 12:22:26 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id MAA13980; Sat, 11 Jan 1997 12:22:26 -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 AA09208; Sat, 11 Jan 97 12:22:40 EST Received: from crocus.gamma.ru by sw-eng.falls-church.va.us (8.7.1/) id RAA12650; Sat, 11 Jan 1997 17:16:56 GMT Received: from srcc.UUCP (uucp@localhost) by crocus.gamma.ru (8.7.6/8.7.3) with UUCP id UAA27948 for asis-officers@sw-eng.falls-church.va.us; Sat, 11 Jan 1997 20:19:30 +0300 (MSK) Received: by gamma.srcc.msu.su; Sat, 11 Jan 1997 20:19:21 +0300 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Sat, 11 Jan 1997 20:12:58 +0300 To: asis-officers@sw-eng.falls-church.va.us Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Sat, 11 Jan 97 20:12:58 +0300 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Root_Type_Kinds problem Lines: 56 Content-Length: 2171 Status: OR Consider the definition of Root_Type_Kinds: ------------------------------------------------------------------------------ -- Section 3.11.13 type Root_Type_Kinds ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Root_Type_Kinds -- Literals -- RM 95 ------------------------------------------------------------------------------ type Root_Type_Kinds is ( Not_A_Root_Type_Definition, -- An unexpected element A_Root_Integer_Definition, -- 3.5.4(9) A_Root_Real_Definition, -- 3.5.6(2) A_Root_Fixed_Definition, -- 3.5.6(2) A_Universal_Integer_Definition, -- 3.5.4(10) A_Universal_Real_Definition, -- 3.5.6(4) A_Universal_Fixed_Definition); -- 3.5.6(4) ------------------------------------------------------------------------------ There are two problems here: 1. All the references to RM 95 seem to be completely wrong. 2. RM 95 defines the root types for integers and reals (that is, root_integer and root_real, RM 95 3.4.1(8), but it does not define anything related to root_FIXED! So the correction may be: ------------------------------------------------------------------------------ -- Section 3.11.13 type Root_Type_Kinds ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Root_Type_Kinds -- Literals -- RM 95 ------------------------------------------------------------------------------ type Root_Type_Kinds is ( Not_A_Root_Type_Definition, -- An unexpected element A_Root_Integer_Definition, -- 3.4.1(8) A_Root_Real_Definition, -- 3.4.1(8) A_Universal_Integer_Definition, -- 3.4.1(6) A_Universal_Real_Definition, -- 3.4.1(6) A_Universal_Fixed_Definition); -- 3.4.1(6) ------------------------------------------------------------------------------ Sergey Rybin From rybin@possum.srcc.msu.su Sun Jan 12 11:18:16 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id LAA14698; Sun, 12 Jan 1997 11:18:16 -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 AA14565; Sun, 12 Jan 97 11:18:29 EST Received: from crocus.gamma.ru by sw-eng.falls-church.va.us (8.7.1/) id QAA22019; Sun, 12 Jan 1997 16:12:32 GMT Received: from srcc.UUCP (uucp@localhost) by crocus.gamma.ru (8.7.6/8.7.3) with UUCP id TAA05334 for asis-officers@sw-eng.falls-church.va.us; Sun, 12 Jan 1997 19:15:08 +0300 (MSK) Received: by gamma.srcc.msu.su; Sun, 12 Jan 1997 19:14:48 +0300 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Sun, 12 Jan 1997 17:36:18 +0300 To: asis-officers@sw-eng.falls-church.va.us Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Sun, 12 Jan 97 17:36:18 +0300 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Names of class-wide types and universal and root numeric types Lines: 13 Content-Length: 514 Status: OR Some more questions about root and universal numeric types and class-wide types in ASIS. Suppose Type_Def is an ASIS Element representing the (implicit - RM 95 3.4.1(3)) declaration of some class-wide type, universal numeric type or root_integer or root_real type. What should be the result of applying the Asis.Declarations.Names query to Type_Def? And then - what should we get if applying the Asis.Declarations.Defining_Name_Image to the Element returned by Asis.Declarations.Names (Type_Def)? Sergey Rybin. From rybin@possum.srcc.msu.su Mon Mar 3 06:21:39 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id GAA12132; Mon, 3 Mar 1997 06:21:38 -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 AA05104; Mon, 3 Mar 97 06:22:00 EST Received: from crocus.gamma.ru by sw-eng.falls-church.va.us (8.7.1/) id KAA07873; Mon, 3 Mar 1997 10:23:16 GMT Received: from srcc.UUCP (uucp@localhost) by crocus.gamma.ru (8.7.6/8.7.3) with UUCP id NAA05565 for asis-comment@sw-eng.falls-church.va.us; Mon, 3 Mar 1997 13:25:52 +0300 (MSK) Received: by gamma.srcc.msu.su; Mon, 3 Mar 1997 13:25:00 +0300 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Mon, 3 Mar 1997 12:57:22 +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: Mon, 3 Mar 97 12:57:21 +0300 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Root and universal types in ASIS Lines: 76 Content-Length: 2879 Status: OR !topic Root an universal types in ASIS !reference ASIS 95-16.7, 3.11.13 !from Sergey Rybin !keywords A_Root_Type_Definition, Corresponding_Root_Type, semantic queries !discussion What should be returned by Asis.Definitions.Corresponding_Root_Type (its definition is appended to this comment) in the following situation: type My_Int is range -100 .. 100; type My_New_Int is new My_Int; ^^^^^^^^^^^ | Elem What should be the result of Corresponding_Root_Type (Elem): the declaration of My_Int or the artificial declaration of the root_integer type? RM95 3.5.4 (14) says: A type defined by an integer_type_definition is implicitly derived from root_integer, an anonymous predefined (specific) integer type, whose base range is System.Min_Int .. System.Max_Int. However, the base range of the new type is not inherited from root_integer, but is instead determined by the range or modulus specified by the integer_type_definition. Integer literals are all of the type universal_integer, the universal type (see 3.4.1) for the class rooted at root_integer, allowing their use with the operations of any integer type. It gives the formal background for returning the definition of root_integer. From the other side, returning the definition of the user-defined type My_Int seems to be much more useful from an application's viewpoint. And the definition of Corresponding_Root_Type does not give the final answer. I think, that the clarification comments should be added to Corresponding_Root_Type. My opinion is that this function should not return definition of root integer types. Another problem is that the ASIS says nothing about how the types of Root_Type_Kinds may be obtained. I think some clarification comments should be added. Sergey Rybin. --------------------------------------------------------------------- ------------------------------------------------------------------------------ -- Section 16.7 function Corresponding_Root_Type ------------------------------------------------------------------------------ function Corresponding_Root_Type (Type_Definition : in Asis.Type_Definition) return Asis.Declaration; ------------------------------------------------------------------------------ -- Type_Definition - Specifies the derived_type_definition to query -- -- This function recursively unwinds all type derivations and subtyping to -- arrive at a full_type_declaration that is neither a derived type or a -- subtype. -- -- Appropriate Type_Kinds: -- A_Derived_Type_Definition -- A_Derived_Record_Extension_Definition -- -- Returns Declaration_Kinds: -- An_Ordinary_Type_Declaration -- A_Task_Type_Declaration -- A_Protected_Type_Declaration -- A_Formal_Type_Declaration -- From sblake@alsys.com Tue Mar 11 12:50:04 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id MAA00222; Tue, 11 Mar 1997 12:50:03 -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 AA18196; Tue, 11 Mar 97 12:50:29 EST Received: from gw.alsys.com by sw-eng.falls-church.va.us (8.7.1/) id RAA25181; Tue, 11 Mar 1997 17:31:34 GMT Received: from rasht.alsys.com (mailhub.alsys.com) by gw.alsys.com (4.1/SMI-4.1.1) id AA08554; Tue, 11 Mar 97 09:34:40 PST Received: from puumba.telesoft by rasht.alsys.com (4.1/TS-1.2c) id AA17364; Tue, 11 Mar 97 09:33:46 PST Received: by puumba.telesoft (SMI-8.6/SMI-SVR4) id JAA13210; Tue, 11 Mar 1997 09:33:44 -0800 Date: Tue, 11 Mar 1997 09:33:44 -0800 From: sblake@alsys.com (Steve Blake @pulsar) Message-Id: <199703111733.JAA13210@puumba.telesoft> To: asis-comment@sw-eng.falls-church.va.us, rybin@possum.srcc.msu.su Subject: Re: Root and universal types in ASIS Cc: rybin@crocus.gamma.ru Content-Length: 1041 Status: OR >What should be returned by Asis.Definitions.Corresponding_Root_Type >(its definition is appended to this comment) in the following situation: > >type My_Int is range -100 .. 100; > >type My_New_Int is new My_Int; > ^^^^^^^^^^^ > | > > Elem > >What should be the result of Corresponding_Root_Type (Elem): the declaration >of My_Int or the artificial declaration of the root_integer type? > ... >I think, that the clarification comments should be added to >Corresponding_Root_Type. My opinion is that this function should not >return definition of root integer types. > >Another problem is that the ASIS says nothing about how the types of >Root_Type_Kinds may be obtained. I think some clarification comments >should be added. > >Sergey Rybin. I agree. Return the useful root_type for the class, in this case My_Int. I think the only way to obtain an element of a Root_Type_Kind is Type_Declaration_View(Corresponding_Expression_Type(Int_Literal_Expression)) Steve Blake