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: B T

⟦8f4cfd48c⟧ TextFile

    Length: 3836 (0xefc)
    Types: TextFile
    Names: »B«

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 Instrument;
use Instrument;

------------------
-- LOCAL REFERENCE 10
------------------

-- THIS TEST EVALUATES THE CODE EFFICIENCY OF REFERENCING A LOCAL VARIAB
-- I.E., A REFERENCE TO A VARIABLE THAT IS DECLARED IMMEDIATELY WITHIN T
-- GIVEN DECLARATIVE REGION.

-- THE TEST AND NOISE VERSIONS FOR THIS EVALUATION ARE STRUCTURALLY IDEN
-- TO LOCAL_REFERENCE_01 EXCEPT THAT TEN LOCAL REFERENCES ARE INCLUDED.
-- MULTIPLICITY REDUCES THE LIKELIHOOD THAT THE CODE EFFICIENCY METRICS
-- COMPROMISED BY DEDICATING ALL LOCAL VARIABLES TO REGISTERS, A POSSIBL
-- OPTIMIZATION IN THE SINGLE REFERENCE EVALUATION.  THE METRICS FOR THE
-- EVALUATION ARE COMPUTED BY AVERAGING THE DERIVED RESULTS.

procedure Lvrab1 is
    package Dr_Cs is new Procs (Integer);
    use Dr_Cs;

    Local_01 : Ref_T := new T;
    Local_02 : Ref_T := new T;

    Local_03 : Ref_T := new T;
    Local_04 : Ref_T := new T;
    Local_05 : Ref_T := new T;
    Local_06 : Ref_T := new T;
    Local_07 : Ref_T := new T;
    Local_08 : Ref_T := new T;
    Local_09 : Ref_T := new T;
    Local_10 : Ref_T := new T;

begin
    Start ("LVRAB1", "10 Local Var. Ref., Access type (control)");
    for I in 1 .. 10000 loop

        Let (Global, Ident (Init));
        Let (Local_01.all, Ident (Init));
        Let (Local_02.all, Ident (Init));
        Let (Local_03.all, Ident (Init));
        Let (Local_04.all, Ident (Init));
        Let (Local_05.all, Ident (Init));
        Let (Local_06.all, Ident (Init));
        Let (Local_07.all, Ident (Init));
        Let (Local_08.all, Ident (Init));
        Let (Local_09.all, Ident (Init));
        Let (Local_10.all, Ident (Init));


        if Global = Init then
            --    GLOBAL := LOCAL_01.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_01.all, Ident (Init));
        end if;

        if Global = Init then
            --    GLOBAL := LOCAL_02.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_02.all, Ident (Init));
        end if;

        if Global = Init then
            --    GLOBAL := LOCAL_03.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_03.all, Ident (Init));
        end if;

        if Global = Init then
            --    GLOBAL := LOCAL_04.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_04.all, Ident (Init));
        end if;

        if Global = Init then
            --    GLOBAL := LOCAL_05.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_05.all, Ident (Init));
        end if;


        if Global = Init then
            --    GLOBAL := LOCAL_06.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_06.all, Ident (Init));
        end if;

        if Global = Init then
            --    GLOBAL := LOCAL_07.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_07.all, Ident (Init));
        end if;

        if Global = Init then
            --    GLOBAL := LOCAL_08.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_08.all, Ident (Init));
        end if;

        if Global = Init then
            --    GLOBAL := LOCAL_09.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_09.all, Ident (Init));
        end if;

        if Global = Init then
            --    GLOBAL := LOCAL_10.ALL;   -- COMMENTED OUT IN NOISE VERSION
            Let (Local_10.all, Ident (Init));
        end if;



        Let (Global, Ident (Local_01.all));
        Let (Global, Ident (Local_02.all));
        Let (Global, Ident (Local_03.all));
        Let (Global, Ident (Local_04.all));
        Let (Global, Ident (Local_05.all));
        Let (Global, Ident (Local_06.all));
        Let (Global, Ident (Local_07.all));
        Let (Global, Ident (Local_08.all));
        Let (Global, Ident (Local_09.all));
        Let (Global, Ident (Local_10.all));

    end loop;
    Stop;
end Lvrab1;