|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 6144 (0x1800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Put_Block_On_New_Tower_Rule, seg_04b79f, separate Fruit_Rule_Bundle_1
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Visual_System_1;
separate (Fruit_Rule_Bundle_1)
package body Put_Block_On_New_Tower_Rule is
function Premiss return Fact_Queries is
use Fruit_Frames_1;
begin
return (Markers.Exist ((Name => Is_Equal (Top_Block_Marker_Name))),
Markers.Exist ((Name => Is_Equal (Selected_Block_Marker_Name))),
Markers.Exist ((Name => Is_Equal
(Top_Copied_Model_Marker_Name))),
Markers.Exist ((Name => Is_Equal (Model_Marker_Name))));
end Premiss;
procedure Action (Objects : Fact_Collection) is
use Visual_System_1;
use Fruit_Frames_1;
Top_Block_Marker : Fact_Name renames Objects (1);
Selected_Marker : Fact_Name renames Objects (2);
Top_Copied_Model_Marker : Fact_Name renames Objects (3);
Model_Marker : Fact_Name renames Objects (4);
Moving_Possible : Boolean := True;
The_Label : Labels;
begin
if Is_Same (Selected_Block_Marker_Id, Top_Block_Marker_Id) then
-- when the selected block is on the top of a stack
Moving_Possible := Move (Top_Copied_Model_Marker_Id, Up);
Put_Block (Block_Marked_With_Id => Selected_Block_Marker_Id,
On_Marked_Place_With_Id => Top_Copied_Model_Marker_Id);
Markers.Delete (Selected_Marker);
Markers.Delete (Top_Block_Marker);
--seasrch the next block to be copied
Moving_Possible := True;
Moving_Possible := Move (Model_Marker_Id, Up);
if (Get_Label (Model_Marker_Id) = Null_Label) or
(not Moving_Possible) then
-- the model has been copied
Markers.Delete (Model_Marker);
end if;
else
-- first the top of the stack must be moved away until the
-- selected block is on the top
-- to search a free place on table begin at bottom right
Moving_Possible := True;
while Moving_Possible loop
Moving_Possible := Move (On_Table_Marker_Id, Down);
end loop;
Moving_Possible := True;
while Moving_Possible loop
Moving_Possible := Move (On_Table_Marker_Id, Right);
end loop;
-- search a free place on table
Moving_Possible := True;
while (Get_Label (On_Table_Marker_Id) /= Null_Label) and
Moving_Possible loop
Moving_Possible := Move (On_Table_Marker_Id, Left);
end loop;
if not Moving_Possible then
-- no free place on table : STOP !
Markers.Delete (Model_Marker);
else
Put_Block (Block_Marked_With_Id => Top_Block_Marker_Id,
On_Marked_Place_With_Id => On_Table_Marker_Id);
Markers.Delete (Top_Block_Marker);
end if;
end if;
end Action;
end Put_Block_On_New_Tower_Rule;
nblk1=5
nid=0
hdr6=a
[0x00] rec0=19 rec1=00 rec2=01 rec3=04e
[0x01] rec0=01 rec1=00 rec2=05 rec3=040
[0x02] rec0=18 rec1=00 rec2=04 rec3=056
[0x03] rec0=19 rec1=00 rec2=03 rec3=062
[0x04] rec0=09 rec1=00 rec2=02 rec3=000
tail 0x21750a24886835c568599 0x42a00088462063c03