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

⟦312ce0a53⟧ Ada Source

    Length: 10240 (0x2800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Search_Free_Action_Rule, seg_04bee0, separate Fruit_Display_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_Display_Rule_Bundle_4)

package body Search_Free_Action_Rule is
    -- this rule could be valide even if there is a free place on table


    function Premiss return Fact_Queries is  
        use Fact_Base.Predicate;
        use Fruit_Frames_4;  
        use Kbs.Expression;
        use Kbs.Expression.System_Defined_Expression;
        The_Marker_Name : constant Alias.Name := Alias.M;
        The_X_Pos       : constant Alias.Name := Alias.X;
        The_Y_Pos       : constant Alias.Name := Alias.Y;
    begin
        return
           (Requests.Exist
               ((Request_Name => Is_Equal (Search_Free_Request_Name),
                 Marker_Name  => Define_As (The_Marker_Name),
                 Argument1    => Is_Any,
                 Argument2    => Is_Any)),  
            Visual_Markers.Exist ((Marker_Name => Is_Equal (The_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) and Is_Less (Max_Y))),
            Visual_Blocks.Absent
               ((Label      => Is_Any,
                 Position_X => Is_Equal (The_X_Pos),
                 Position_Y => Is_Equal (Value (The_Y_Pos) + Value (1)))),  
            Visual_Markers.Absent ((Marker_Name => Is_Equal (Model_Marker_Name),
                                    Position_X  => Is_Equal (The_X_Pos),
                                    Position_Y  => Is_Any)),
            Visual_Markers.Absent
               ((Marker_Name => Is_Equal (Top_Copied_Model_Marker_Name),
                 Position_X  => Is_Equal (The_X_Pos),
                 Position_Y  => Is_Any)),
            Visual_Markers.Absent
               ((Marker_Name => Is_Equal (Selected_Block_Marker_Name),
                 Position_X  => Is_Equal (The_X_Pos),
                 Position_Y  => Is_Any))  
            );

    end Premiss;


    procedure Action (Objects : Fact_Collection) is
        use Fruit_Frames_4;
        use Slot;
        use Slot.Operators;
        The_Request_Fact : Fact_Name renames Objects (1);
        The_Marker_Fact : Fact_Name renames Objects (2);
        The_Block_To_Put_On_Fact : Fact_Name renames Objects (3);
        The_X_Pos : Slot.Object := Visual_Blocks.Get
                                      (The_Block_To_Put_On_Fact, Position_X);
        The_Y_Pos : Slot.Object := Visual_Blocks.Get
                                      (The_Block_To_Put_On_Fact, Position_Y);
    begin
        Output_Stream.New_Line (Output_Stream.Standard_Output);
        Output_Stream.Put_Line ("***************************************",
                                Output_Stream.Standard_Output);
        Output_Stream.Put_Line ("search free action rule",
                                Output_Stream.Standard_Output);
        Output_Stream.Put_Line ("***************************************",
                                Output_Stream.Standard_Output);
        Output_Stream.New_Line (Output_Stream.Standard_Output);
        Visual_Markers.Change (The_Marker_Fact, Position_X, The_X_Pos);
        Visual_Markers.Change (The_Marker_Fact, Position_Y,
                               The_Y_Pos + Value (1));  
        Requests.Delete (The_Request_Fact);
    end Action;


end Search_Free_Action_Rule;

E3 Meta Data

    nblk1=9
    nid=3
    hdr6=8
        [0x00] rec0=19 rec1=00 rec2=01 rec3=056
        [0x01] rec0=12 rec1=00 rec2=04 rec3=048
        [0x02] rec0=17 rec1=00 rec2=02 rec3=044
        [0x03] rec0=0c rec1=00 rec2=05 rec3=000
        [0x04] rec0=11 rec1=00 rec2=06 rec3=062
        [0x05] rec0=13 rec1=00 rec2=05 rec3=038
        [0x06] rec0=01 rec1=00 rec2=03 rec3=001
        [0x07] rec0=88 rec1=69 rec2=06 rec3=281
        [0x08] rec0=44 rec1=97 rec2=00 rec3=006
    tail 0x217519ffc86923d342476 0x42a00088462063c03
Free Block Chain:
  0x3: 0000  00 07 00 03 00 00 00 01 02 03 04 05 06 07 08 09  ┆                ┆
  0x7: 0000  00 06 01 e8 80 25 20 20 20 20 20 20 20 20 20 20  ┆     %          ┆
  0x6: 0000  00 08 01 8e 80 15 3a 20 46 61 63 74 5f 43 6f 6c  ┆      : Fact_Col┆
  0x8: 0000  00 09 03 fc 80 28 20 20 20 20 20 20 20 20 20 20  ┆     (          ┆
  0x9: 0000  00 00 03 fa 80 1b 20 20 20 20 28 28 4c 61 62 65  ┆          ((Labe┆