|
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: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Robotetbrique, procedure Travailler, seg_00dcb3, seg_00ddc6
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Expertsystem; use Expertsystem; with Robot, Brique; use Robot, Brique; procedure Travailler is package Robotetbrique is procedure Miseenboite; end Robotetbrique; package body Robotetbrique is function Peutmettreenboite return Boolean is begin Reglesaisir: declare Rb : Tuple.Object; Unebrique, Unrobot : Reference; function Match (R, B : Reference) return Boolean is begin return Peutprendre (R) and then not Tientbrique (R) and then Surtas (B) and then Laplusgrandedutas (B); end Match; function Robotsaisir is new Tuplecollection.Join2 (Match); begin Rb := Tuplecollection.First (Robotsaisir (Lesrobots, Lesbriques)); if Tuple.Isnotnull (Rb) then Unrobot := Tuple.First (Rb); Unebrique := Tuple.Second (Rb); Robot.Modifierpince (Unrobot, True); Brique.Modifierlieu (Unebrique, Pince); Put ("Le "); Put (Robot.Nom (Unrobot)); Put (" prend la plus grande brique (taille="); Put (Integer (Brique.Taille (Unebrique))); Put_Line (") du tas dans sa pince "); return True; end if; end Reglesaisir; Regletenir: declare Rb : Tuple.Object; Unrobot : Reference; function Match (R, B : Reference) return Boolean is begin return Peutprendre (R) and then Tientbrique (R) and then Danspince (B); end Match; function Robottenir is new Tuplecollection.Join2 (Match); begin Rb := Tuplecollection.First (Robottenir (Lesrobots, Lesbriques)); if Tuple.Isnotnull (Rb) then Unrobot := Tuple.First (Rb); Robot.Modifiertache (Unrobot, Deposer); Put ("Le "); Put (Robot.Nom (Unrobot)); Put_Line (" va deposer la brique "); return True; end if; end Regletenir; Reglecaser: declare Rb : Tuple.Object; Unebrique, Unrobot : Reference; function Match (R, B : Reference) return Boolean is begin return Peutdeposer (R) and then Danspince (B); end Match; function Robotcaser is new Tuplecollection.Join2 (Match); begin Rb := Tuplecollection.First (Robotcaser (Lesrobots, Lesbriques)); if Tuple.Isnotnull (Rb) then Unrobot := Tuple.First (Rb); Unebrique := Tuple.Second (Rb); Brique.Modifierlieu (Unebrique, Boite); Robot.Modifiertache (Unrobot, Prendre); Robot.Modifierboite (Unrobot, Robot.Derniereboite); Brique.Modifierboite (Unebrique, Robot.Numeroboite (Unrobot)); Put ("Le "); Put (Robot.Nom (Unrobot)); Put (" depose la brique dans la case"); Put (Integer (Robot.Numeroboite (Unrobot))); Put_Line (""); Robot.Modifierpince (Unrobot, False); return True; end if; end Reglecaser; Reglearreter: declare Rb : Tuple.Object; Unrobot : Reference; function Match (R, B : Reference) return Boolean is begin return Peutprendre (R) and then not Tientbrique (R) and then not Surtas (B); end Match; function Robotarreter is new Tuplecollection.Join2 (Match); begin Rb := Tuplecollection.First (Robotarreter (Lesrobots, Lesbriques)); if not Tuple.Isnull (Rb) then Unrobot := Tuple.First (Rb); Put ("Le "); Put (Robot.Nom (Unrobot)); Put_Line (" se suicide (plus de briques)"); Robot.Sesuicide (Unrobot); return True; end if; end Reglearreter; return False; end Peutmettreenboite; procedure Mettreenboite is begin loop exit when not Peutmettreenboite; end loop; end Mettreenboite; procedure Miseenboite is begin Robot.Creer; Brique.Creer; loop Mettreenboite; -- autres contextes a traiter exit; end loop; end Miseenboite; end Robotetbrique; begin Robotetbrique.Miseenboite; end Travailler;
nblk1=6 nid=0 hdr6=c [0x00] rec0=1f rec1=00 rec2=01 rec3=06a [0x01] rec0=19 rec1=00 rec2=02 rec3=068 [0x02] rec0=1c rec1=00 rec2=03 rec3=00e [0x03] rec0=14 rec1=00 rec2=04 rec3=06e [0x04] rec0=1b rec1=00 rec2=05 rec3=024 [0x05] rec0=25 rec1=00 rec2=06 rec3=001 tail 0x2170a8802821a498883f6 0x42a00088462060003