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

⟦59d9ef7ee⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Put_Block_Action_Rule, seg_04bdc0, separate Fruit_Rule_Bundle_4

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 (Fruit_Rule_Bundle_4)

package body Put_Block_Action_Rule is


    function Premiss return Fact_Queries is
        use Fact_Base.Predicate;
        use Fruit_Frames_4;  
        The_What_Marker_Name    : constant Alias.Name := Alias.M;
        The_To_What_Marker_Name : constant Alias.Name := Alias.N;
        The_X_Pos               : constant Alias.Name := Alias.X;
        The_Y_Pos               : constant Alias.Name := Alias.Y;
    begin
        return (Requests.Exist
                   ((Request_Name => Is_Equal (Put_Block_Request_Name),
                     Marker_Name  => Define_As (The_What_Marker_Name),
                     Argument1    => Define_As (The_To_What_Marker_Name),
                     Argument2    => Is_Any)),
                Visual_Markers.Exist ((Marker_Name =>
                                          Is_Equal (The_What_Marker_Name),
                                       Position_X  => Define_As (The_X_Pos),
                                       Position_Y  => Define_As (The_Y_Pos))),
                Visual_Markers.Exist ((Marker_Name =>
                                          Is_Equal (The_To_What_Marker_Name),
                                       Position_X  => Is_Any,
                                       Position_Y  => Is_Any)),
                Visual_Blocks.Exist ((Label      => Is_Any,
                                      Position_X => Define_As (The_X_Pos),
                                      Position_Y => Define_As (The_Y_Pos))));
    end Premiss;


    procedure Action (Objects : Fact_Collection) is
        use Fruit_Frames_4;
        use Slot;  
        The_Request : Fact_Name renames Objects (1);
        The_From_Marker_Fact : Fact_Name renames Objects (2);
        The_To_Marker_Fact : Fact_Name renames Objects (3);  
        The_Block : Fact_Name renames Objects (4);
        The_From_X_Pos : Slot.Object := Visual_Blocks.Get
                                           (The_From_Marker_Fact, Position_X);
        The_From_Y_Pos : Slot.Object := Visual_Blocks.Get
                                           (The_From_Marker_Fact, Position_Y);
        The_To_X_Pos : Slot.Object := Visual_Blocks.Get
                                         (The_To_Marker_Fact, Position_X);
        The_To_Y_Pos : Slot.Object := Visual_Blocks.Get
                                         (The_To_Marker_Fact, Position_Y);
    begin
        Visual_Markers.Change (The_From_Marker_Fact, Position_X, The_To_X_Pos);
        Visual_Markers.Change (The_From_Marker_Fact, Position_Y, The_To_Y_Pos);

        Visual_Blocks.Change (The_Block, Position_X, The_To_X_Pos);
        Visual_Blocks.Change (The_Block, Position_Y, The_To_Y_Pos);
        Requests.Delete (The_Request);
    end Action;


end Put_Block_Action_Rule;

E3 Meta Data

    nblk1=4
    nid=2
    hdr6=6
        [0x00] rec0=17 rec1=00 rec2=01 rec3=024
        [0x01] rec0=13 rec1=00 rec2=04 rec3=054
        [0x02] rec0=12 rec1=00 rec2=03 rec3=000
        [0x03] rec0=0e rec1=00 rec2=02 rec3=000
    tail 0x217513108868f66b2b2ff 0x42a00088462063c03
Free Block Chain:
  0x2: 0000  00 00 02 7a 80 2c 5f 54 6f 5f 58 5f 50 6f 73 20  ┆   z ,_To_X_Pos ┆