|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T V ┃
Length: 19202 (0x4b02) Types: TextFile Names: »V«
└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3 └─ ⟦fc9b38f02⟧ »DATA« └─⟦9b46a407a⟧ └─⟦c84a2ac9b⟧ └─⟦this⟧
with Ada_Program; package Declarations is -- -- The use of this system is subject to the software license terms and -- conditions agreed upon between Rational and the Customer. -- -- Copyright 1987, 1988, 1989, 1990 by Rational. -- -- RESTRICTED RIGHTS LEGEND -- -- Use, duplication, or disclosure by the Government is subject to -- restrictions as set forth in subdivision (b)(3)(ii) of the Rights in -- Technical Data and Computer Software clause at 52.227-7013. -- -- -- Rational -- 3320 Scott Boulevard -- Santa Clara, California 95054 -- -- PROPRIETARY AND CONFIDENTIAL INFORMATION OF RATIONAL; -- USE OR COPYING WITHOUT EXPRESS WRITTEN AUTHORIZATION -- IS STRICTLY PROHIBITED. THIS MATERIAL IS PROTECTED AS -- AN UNPUBLISHED WORK UNDER THE U.S. COPYRIGHT ACT OF -- 1976. CREATED 1987, 1988, 1989, 1990. ALL RIGHTS RESERVED. -- -- LRM Chapter 3 -- Local Renaming: subtype Compilation_Unit is Ada_Program.Compilation_Unit; subtype Declaration is Ada_Program.Declaration; subtype Expression is Ada_Program.Expression; subtype Name_Expression is Ada_Program.Name; subtype Statement is Ada_Program.Statement; subtype Type_Definition is Ada_Program.Type_Definition; subtype Association_Iterator is Ada_Program.Association_Iterator; subtype Declarative_Part_Iterator is Ada_Program. Declaration_Or_Context_Clause_Or_Representation_Clause_Or_Pragma_Iterator; --------------------------------------------------------------- type Declaration_Kinds is (A_Variable_Declaration, A_Constant_Declaration, A_Deferred_Constant_Declaration, An_Integer_Number_Declaration, A_Real_Number_Declaration, A_Type_Declaration, An_Incomplete_Type_Declaration, A_Subtype_Declaration, A_Package_Declaration, A_Package_Body_Declaration, A_Procedure_Declaration, A_Procedure_Body_Declaration, A_Function_Declaration, A_Function_Body_Declaration, A_Package_Rename_Declaration, A_Procedure_Rename_Declaration, A_Function_Rename_Declaration, An_Object_Rename_Declaration, An_Exception_Rename_Declaration, A_Generic_Package_Declaration, A_Generic_Procedure_Declaration, A_Generic_Function_Declaration, A_Package_Instantiation, A_Procedure_Instantiation, A_Function_Instantiation, A_Task_Declaration, A_Task_Body_Declaration, A_Task_Type_Declaration, An_Entry_Declaration, An_Exception_Declaration, A_Procedure_Subunit, A_Function_Subunit, A_Package_Subunit, A_Task_Subunit, A_Subprogram_Formal_Parameter, A_Generic_Formal_Parameter, A_Discriminant, A_Record_Component, Not_A_Declaration); function Kind (A_Declaration : Declaration) return Declaration_Kinds; subtype Object_Declaration is Declaration; -- LRM 3.2.1 subtype Type_Declaration is Declaration; -- LRM 3.3.1 subtype Subtype_Declaration is Declaration; -- LRM 3.3.2 subtype Package_Declaration is Declaration; -- LRM 7.1 subtype Procedure_Declaration is Declaration; -- LRM 6.1 subtype Function_Declaration is Declaration; -- LRM 6.1 subtype Task_Declaration is Declaration; -- LRM 9.1 subtype Task_Specification is Type_Definition; -- LRM 9.2 subtype Entry_Declaration is Declaration; -- LRM 9.5 subtype Exception_Declaration is Declaration; -- LRM 11.1 function Is_Visible (A_Declaration : Declaration) return Boolean; -- Returns True for units that are library level package or subprogram -- specs, and for declarations inside library level package specs. function Is_In_Private_Part (A_Declaration : Declaration) return Boolean; -- Returns true is the declaration appears in the private part -- of a package. function Is_Generic_Formal (Element : Ada_Program.Element) return Boolean; -- Returns true if a subprogram, type or object declaration is -- a generic formal parameter or was derived from the GENERIC_PARAMETERS -- selector. function Is_Subprogram_Formal (Element : Ada_Program.Element) return Boolean; -- Returns true if the element was derived from the -- SUBPROGRAM_PARAMETERS selector. function Identifiers (A_Declaration : Declaration) return Ada_Program.Element_List; -- Returns a list of the identifier(s) introduced by the declaration. function Name (A_Declaration : Declaration) return String; -- Returns the identifier(s) image. Basically the same as calling -- ADA_PROGRAM.STRING_NAME on the result of IDENTIFIERS for a -- declaration. function Enclosing_Declaration (Element : Ada_Program.Element) return Declaration; -- Returns the enclosing declaration for any element. -- NOTE: This is the identity function if given a declaration. --------------------------------------------------------------- -- OBJECT DECLARATIONS - LRM 3.2.1 -- The following operations apply to object declarations, component -- declarations and discriminant specifications. function Is_Initialized (Object_Decl : Object_Declaration) return Boolean; -- Determines whether the object declaration includes an initial -- value. function Initial_Value (Object_Decl : Object_Declaration) return Expression; -- Returns the optional expression that initializes an object or number -- declaration, NIL_ELEMENT is otherwise returned. function Object_Type (Object_Declaration_Or_Id : Object_Declaration) return Type_Definition; -- Returns the subtype indication following the colon in the object -- declaration. This function will take either a declaration element -- or identifier definition associated with the declaration. function Type_Mark (Subprogram_Formal_Or_Deferred_Constant : Declaration) return Name_Expression; -- Returns the type mark associated with Subprogram Formal -- parameters and Deferred Constants. Selectors in -- NAMES_AND_EXPRESSIONS can then be used to extract more information. ----------------------------------------------------------------- -- TYPE DECLARATIONS - LRM 3.3 function Is_Private (Type_Decl : Type_Declaration) return Boolean; function Is_Limited (Type_Decl : Type_Declaration) return Boolean; function Is_Incomplete (Type_Decl : Type_Declaration) return Boolean; function Type_Specification (Type_Declaration_Or_Id : Declaration) return Type_Definition; -- Returns the type definition for a given type or subtype declaration -- or the identifier definition associated with the declaration. -- See the enumeration TYPE_INFORMATION.TYPE_DEFINITION_KINDS for -- the various kinds of type definitions. function Full_Type_Declaration (Type_Declaration_Or_Id : Declaration) return Type_Declaration; -- Given the declaration of an incomplete type, returns the -- corresponding full type declaration. A nil element is returned -- if the full type declaration is not yet compiled. NOTE: this is -- the identity function if given a non-incomplete type declaration. --------------------------------------------------------------- -- PROGRAM UNIT DECLARATIONS -- LRM Chapters 5, 6, 9 -- Program units are package, subprogram, and task specifications -- and bodies. function Is_Spec (Program_Unit : Declaration) return Boolean; -- Determines whether a package, procedure, function, or task -- is a specification. function Is_Package (A_Declaration : Declaration) return Boolean; function Is_Task (A_Declaration : Declaration) return Boolean; function Is_Procedure (A_Declaration : Declaration) return Boolean; function Is_Function (A_Declaration : Declaration) return Boolean; function Is_Subprogram (A_Declaration : Declaration) return Boolean; -- Determines if a declaration is a particular kind of program unit -- declaration regardless if it is generic, an instantiation, rename, -- spec or body. function Specification (Decl_Or_Id : Declaration) return Declaration; -- Returns the specification of a program unit declaration or identifier. -- If a specification is provided the same element is returned. If no -- specification exists a nil element is returned. function Unit_Body (Decl_Or_Id : Declaration) return Declaration; -- Returns the body for a given program unit declaration or identifier -- definition associated with the declaration. If a body is input, -- the same element is returned. If no body exists a nil element is -- returned. If a stub is given, the subunit is returned. --------------------------------------------------------------- -- PACKAGES -- LRM Chapter 7 function Visible_Part_Declarations (Package_Specification : Package_Declaration) return Declarative_Part_Iterator; -- Returns a list of all declarations, representation -- specifications, and pragmas in the visible part of a package in -- the order of appearance. When applied to a package -- instantiation, this operation yields the instance's visible -- declarations. function Private_Part_Declarations (Package_Specification : Package_Declaration) return Declarative_Part_Iterator; -- Returns a list of all declarations, representation -- specifications, and pragmas in the private part of the package in -- order of appearance. When applied to a package instantiation, -- this operation yields the instance's private declarations. function Package_Body_Block (Package_Body : Package_Declaration) return Statement; -- Returns the block statement for a package body including -- the declarative part, any elaboration statements, and -- exception handler if any. The selectors for blocks in STATEMENTS -- can then be used for further decomposition. --------------------------------------------------------------- -- SUBPROGRAMS subtype Subprogram_Formal_Parameter is Ada_Program.Element; subtype Subprogram_Formal_Parameter_Iterator is Ada_Program.Element_Iterator; type Subprogram_Parameter_Kinds is (Default_In_Parameter, In_Parameter, Out_Parameter, In_Out_Parameter, Not_A_Parameter); function Subprogram_Parameter_Kind (Of_Parameter : Subprogram_Formal_Parameter) return Subprogram_Parameter_Kinds; function Subprogram_Parameters (Subprogram_Or_Entry : Declaration) return Subprogram_Formal_Parameter_Iterator; -- Returns an ordered list of formal parameter declarations. -- Use IS_INITIALIZED and INITIAL_VALUE to query -- the information related to the presence of the default parameter -- initialization, and use TYPE_MARK to obtain the parameter type mark. -- When applied to a subprogram instantiation, this operation yields -- the instance's parameters. function Return_Type (Of_Function : Function_Declaration) return Name_Expression; -- Returns the name expression of the return type, selectors in -- NAMES_AND_EXPRESSIONS can then be used to extract more information. -- When applied to a function instantiation, this operation yields -- the instance's return type. function Is_Operator_Definition (Function_Declaration : Declaration) return Boolean; function Subprogram_Block (Subprogram_Body : Declaration) return Statement; -- Returns the block statement for the body including -- the declarative part, any elaboration statements, and -- exception handler if any. The selectors for blocks in STATEMENTS -- can then be used for further decomposition. --------------------------------------------------------------- -- RENAMINGS -- LRM Chapter 8.5 function Is_Renaming_Declaration (A_Declaration : Declaration) return Boolean; function Renamed_Name (A_Declaration : Declaration) return Name_Expression; -- Returns the name of the entity being renamed. It can be a simple -- name, an operator symbol, an indexed component, a slice, a -- selected component or an attribute. function Renamed_Declaration (A_Declaration : Declaration) return Declaration; -- If applied to the renaming of a simple name, an operator symbol -- or an expanded name, returns the name's declaration. Returns nil -- element otherwise. Use of this function is discouraged. --------------------------------------------------------------- -- GENERIC PACKAGE and SUBPROGRAM SPECIFICATIONS -- LRM Chapter 12 function Is_Generic (Package_Or_Subprogram_Decl : Declaration) return Boolean; subtype Generic_Formal_Parameter is Ada_Program.Element; subtype Generic_Formal_Parameter_Or_Pragma_Iterator is Ada_Program.Element_Iterator; type Generic_Parameter_Kinds is (Subprogram, Object, Private_Type, Limited_Private_Type, Discrete_Type, Integer_Type, Floating_Point_Type, Fixed_Point_Type, Array_Type, Access_Type, Not_A_Generic_Parameter); function Generic_Parameter_Kind (Generic_Parameter : Generic_Formal_Parameter) return Generic_Parameter_Kinds; function Generic_Parameters (Generic_Decl : Declaration) return Generic_Formal_Parameter_Or_Pragma_Iterator; -- Returns a list of formal parameters to the generic in order of -- appearance. -- Object parameters can be decomposed with subprogram formal parameter -- and object declaration operations. -- Array and access type declarations can be decomposed with the -- operations corresponding to their types. -- Subprogram parameters can be queried by the following operations and -- can be further decomposed with subprogram declaration operations. type Generic_Formal_Subprogram_Default_Kinds is (Box, Name, None, Not_A_Generic_Formal_Subprogram); function Generic_Formal_Subprogram_Default_Kind (A_Generic_Formal_Subprogram : Generic_Formal_Parameter) return Generic_Formal_Subprogram_Default_Kinds; function Generic_Formal_Subprogram_Default (A_Generic_Formal_Subprogram : Generic_Formal_Parameter) return Name_Expression; function Is_Generic_Instantiation (Package_Or_Subprogram_Decl : Declaration) return Boolean; function Generic_Unit_Declaration (Generic_Instantiation_Or_Unit_Declaration : Declaration) return Declaration; -- Returns the declaration of the generic unit being instantiated. function Generic_Instantiation_Parameters (Generic_Instantiation : Declaration) return Association_Iterator; -- Returns an ordered list of parameter associations of a generic -- instantiation. The operations defined in package ASSOCIATIONS -- can be used to decompose them. function Generic_Actual_Parameters (Generic_Instantiation : Declaration) return Association_Iterator renames Generic_Instantiation_Parameters; -- Use of this form is discouraged. --------------------------------------------------------------- -- TASK DECLARATIONS -- LRM Chapter 9 function Task_Type_Specification (Task_Decl : Task_Declaration) return Task_Specification; -- Returns a task specification for a given task declaration. function Entry_Declarations (Task_Decl : Task_Declaration) return Declarative_Part_Iterator; -- Returns a list of entry declarations associated with a TASK declaration. function Task_Body_Block (Task_Body : Task_Declaration) return Statement; -- Returns the block statement for the body including -- the declarative part, any elaboration statements, and -- exception handler if any. --------------------------------------------------------------- -- ENTRY DECLARATIONS -- LRM Chapter 9.5 -- The operations available for decomposing subprograms will -- also work for entry declarations. subtype Family_Index_Range is Ada_Program.Element; function Family_Index (Entry_Family : Entry_Declaration) return Family_Index_Range; -- Returns the index range for the entry family. If the entry is not -- a family, a nil element is returned. -- Use operations on discrete ranges in TYPE_INFORMATION to analyze -- the family index range. --------------------------------------------------------------- -- EXCEPTION DECLARATIONS -- LRM Chapter 11 -- The selector IDENTIFIERS can be used to get a list of identifier -- definitions introduced by an exception declaration. --------------------------------------------------------------- -- SUBUNIT STUBS -- LRM Chapter 10.2 function Subunit (Of_Body_Stub : Declaration) return Compilation_Unit; -- Returns the compilation unit corresponding to the subunit stub. pragma Subsystem (Design_Facility, Closed); pragma Module_Name (4, 3572); pragma Bias_Key (27); end Declarations;