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

⟦9791a7238⟧ TextFile

    Length: 2775 (0xad7)
    Types: TextFile
    Names: »B«

Derivation

└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Slot, Instance, Text_Io;
with Robot, Brick, Robot_Features, Brick_Features;
package body Robots_Bricks_Tests is
    use Robot_Features, Brick_Features, Slot.Operators;
    -- True  : constant Slot.Object := Slot.True_Object;
    -- False : Slot.Object          := Slot.True_Object;

------------------------------------------------------------------------------
    function Pack_It_Test
                (Br : Brick.Object; Ro : Robot.Object) return Boolean is
        Ok : Boolean;
    begin
        return Brick.Value_Of (Br, Place) = In_The_Heap and then
                  Robot.Value_Of (Ro, Is_Busy) = Slot.False_Object and then
                  Robot.Value_Of (Ro, The_Task) =
                     State_Slot_Tasks.Value (Take) and then
                  not Brick.Exist (Attribute  => Place,
                                   Operator   => Brick.Equal,
                                   Value      => In_The_Heap,
                                   Attribute2 => Size,
                                   Operator2  => Brick.Greater,
                                   Value2     => Brick.Value_Of (Br, Size));

    end Pack_It_Test;

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

    function Get_Test (Br : Brick.Object; Ro : Robot.Object) return Boolean is
    begin
        return Robot.Value_Of (Ro, The_Task) =
                  State_Slot_Tasks.Value (Take) and then
               Robot.Value_Of (Ro, Is_Busy) = Slot.True_Object and then
               Brick.Value_Of (Br, Place) = In_The_Nippers;
    end Get_Test;

------------------------------------------------------------------------------
    function Put_To_Case_Test
                (Br : Brick.Object; Ro : Robot.Object) return Boolean is
    begin
        return  
           Robot.Value_Of (Ro, The_Task) = State_Slot_Tasks.Value (Put) and then
              Brick.Value_Of (Br, Place) = In_The_Nippers and then
              not Robot.Exist (Attribute  => Old,
                               Operator   => Robot.Less,
                               Value      => Robot.Value_Of (Ro, Old),
                               Attribute2 => The_Task,
                               Operator2  => Robot.Equal,
                               Value2     => State_Slot_Tasks.Value (Put));
    end Put_To_Case_Test;


------------------------------------------------------------------------------
    function Stop_Test (Br : Brick.Object; Ro : Robot.Object) return Boolean is
    begin
        return  
           Robot.Value_Of (Ro, The_Task) =
              State_Slot_Tasks.Value (Take) and then
           Robot.Value_Of (Ro, Is_Busy) = Slot.False_Object and then
           Brick.Value_Of (Br, Place) /= In_The_Heap;
    end Stop_Test;


end Robots_Bricks_Tests;