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

⟦352efb584⟧ TextFile

    Length: 2751 (0xabf)
    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 Except_Pack_5;
use Except_Pack_5;
with Remote_Global;
use Remote_Global; -- control optimization
with Iteration; -- obtain stable measurement
with Piwg_Io; -- output results

procedure E000005 is  -- main procedure to execute

    Cpu_Time : Duration; -- CPU time for one feature execution
    Wall_Time : Duration; -- WALL time for one feature execution
    Check_Times : constant := 100; -- inside loop count and check
    Iteration_Count : Integer; -- set and varied by ITERATION package
    Stable : Boolean; -- true when measurement stable

begin

    Iteration.Start_Control;  -- dummy to bring in pages on some machines

    delay 0.5;  -- wait for stable enviornment on some machines

    Iteration.Initialize (Iteration_Count);

    loop  -- until stable measurement, ITERATION_COUNT increases each time

--
-- Control loop
--
        if A_One = 2 then
            Switch := True;
        else
            Switch := False;
        end if;

        Iteration.Start_Control;
        for J in 1 .. Iteration_Count loop
            Global := 0;
            for Inside_Loop in 1 .. Check_Times loop
--                     this has control global increment and call inside
                begin
                    Except_Task_5.Task_5 (Switch); -- FALSE  no exception raised
                exception
                    when My_Exception =>
                        raise Program_Error;
                end;
            end loop;
        end loop;
        Iteration.Stop_Control (Global / 2, Check_Times);

--
-- Test loop
--
-- establish exception raise and handle time

        if A_One = 1 then
            Switch := True;
        else
            Switch := False;
        end if;

        Iteration.Start_Test;
        for J in 1 .. Iteration_Count loop
            Global := 0;
            for Inside_Loop in 1 .. Check_Times loop
--                     this has control global increment and call inside
                begin
                    Except_Task_5.Task_5
                       (Switch); -- TRUE exception will be raised
                exception
                    when My_Exception =>
                        Global := Global + 1;
                end;
            end loop;
        end loop;
        Iteration.Stop_Test (Global / 2, Check_Times);
        Iteration.Test_Stable (Iteration_Count, Stable);
        exit when Stable;
    end loop;
--
    Iteration.Feature_Times (Cpu_Time, Wall_Time);

--
-- Printout
--
    Piwg_Io.Piwg_Output
       ("E000005", "Exception", Cpu_Time, Wall_Time, Iteration_Count,
        " Exception raise and handle timing measurement",
        " when exception is in a rendezvous",
        " Both the task and the caller must handle the exception");

    abort Except_Task_5;

end E000005;