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

⟦9c6ef1512⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body No_Bricks_And_No_Working_Robot_Rule, seg_04b35a, separate Bgrb_Rule_Bundle

Derivation

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

E3 Source Code



separate (Bgrb_Rule_Bundle)

package body No_Bricks_And_No_Working_Robot_Rule is  
    use Bgrb_Frames;
    use Fact_Base;

    function Premiss return Fact_Queries is  
        The_Robot_Id : constant Alias.Name := Alias.I;
    begin
        return (Bricks.Absent
                   ((Size  =>
                        Fact_Base.Predicate.System_Defined_Predicate.Is_Any,
                     Place =>  
                        Predicate.System_Defined_Predicate.Is_Equal (On_Heap))),
                Robots.Exist
                   ((Action     =>
                        Predicate.System_Defined_Predicate.Is_Equal (Taking),
                     Working    =>
                        Predicate.System_Defined_Predicate.Is_Equal (No),
                     Identifier => Predicate.Define_As (The_Robot_Id))));
    end Premiss;


    procedure Action (Objects : Fact_Collection) is
        The_Robot : Fact_Name renames Objects (2);
        The_Robot_Identifier : Slot.Object :=
           Robots.Get (The_Robot, Identifier);
        On_Screen : Output_Stream.Object := Output_Stream.Standard_Output;
    begin
        Output_Stream.New_Line (On_Screen);
        Output_Stream.Put_Line
           (" --------------------------------------------------------------",
            On_Screen);
        Output_Stream.Put (" --          the ", On_Screen);
        Output_Stream.Put (String'(Slot.Get (The_Robot_Identifier)), On_Screen);
        Output_Stream.Put_Line (" has been removed         --", On_Screen);
        Output_Stream.Put_Line
           (" --------------------------------------------------------------",
            On_Screen);
        if (Slot.Get (The_Robot_Identifier) = "Robot1") then
            Bgrb_Physical_Robots.The_Robot_1.Kill (The_Robot);
        elsif (Slot.Get (The_Robot_Identifier) = "Robot2") then
            Bgrb_Physical_Robots.The_Robot_2.Kill (The_Robot);
        elsif (Slot.Get (The_Robot_Identifier) = "Robot3") then
            Bgrb_Physical_Robots.The_Robot_3.Kill (The_Robot);
        else
            null;
        end if;
    end Action;
end No_Bricks_And_No_Working_Robot_Rule;

E3 Meta Data

    nblk1=4
    nid=2
    hdr6=6
        [0x00] rec0=1b rec1=00 rec2=01 rec3=040
        [0x01] rec0=12 rec1=00 rec2=04 rec3=06e
        [0x02] rec0=07 rec1=00 rec2=03 rec3=000
        [0x03] rec0=06 rec1=00 rec2=02 rec3=000
    tail 0x2174fdd00867b7002c0f7 0x42a00088462063c03
Free Block Chain:
  0x2: 0000  00 00 00 79 80 01 3b 01 00 0c 20 20 20 20 20 20  ┆   y  ;         ┆