DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦b5e7b7f8d⟧ Ada Source

    Length: 11264 (0x2c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Lrm_Utilities, seg_0045e3

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



--| @SUMMARY Provides miscellaneous interfaces that extend the capability
--| of the LRM interfaces or work around bugs.
--|
with Pragmas;
with Ada_Program;
with Declarations;
with Type_Information;
package Lrm_Utilities is

    --| @DESCRIPTION Returns the number of elements in a iterator/list
    function Count (Elements : Ada_Program.Element_Iterator) return Natural;
    function Count (Elements : Ada_Program.Element_List)     return Natural;

    --| @DESCRIPTION This function recursively unwinds all type derivations
    --| and subtyping to arrive at a type definition which is neither a
    --| derived type or a subtype.  It does not walk through private types
    --| as Type_Information.Ground_Type does.
    function Ground_Type (Type_Def : Ada_Program.Type_Definition)
                         return Ada_Program.Type_Definition;

    --| @DESCRIPTION  Deterimines if a loop is named or not
    function Is_Named_Loop
                (Loop_Statement : Ada_Program.Statement) return Boolean;

    --| @DESCRIPTION Get the statement element from a named loop.
    function Get_Named_Loop (Statement_Element : Ada_Program.Element)
                            return Ada_Program.Statement;

    --| @DESCRIPTION returns the string name of a named loop.
    function Loop_Name (Named_Loop : Ada_Program.Element) return String;

    --| @DESCRIPTION Determines whether or not the item is an actual
    --| declaration or whether it is the id of the declaration.
    function Is_Actual_Declaration (Item : Ada_Program.Element) return Boolean;

    --| @DESCRIPTION Determines whether or not the item is an actual
    --| declaration or whether it is a record component that is reported
    --| as a variable declaration.
    function Is_Actual_Variable_Declaration
                (Variable_Declaration : Ada_Program.Element) return Boolean;

    --| @DESCRIPTION returns the identifier of the compilation unit that
    --| contains the element.
    function Comp_Unit_Id (For_Element : Ada_Program.Element)
                          return Ada_Program.Identifier_Definition;

    --| @DESCRIPTION returns the full name reference given any component
    --| of the name. (ie returns P.Rec.Comp when given either P, Rec or Comp).
    function Get_Full_Name (Simple_Name : Ada_Program.Element)
                           return Ada_Program.Element;

    function Is_Name_Id (Elem : Ada_Program.Element) return Boolean;

    --| @DESCRIPTION Determines if the object has explicit initialization or
    --| not.  This fixes a bug the with the Delta 1 release of LRM interfaces.
    function Is_Initialized
                (Object_Decl : Declarations.Object_Declaration) return Boolean;

    --| @DESCRIPTION Determines whether the supprogram is defined
    --| in the scope (is visibleE to the element).
    function In_Scope
                (Subprogram_Name : String; Of_Element : Ada_Program.Element)
                return Boolean;

    --| @DESCRIPTION Returns the name of the any pragram whether predefined
    --| or R1000 implementation defined.
    function Pragma_Name (For_Pragma : Pragmas.Pragma_Kinds) return String;


    --| @DESCRIPTION Provides a qualified reference for a declaration
    --| including any packages that it is declared within.
    function Qualified_Reference (Decl : Ada_Program.Declaration) return String;

    --| @DESCRIPTION Determines whether the declaration is a library unit
    --| declaration
    function Is_Library_Unit_Id (Decl : Ada_Program.Declaration) return Boolean;

    --| @DESCRIPTION This function computes the static value of an
    --| integer expression.  This also fixes a Delta1 bug in LRM.
    --| @RAISES (Not_Static)
    function Static_Value
                (Expression : Ada_Program.Expression) return Long_Integer;

    --| @DESCRIPTION These functions computes the static value of an
    --| real expression.  This also fixes a Delta1 bug in LRM.
    --| @RAISES (Not_Static)
    function Static_Value (Expression : Ada_Program.Expression) return Float;

    --| @DESCRIPTION Raised if the expression has no static value.
    Not_Static : exception;


    --| @DESCRIPTION function suitable for use with the map generic
    function Hash (Elem : Ada_Program.Element) return Integer;

    --| @DESCRIPTION returns TRUE if the type declaration is and Integer
    --| or real type
    function Is_Numeric_Type (Type_Decl : Ada_Program.Element) return Boolean;

    --| @DESCRIPTION Determines if the identifier reference is part of a
    --| named parameter association, ie the R in P (R => 7);
    function Is_Named_Parameter_Id
                (Id_Ref : Ada_Program.Identifier_Reference) return Boolean;

    --| @DESCRIPTION returns the position of an enumeration literal or
    --| enumeration identifier located in an enumeration type definition.
    function Position_Number
                (Enum_Lit_Or_Id : Ada_Program.Element) return Long_Integer;

    --| @DESCRIPTION Returns the expression associated with a named
    --| component of an aggregate.
    --| @RAISES (No_Component)
    function Get_Component_Expression
                (Named : String; In_Aggregate : Ada_Program.Element)
                return Ada_Program.Element;

    --| @DESCRIPTION Raised if the aggregate does not contain a component
    --| with the specified name.
    No_Component : exception;

    type Type_Kinds is (An_Integer_Type,  
                        A_Float_Type,  
                        A_Fixed_Type,  
                        An_Enumeration,  
                        A_Boolean_Type,  
                        A_Character_Type,  
                        A_String_Type,  
                        A_Record_Type,  
                        An_Array_Type,  
                        An_Access_Type,  
                        A_Derived_Type,  
                        A_Task_Type,  
                        A_Private_Type,  
                        A_Limited_Private_Type,  
                        A_Subtype,  
                        None_Of_Above);

    --| @DESCRIPTION Determines the kind of a type definition.
    --| This expands the capability of Type_Information.Kind in that
    --| if breaks out boolean, character, and string types.
    function Get_Kind (Type_Def : Type_Information.Type_Definition)
                      return Type_Kinds;

    --| @DESCRIPTION Given a multi-line Ada_Program element, This function
    --|    returns the line number of the last line of the element.
    function Last_Line_Number
                (For_This_Element : Ada_Program.Element) return Natural;


    --| @DESCRIPTION Enumeration rep clauses can have optional Size
    --|    rep clauses.  This function determines which of these exist
    --|    for a given type definition, and return the clause that
    --|    appears later in the code.  This is useful for defining
    --|    constants of that data type -- those declarations must appear
    --|    after the type definition and any rep clauses.  If the element
    --|    passed into the function is not an enumeration type, the
    --|    function returns the Nil element.
    function Last_Rep_Clause (For_This_Type_Definition : Ada_Program.Element)
                             return Ada_Program.Element;


    --| @DESCRIPTION This function returns a list of all the data types
    --|    defined in an ada unit.
    function Types_Defined (In_This_Ada_Unit : in String)
                           return Ada_Program.Element_List;


    --| @DESCRIPTION This function returns a valid initial value for
    --|    a data type, in string form.
    --| @RAISES [Its_A_Private_Type, It_Has_No_Definition]
    function Initial_Value
                (For_This_Type_Definition : Ada_Program.Type_Definition)
                return String;

    Its_A_Private_Type   : exception;
    It_Has_No_Definition : exception;

end Lrm_Utilities;

E3 Meta Data

    nblk1=a
    nid=0
    hdr6=14
        [0x00] rec0=18 rec1=00 rec2=01 rec3=046
        [0x01] rec0=00 rec1=00 rec2=0a rec3=008
        [0x02] rec0=14 rec1=00 rec2=02 rec3=032
        [0x03] rec0=14 rec1=00 rec2=03 rec3=026
        [0x04] rec0=16 rec1=00 rec2=04 rec3=058
        [0x05] rec0=17 rec1=00 rec2=05 rec3=02a
        [0x06] rec0=18 rec1=00 rec2=06 rec3=03e
        [0x07] rec0=15 rec1=00 rec2=07 rec3=052
        [0x08] rec0=16 rec1=00 rec2=08 rec3=028
        [0x09] rec0=04 rec1=00 rec2=09 rec3=000
    tail 0x215003f7a815c657e2611 0x42a00088462061e03