DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T V

⟦89e8b2f6b⟧ TextFile

    Length: 4135 (0x1027)
    Types: TextFile
    Names: »V«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

with Diana_Utilities;
with String_Table;
with Map_Generic;
with Set_Generic;
with List_Generic;
with Bounded_String;
with Directory_Tools;
package Test_Program_Generation is

    package Object renames Directory_Tools.Object;

    type Unit_Test_Data is private;

    procedure Initialize (Unit_Data : in out Unit_Test_Data);

    type Subprogram_Key is private;

    procedure Register_Test_Package (Package_Object : Object.Handle;
                                     With_Data : in out Unit_Test_Data);

    type Type_Kind is (A_Boolean, A_Character, A_String,
                       An_Integer, A_Duration, A_Float, Other);

    procedure Register_Function (Obj : Object.Handle;  
                                 Op_Kind : Diana_Utilities.Operator;
                                 Return_Type_Kind : Type_Kind;
                                 Predefined : Boolean;
                                 Return_Type_Name : String;
                                 Return_Type_Package : String;
                                 With_Data : in out Unit_Test_Data;
                                 Key : out Subprogram_Key);

    procedure Register_Procedure (Obj : Object.Handle;
                                  With_Data : in out Unit_Test_Data;
                                  Key : out Subprogram_Key);

    type Mode_Kind is (In_Mode, Out_Mode, In_Out_Mode);

    procedure Register_Parameter (Formal_Name : String;
                                  Kind : Type_Kind;
                                  Predefined : Boolean;
                                  Mode : Mode_Kind;
                                  Type_Name : String;
                                  -- package that defines the type:
                                  Defining_Package : String;
                                  -- a predefined type will be null
                                  Init_Expression : String;
                                  Key : Subprogram_Key;
                                  With_Data : in out Unit_Test_Data);

    procedure Generate_Unit_Test_Program
                 (In_Context : String; From_Data : Unit_Test_Data);

private
    type Subprogram_Key is range 0 .. 10000;

    package Bounded renames Bounded_String;

    subtype Ada_Name is Bounded.Variable_String (256);

    Blank_String : constant String (1 .. 256) := (others => ' ');

    Blank_Name : Ada_Name := Bounded.Value (Blank_String);

    type Parameter_Id is
        record
            Kind : Type_Kind;
            Type_Name : Ada_Name := Blank_Name;
            Package_Name : Ada_Name;
        end record;

    type Parameter_Record is
        record
            Formal_Name : Ada_Name := Blank_Name;
            Mode : Mode_Kind;
            Id : Parameter_Id;
            Initial_Expression : Ada_Name := Blank_Name;
            Is_Predefined : Boolean;
            Is_String : Boolean;
        end record;

    package Parameter_List is new List_Generic (Parameter_Record);

    type Subprogram_Kind is (A_Function, A_Procedure);

    type Subprogram_Record is
        record
            Subprogram_Object : Object.Handle;
            Test_Name : Ada_Name;
            Simple_Name : Ada_Name;
            Op_Kind : Diana_Utilities.Operator :=
               Diana_Utilities.Not_An_Operator;
            Kind : Subprogram_Kind;
            Return_Type : Parameter_Record;
            Parameters : Parameter_List.List;
            Out_Parameters_Found : Boolean := False;
        end record;

    function Hash (Subprogram : Subprogram_Key) return Integer;

    package Subprogram_Map is new Map_Generic
                                     (100, Subprogram_Key, Subprogram_Record);

    package Parameter_Id_Set is new Set_Generic (Parameter_Id);

    type Unit_Test_Data is
        record
            Map : Subprogram_Map.Map;
            String_Parameter_Found : Boolean;
            Unique_Parameters : Parameter_Id_Set.Set;
            Unique_Package_Refs : String_Table.Table := String_Table.New_Table;
            Package_Object : Object.Handle;
            Package_Name : Ada_Name := Blank_Name;
        end record;
end Test_Program_Generation;