|
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 - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Reformulating_Guru_Rule, seg_02d0d8, seg_02d124, seg_0399ed, seg_03b93b, seg_03c0b3, seg_03c51e, seg_03c6c5, seg_03c9fa, seg_04a9d3, seg_04b43f, separate Towers_Of_Hanoi_Rules_For_Graphic
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧ └─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
separate (Towers_Of_Hanoi_Rules_For_Graphic) package body Reformulating_Guru_Rule is Decision_Table : constant array (1 .. 3, 1 .. 3) of Integer := (1 => (3, 3, 2), 2 => (3, 3, 1), 3 => (2, 1, 1)); One : constant Slot.Object := Slot.Value (1); function Other_Tower_Than (First, Second : Slot.Object) return Slot.Object is Other : Integer; begin Other := Decision_Table (Slot.Get (First), Slot.Get (Second)); return Slot.Value (Other); end Other_Tower_Than; function More_Urgent (Than : Slot.Object) return Slot.Object is use Slot.Operators; begin return Than + One; end More_Urgent; function Premiss return Fact_Queries is The_Priority : constant Alias.Name := Alias.P; begin return (Movements.Exist ((Count => Is_Greater (1), Priority => Define_As (The_Priority), From_Tower | To_Tower => Is_Any)), Movements.Absent ((Priority => Is_Greater (The_Priority), From_Tower | To_Tower | Count => Is_Any))); end Premiss; procedure Action (The_Facts : Fact_Collection) is The_Movement : Fact_Name renames The_Facts (1); The_Source, The_Destination, The_Count, The_Priority : Slot.Object; Move_First, Move_Second, Move_Third : Slot.Object; The_Other_Tower : Slot.Object; use Slot.Operators; begin The_Source := Movements.Get (The_Movement, From_Tower); The_Destination := Movements.Get (The_Movement, To_Tower); The_Count := Movements.Get (The_Movement, Count); The_Priority := Movements.Get (The_Movement, Priority); Move_Third := More_Urgent (Than => The_Priority); Move_Second := More_Urgent (Than => Move_Third); Move_First := More_Urgent (Than => Move_Second); The_Other_Tower := Other_Tower_Than (The_Source, The_Destination); Movements.Add ((Priority => Move_First, From_Tower => The_Source, To_Tower => The_Other_Tower, Count => The_Count - One)); Movements.Add ((Priority => Move_Second, From_Tower => The_Source, To_Tower => The_Destination, Count => One)); Movements.Add ((Priority => Move_Third, From_Tower => The_Other_Tower, To_Tower => The_Destination, Count => The_Count - One)); Movements.Delete (The_Movement); end Action; end Reformulating_Guru_Rule;
nblk1=4 nid=3 hdr6=6 [0x00] rec0=1c rec1=00 rec2=01 rec3=042 [0x01] rec0=15 rec1=00 rec2=02 rec3=000 [0x02] rec0=15 rec1=00 rec2=04 rec3=000 [0x03] rec0=12 rec1=00 rec2=03 rec3=000 tail 0x2152615a684154d6d3308 0x42a00088462063c03 Free Block Chain: 0x3: 0000 00 00 02 a9 80 1b 20 20 46 72 6f 6d 5f 54 6f 77 ┆ From_Tow┆