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

⟦93fe66518⟧ TextFile

    Length: 2039 (0x7f7)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »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 Bbr_Attributes;
with Bbr_Do_Action;
with Bbr_Rule_Base;
with Condition;
with Fact;
with Bbr_Frames;
with Text_Io;

use Bbr_Attributes;
use Bbr_Frames;
use Condition;

procedure Bbr_Test is
    use Fact;  
    function Firable_On_Facts return Fact.Collection
        renames Bbr_Rule_Base.Rule_Base.Firable_On_Facts;

    function Firable_On_Rule return Bbr_Rule_Base.Rule_Base.Rule_Id
        renames Bbr_Rule_Base.Rule_Base.Firable_On_Rule;

    procedure Load_Initial_Working_Memory is
    begin
        Robots.Add ((Colour => Green, State => Free));
        Robots.Add ((Colour => Red, State => Busy));
        Robots.Add ((Colour => Red, State => Free));
        Robots.Add ((Colour => Blue, State => Free));
        Robots.Add ((Colour => Green, State => Busy));

        Balls.Add ((Size => 50, Colour => Blue, Place => On_Heap));
        Balls.Add ((Size => 75, Colour => Green, Place => On_Heap));
        Balls.Add ((Size => 95, Colour => Red, Place => On_Heap));
        Balls.Add ((Size => 100, Colour => Blue, Place => On_Heap));

        Boxes.Add ((Size => 750, Colour => Red, State => Free));
        Boxes.Add ((Size => 10000, Colour => Green, State => Free));
        Boxes.Add ((Size => 150, Colour => Red, State => Busy));
    end Load_Initial_Working_Memory;

    procedure Dump_Working_Memory is  
        Facts : constant Fact.Collection :=
           Fact.Find (Pattern'(1 .. Max_Slots => Is_Any));
    begin
        Text_Io.Put_Line ("---> the working memory now contains " &
                          Integer'Image (Facts'Length) & " facts");
        Fact.Put (Facts);
    end Dump_Working_Memory;

begin
    Load_Initial_Working_Memory;
    loop
        declare
            Result : constant Fact.Collection := Firable_On_Facts;
        begin
            if Result /= Empty_Collection then
                Bbr_Do_Action (For_Rule => Firable_On_Rule, On_Facts => Result);
            else
                exit;
            end if;
        end;
    end loop;
    Dump_Working_Memory;
end Bbr_Test;
pragma Main;