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

⟦b8355141b⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Bbs_Tests_Bak, seg_011f33

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



with Slot, Instance, Text_Io;
with New_Ball, New_Box, New_Sticker;
with Ball_Features, Box_Features, Sticker_Features, Slot;

package body Bbs_Tests_Bak is
    use Ball_Features, Box_Features, Sticker_Features, Slot.Operators;
    use New_Ball, New_Box, New_Sticker, Slot.Operators;

------------------------------------------------------------------------------
    function Pack_It_Test (The_Ball    : New_Ball.Object;
                           The_Box     : New_Box.Object;
                           The_Sticker : New_Sticker.Object) return Boolean is
    begin
        return New_Ball.Value_Of (The_Ball, Place) = In_The_Heap and then
                  New_Ball.Value_Of (The_Ball, Size) <= Max_Size and then
                  New_Box.Value_Of (The_Box, State) =
                     State_Slot_Box.Value (Is_Empty) and then
                  New_Box.Value_Of (The_Box, Size) >
                     New_Ball.Value_Of (The_Ball, Size) and then
                  New_Sticker.Value_Of (The_Sticker, Colour) =
                     New_Ball.Value_Of (The_Ball, Colour) and then
                  not New_Box.Exist
                         (Attribute => Size,
                          Between   => New_Ball.Value_Of (The_Ball, Size),
                          And_Size  => New_Box.Value_Of (The_Box, Size));
    end Pack_It_Test;

------------------------------------------------------------------------------

    function Sticker_Lack_Test (The_Ball : New_Ball.Object) return Boolean is
    begin
        return New_Ball.Value_Of (The_Ball, Place) = In_The_Heap and then
                  New_Ball.Value_Of (The_Ball, Size) <= Max_Size and then
                  not New_Sticker.Exist
                         (With_Conditions =>
                             ((Attribute => Colour,
                               Operator => New_Sticker.Equal,
                               Value => New_Ball.Value_Of (The_Ball, Colour)),
                              (Attribute => State,
                               Operator => New_Sticker.Equal,
                               Value => State_Slot_Sticker.Value (Is_Unused))));
    end Sticker_Lack_Test;

------------------------------------------------------------------------------

    function Box_Lack_Test (The_Ball : New_Ball.Object) return Boolean is

    begin
        return New_Ball.Value_Of (The_Ball, Place) = In_The_Heap and then
                  New_Ball.Value_Of (The_Ball, Size) <= Max_Size and then
                  not New_Box.Exist
                         (With_Conditions =>
                             ((Attribute => Size,
                               Operator  => New_Box.Greater,
                               Value     => New_Ball.Value_Of (The_Ball, Size)),
                              (Attribute => State,
                               Operator  => New_Box.Equal,
                               Value     => State_Slot_Box.Value (Is_Empty))));
    end Box_Lack_Test;

------------------------------------------------------------------------------

    function Too_Big_Test (The_Ball : New_Ball.Object) return Boolean is
    begin
        return New_Ball.Value_Of (The_Ball, Place) = In_The_Heap and then
                  New_Ball.Value_Of (The_Ball, Size) > Max_Size;
    end Too_Big_Test;

end Bbs_Tests_Bak;

E3 Meta Data

    nblk1=6
    nid=2
    hdr6=a
        [0x00] rec0=15 rec1=00 rec2=01 rec3=036
        [0x01] rec0=00 rec1=00 rec2=06 rec3=008
        [0x02] rec0=13 rec1=00 rec2=05 rec3=042
        [0x03] rec0=14 rec1=00 rec2=04 rec3=018
        [0x04] rec0=0b rec1=00 rec2=03 rec3=000
        [0x05] rec0=11 rec1=00 rec2=05 rec3=000
    tail 0x2150d3c488246735bb6bd 0x42a00088462063c03
Free Block Chain:
  0x2: 0000  00 00 00 17 80 14 20 20 20 20 20 20 20 20 20 20  ┆                ┆