DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦38d46259b⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Pair_Ball_And_Boxes_Rule, seg_02baaa, separate Bbr_General_Bundle

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



separate (Bbr_General_Bundle)
package body Pair_Ball_And_Boxes_Rule is

    function Premiss return Fact_Base.Queries is
    begin
        return (Balls.Exist ((Size   => Say_It_Is (S),
                              Colour => Say_It_Is (C),
                              Place  => Is_Equal (On_Heap))),

                Boxes.Exist ((Colour => Is_Equal (C),
                              Size   => Say_It_Is (T) and Is_Greater (S),
                              State  => Is_Equal (Free))),

                Boxes.Absent ((Colour => Is_Equal (C),
                               Size   => Is_Less (T) and Is_Greater (S),
                               State  => Is_Equal (Free))));
    end Premiss;

    procedure Action (The_Pair : Fact_Base.Collection) is
        The_Ball : Fact_Base.Object renames The_Pair (1);
        The_Box  : Fact_Base.Object renames The_Pair (2);
    begin
        New_Line (Standard_Output);
        Put_Line ("----- Pair_Ball_And_Boxes -----", Standard_Output);
        New_Line (Standard_Output);
        Put ("The ball : ", Standard_Output);
        Balls.Put (The_Ball, Standard_Output);
        New_Line (Standard_Output);
        Put ("Has been paired with : ", Standard_Output);
        Boxes.Put (The_Box, Standard_Output);

        Balls.Change (The_Ball, Place, To_Value => In_Box);
        Boxes.Change (The_Box, State, To_Value => Busy);
    end Action;

end Pair_Ball_And_Boxes_Rule;



E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=19 rec1=00 rec2=01 rec3=062
        [0x01] rec0=10 rec1=00 rec2=02 rec3=001
    tail 0x217246cb683ef72119114 0x42a00088462063c03