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 - download
Index: ┃ B T

⟦1bff1c6d4⟧ TextFile

    Length: 1546 (0x60a)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦e24fb53b7⟧ 
            └─⟦this⟧ 

TextFile

with Slot;
with Towers_Of_Hanoi_Frames;
with Towers_Of_Hanoi_Kbs;
with Towers_Of_Hanoi_Rules_For_Benchmark;
with Text_Io;
with Output_Stream;

use Towers_Of_Hanoi_Frames;
use Towers_Of_Hanoi_Kbs;
use Output_Stream;

procedure Towers_Of_Hanoi_Benchmark is

    Source           : constant Slot.Object := Slot.Value (1);
    Destination      : constant Slot.Object := Slot.Value (3);
    Initial_Priority : constant Slot.Object := Slot.Value (1);

    package Toh_Rules renames Towers_Of_Hanoi_Rules_For_Benchmark;

    procedure Infere_On_Towers_Of_Hanoi is
       new Kbs.Rule_Base.Infere (Do_Action => Toh_Rules.Do_Action);
    package Duration_Io is new Text_Io.Fixed_Io (Duration);

begin  
    for I in 1 .. Kbs.Rule_Base.Count loop
        Kbs.Rule_Base.Put (I, Standard_Output);
    end loop;

    for Size in 5 .. 13 loop

        Movements.Add ((From_Tower => Source,
                        To_Tower   => Destination,
                        Count      => Slot.Value (Size),
                        Priority   => Initial_Priority));

        Infere_On_Towers_Of_Hanoi;

        Text_Io.Put (Integer'Image (Size) & " towers : time =>");
        Duration_Io.Put (Kbs.Rule_Base.Elapsed_Time, Fore => 3, Aft => 2);  
        Text_Io.Put (", inferences =>" & Integer'Image
                                            (Kbs.Rule_Base.Inference_Count));
        Text_Io.Put (", firings per second =>" &
                     Integer'Image (Kbs.Rule_Base.Firings_Per_Second));
        Text_Io.New_Line;
    end loop;
end Towers_Of_Hanoi_Benchmark;