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

⟦da8d5d37e⟧ Ada Source

    Length: 17408 (0x4400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Statements, pragma Module_Name 4 3576, pragma Subsystem Design_Facility, seg_001c80

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



with Ada_Program;
with Declarations;
package Statements is

    -- LRM Chapter 5

    -- Local Renames:
    subtype Declaration          is Ada_Program.Declaration;
    subtype Name_Expression      is Ada_Program.Expression;
    subtype Expression           is Ada_Program.Expression;
    subtype Statement            is Ada_Program.Statement;
    subtype Identifier_Reference is Ada_Program.Identifier_Reference;

    function Is_Labeled (A_Statement : Statement) return Boolean;

    function Label_Name (A_Statement : Statement) return String;
    -- returns the null string if no label is present

    type Statement_Kinds is

       -- Simple statements:

       (A_Null_Statement, An_Assignment_Statement, A_Procedure_Call_Statement,
        An_Exit_Statement, A_Return_Statement, A_Goto_Statement,
        An_Entry_Call_Statement, A_Delay_Statement,
        An_Abort_Statement, A_Raise_Statement, A_Code_Statement,

        -- compound statements:

        An_If_Statement, A_Case_Statement, A_Loop_Statement,
        A_Block_Statement, An_Accept_Statement,
        A_Select_Statement, A_Conditional_Entry_Call_Statement,
        A_Timed_Entry_Call_Statement, Not_A_Statement);

    function Kind (A_Statement : Statement) return Statement_Kinds;


    ---------------------------------------------------------------------
    -- ASSIGNMENT STATEMENTS - LRM 5.2

    function Object_Assigned_To
                (Assignment_Statement : Statement) return Name_Expression;
    -- Returns the name of object to which the assignment is being made.


    function Assignment_Expression
                (Assignment_Statement : Statement) return Expression;
    -- Returns the expression on the right hand side of the assignment.


    ---------------------------------------------------------------------
    -- EXIT STATEMENTS - LRM 5.7

    function Exit_Label (Exit_Statement : Statement) return String;
    -- Returns the name of the exited loop if present, "" if not present


    function Exit_Condition (Exit_Statement : Statement) return Expression;
    -- Returns the when condition of the exit statement if present;
    -- returns a nil element if not present.


    function Loop_Exited (Exit_Statement : Statement) return Statement;
    -- Returns the loop statement exited by this exit statement.


    ---------------------------------------------------------------------
    -- RETURN STATEMENTS - LRM 5.8

    function Return_Expression (Return_Statement : Statement) return Expression;
    -- Returns the expression returned in the statement.
    -- If no expression exists, a nil element is returned.


    ---------------------------------------------------------------------
    -- GOTO STATEMENTS - LRM 5.9

    function Goto_Label (Goto_Statement : Statement) return String;
    -- Returns the name of label to which the goto statement may go.


    function Destination_Statement
                (Goto_Statement : Statement) return Statement;
    -- Returns the statement to which the goto statement may go.


    ---------------------------------------------------------------------
    -- IF STATEMENTS - LRM 5.3

    subtype If_Statement_Arm is Ada_Program.Element;

    function If_Arm_List (If_Statement : Statement)
                         return Ada_Program.Element_Iterator;
    -- returns a list of the arms of the if statement


    function Is_Else_Arm (Arm : If_Statement_Arm) return Boolean;
    -- Returns true if the arm is an 'ELSE' arm, false if the arm is an
    -- 'IF' or 'ELSIF'. The function Condition_Expression below may be used
    -- on the arm in the false case.


    function Condition_Expression (If_Arm : If_Statement_Arm) return Expression;
    -- Returns the condition expression for an if statement or elsif arm.


    function If_Arm_Statements (Arm : If_Statement_Arm)
                               return Ada_Program.Element_Iterator;
    -- Returns a list of the statements and pragmas in an arm.


    ---------------------------------------------------------------------
    -- CASE STATEMENTS - LRM 5.4

    function Case_Expression (Case_Statement : Statement) return Expression;
    -- Returns the expression of the case statement that determines
    -- which alternative will be taken.


    subtype Case_Statement_Alternative is Ada_Program.Element;

    function Case_Arms_List (Case_Statement : Statement)
                            return Ada_Program.Element_Iterator;
    -- Return a list of all alternatives of the case statement.

    function Is_When_Others
                (Case_Alternative : Case_Statement_Alternative) return Boolean;


    function Case_Alternative_Choices
                (Case_Alternative : Case_Statement_Alternative)
                return Ada_Program.Element_Iterator;
    -- Returns a list of the 'WHEN <choice> | <choice>' choices.
    -- Use the TYPE_INFORMATION package's CHOICES queries to extract
    --  further information about the <choice>s.

    function Case_Alternative_Statements
                (Case_Alternative : Case_Statement_Alternative)
                return Ada_Program.Element_Iterator;
    -- Returns a list of the statements and pragmas in this alternative.


    ---------------------------------------------------------------------
    -- LOOP STATEMENTS - LRM 5.5

    subtype For_Loop_Range is Ada_Program.Element;

    type Loop_Kinds is (A_For_Loop, A_While_Loop, A_Simple_Loop);

    function Loop_Kind (Loop_Statement : Statement) return Loop_Kinds;


    function While_Condition (Loop_Statement : Statement) return Expression;
    -- Returns the condition expression associated with the while loop.


    function For_Loop_Index (Loop_Statement : Statement) return For_Loop_Range;
    -- Returns the range for the loop index.
    -- Use the TYPE_INFORMATION package's operations for discrete ranges
    -- for more information.


    function For_Loop_Index_Variable (Loop_Statement : Statement) return String;
    -- Returns the name of the loop index variable.


    function Is_Reverse_Iterator (Loop_Statement : Statement) return Boolean;


    function Loop_Statements (Loop_Statement : Statement)
                             return Ada_Program.Element_Iterator;
    -- Returns a list of the statements pragmas in the body part of
    -- the loop statement.


    ---------------------------------------------------------------------
    -- BLOCK STATEMENTS - LRM 5.6

    function Declarative_Items (Block_Statement : Statement)
                               return Ada_Program.Element_Iterator;
    -- Returns a list of the declarations, pragmas, representation
    -- specifications, and use clauses in the declarative part of the block.
    -- A "Done" iterator indicates that there are no declarations.


    function Block_Body_Statements (Block_Statement : Statement)
                                   return Ada_Program.Element_Iterator;
    -- Returns a list of the statements and pragmas in the body part of the
    -- block.


    subtype Exception_Handler_Arm is Ada_Program.Element;

    function Block_Exception_Handler_Arms (Block_Statement : Statement)
                                          return Ada_Program.Element_Iterator;
    -- Returns a list of the exception handler arms of the block.


    function Exception_Choices (Exception_Arm : Exception_Handler_Arm)
                               return Ada_Program.Element_Iterator;
    -- Returns a list of exception choices in the handler arm.
    -- Use the TYPE_INFORMATION package's CHOICES queries to extract
    --  further information about the <choice>s.

    function Handler_Statements (Exception_Arm : Exception_Handler_Arm)
                                return Ada_Program.Element_Iterator;
    -- Returns a list of the statements and pragmas in the body part of
    -- the handler.


    ---------------------------------------------------------------------
    -- PROCEDURE CALL STATEMENTS - LRM 6.4

    function Called_Procedure (Procedure_Or_Entry_Call_Statement : Statement)
                              return Declaration;
    -- Returns the declaration of the called procedure or entry.


    subtype Actual_Parameter is Ada_Program.Element;

    function Procedure_Call_Parameters
                (Procedure_Or_Entry_Call_Statement : Statement;
                 Normalized                        : Boolean := False)
                return Ada_Program.Element_Iterator;
    -- Returns a list of actual parameters for the call.
    -- If Normalized is set to true, the (unspecified) default
    -- parameters will also be included in the iterator.


    function Parameter_Expression
                (Parameter : Actual_Parameter) return Expression;
    -- Returns the expression passed in for the actual parameter.


    ---------------------------------------------------------------------
    -- RAISE STATEMENTS - LRM 11.3

    function Raised_Exception
                (Raise_Statement : Statement) return Name_Expression;
    -- Returns the name of the raised exception or NIL_ELEMENT if there is
    -- none. The NAMES_AND_EXPRESSIONS package can be used to decompose
    -- the name.


    ---------------------------------------------------------------------
    -- CODE STATEMENTS - LRM 13.8

    function Qualified_Expression
                (Code_Statement : Statement) return Expression;
    -- Returns the qualified expression representing the code statement.


    ---------------------------------------------------------------------
    -- ENTRY CALL STATEMENTS - LRM 9.5

    function Family_Index
                (Entry_Call_Or_Accept_Statement : Statement) return Expression;
    -- Returns NIL_ELEMENT if not a family call/accept.

    -- The operations on procedure calls and actual parameters defined above
    -- may be used to get more information about an entry calls.


    ---------------------------------------------------------------------
    -- ACCEPT STATEMENTS - LRM 9.5

    function Accepted_Entry (Accept_Statement : Statement)
                            return Declarations.Entry_Declaration;
    -- Returns the declaration of the entry accepted in this statement.


    function Accept_Body_Statements (Accept_Statement : Statement)
                                    return Ada_Program.Element_Iterator;
    -- Returns a list of the statements and pragmas in the body part of
    -- the accept statement.


    ---------------------------------------------------------------------
    -- DELAY STATEMENTS - LRM 9.6

    function Delay_Expression (Delay_Statement : Statement) return Expression;
    -- Returns the expression for the time of the delay


    ---------------------------------------------------------------------
    -- SELECT, CONDITIONAL ENTRY and TIMED ENTRY STATEMENTS - LRM 9.7

    subtype Select_Alternative is Ada_Program.Element;

    function Select_Alternatives (Selective_Wait : Statement)
                                 return Ada_Program.Element_Iterator;
    -- Returns a list of the alternatives in the selective_wait statement.

    function Is_Guarded (Alternative : Select_Alternative) return Boolean;
    -- Returns true if a select alternative has a guard.

    function Guard (Alternative : Select_Alternative) return Expression;
    -- Returns the conditional expression guarding the alternative.
    -- May return a nil element if there is no guard.


    type Select_Alternative_Kinds is (Accept_Alternative,  
                                      Delay_Alternative,  
                                      Terminate_Alternative,  
                                      Not_A_Select_Alternative);

    function Select_Alternative_Kind (Alternative : Select_Alternative)
                                     return Select_Alternative_Kinds;


    function Select_Alternative_Statements
                (Accept_Or_Delay_Alternative : Select_Alternative)
                return Ada_Program.Element_Iterator;
    -- Returns a list of the statements and pragmas in the the accept or
    -- delay alternative including the accept statement and delay statements
    -- themselves.


    function Else_Statements
                (Selective_Wait_Or_Conditional_Entry_Call : Statement)
                return Ada_Program.Element_Iterator;
    -- Returns a list of statements and pragmas contained in the else
    -- part of a selective_wait or conditional_entry_call.  If no else
    -- part exists, a "DONE" iterator is returned.


    function Timed_Statements (Timed_Entry_Call : Statement)
                              return Ada_Program.Element_Iterator;
    -- Returns a list of statements and pragmas contained in the or
    -- part of a timed entry call, including the delay statement itself.


    function Entry_Call_Statements (Conditional_Or_Timed_Entry_Call : Statement)
                                   return Ada_Program.Element_Iterator;
    -- Returns the statement list associated with the conditional or
    -- timed entry call, including the actual entry call statement.  Use
    -- the ELSE_STATEMENTS or TIMED_STATEMENTS selector functions the get
    -- the rest of the information about the call.


    ---------------------------------------------------------------------
    -- ABORT STATEMENTS - LRM 9.10

    function Aborted_Tasks (Abort_Statement : Statement)
                           return Ada_Program.Element_Iterator;
    -- Returns a list of NAME_EXPRESSIONS for the aborted tasks.
    -- Use ADA_PROGRAM.DEFINITION to get to the task declaration, or
    -- the NAMES_AND_EXPRESSIONS package to decompose the names.

    pragma Subsystem (Design_Facility, Closed);
    pragma Module_Name (4, 3576);
    pragma Bias_Key (109);
end Statements;

E3 Meta Data

    nblk1=10
    nid=0
    hdr6=20
        [0x00] rec0=1e rec1=00 rec2=01 rec3=000
        [0x01] rec0=01 rec1=00 rec2=10 rec3=046
        [0x02] rec0=19 rec1=00 rec2=02 rec3=066
        [0x03] rec0=1c rec1=00 rec2=03 rec3=020
        [0x04] rec0=19 rec1=00 rec2=04 rec3=072
        [0x05] rec0=1a rec1=00 rec2=05 rec3=01a
        [0x06] rec0=19 rec1=00 rec2=06 rec3=068
        [0x07] rec0=1b rec1=00 rec2=07 rec3=030
        [0x08] rec0=15 rec1=00 rec2=08 rec3=03c
        [0x09] rec0=19 rec1=00 rec2=09 rec3=03c
        [0x0a] rec0=1a rec1=00 rec2=0a rec3=062
        [0x0b] rec0=1b rec1=00 rec2=0b rec3=018
        [0x0c] rec0=15 rec1=00 rec2=0c rec3=000
        [0x0d] rec0=17 rec1=00 rec2=0d rec3=028
        [0x0e] rec0=14 rec1=00 rec2=0e rec3=000
        [0x0f] rec0=05 rec1=00 rec2=0f rec3=000
    tail 0x20100f7687da18dce4d0a 0x42a00088462065003