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

⟦e23e374da⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Mark_Top_Block_Of_Marked_Block_Rule, seg_04bc36, separate Decision_System_3.Fruit_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 (Decision_System_3.Fruit_Rule_Bundle)

package body Mark_Top_Block_Of_Marked_Block_Rule is
    use Fruit_Frames;


    function Premiss return Fact_Queries is
    begin
        return (Markers.Exist ((Name => Is_Equal (Selected_Block_Marker_Name))),
                Markers.Exist ((Name => Is_Equal (Model_Marker_Name))),
                Markers.Absent ((Name => Is_Equal (Top_Block_Marker_Name))));
    end Premiss;


    procedure Action (Objects : Fact_Collection) is
        use Visual_System_3;
        Selected_Marker : Fact_Name renames Objects (1);
        Moving_Possible : Boolean := True;

        procedure Find_Top_With_Top_Marker is
        begin
            while (Moving_Possible) and
                     (Get_Label (Top_Block_Marker_Id) /= Null_Label) loop
                -- find the top of the stack in wich the desired block appears
                -- to do that : walk upward until hanging in the midair
                Moving_Possible := Move (Top_Block_Marker_Id, Up);  
            end loop;

            if Moving_Possible then
                -- walk back down onto the top of the stack
                Moving_Possible := Move (Top_Block_Marker_Id, Down);
                -- else pointing on the top which is on the upper limit of the environment
            end if;
        end Find_Top_With_Top_Marker;

    begin  
        Make_Coincided (What_Id      => Top_Block_Marker_Id,
                        With_What_Id => Selected_Block_Marker_Id);
        Find_Top_With_Top_Marker;
        Markers.Add ((Name => Top_Block_Marker_Name));
    end Action;


end Mark_Top_Block_Of_Marked_Block_Rule;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=1b rec1=00 rec2=01 rec3=03a
        [0x01] rec0=13 rec1=00 rec2=02 rec3=001
    tail 0x21750f4ca86895c9fe9e0 0x42a00088462063c03