|
|
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 Systexpertr, seg_01103a
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
package body Systexpertr is
-- les variables internes :
type Tcontexte is (Contexte0, Contexte1, Contexte2);
Contexte : Tcontexte := Contexte0;
-- les variables de l'application :
Buts : Collection.Object;
Solutions : Collection.Object;
Situation : Expertsystem.Reference;
Affdemande : Boolean := True; -- affichage demande ?
-- regles a utiliser dans le contexte 0 :
function Regle0 return Boolean is
begin
-- R-0-A
-- SI LE RANG COURANT DANS L'ECHIQUIER EST EGAL AU RANG A ATTEINDRE
-- ET SI L'ENSEMBLE DES SOLUTIONS EST VIDE
-- ALORS REMPLIR L'ENSEMBLE DES SOLUTIONS AVEC LES SITUATIONS DE NIVEAU
--\x09 COURANT (QUI ONT DEJA ETE OUVERTES)
Regletrouversolution:
begin
if Rangcourant = Rangfinal and
Collection.Cardinality (Solutions) = 0 then
Solutions := Niveaufinal (Rangfinal);
return (True);
end if;
end Regletrouversolution;
-- R-0-B
-- SI L'ENSEMBLE DES SOLUTIONS N'EST PAS VIDE
-- ALORS AFFICHER SON CONTENU
Regleaffichersol:
begin
if Collection.Cardinality (Solutions) /= 0 then
Chrono.Stop (0);
if Affdemande then
Affichersol (Solutions);
end if;
return (False); -- F I N I !
end if;
end Regleaffichersol;
-- R-0-C
-- SI LE RANG COURANT DANS L'ECHIQUIER EST DIFFERENT DU RANG A ATTEINDRE
-- ET SI L'ENSEMBLE DES BUTS EST VIDE
-- ALORS REMPLIR L'ENSEMBLE DES BUTS AVEC LES SITUATIONS DE NIVEAU COURANT
-- NON ENCORE OUVERTES
Reglechercherbut:
begin
if Rangcourant /= Rangfinal and
Collection.Cardinality (Buts) = 0 then
Buts := Niveaunonouvert (Rangcourant);
Put (" Nb buts niveau courant :");
Put (Integer (Collection.Cardinality (Buts)));
Put_Line (" ");
return (True);
end if;
end Reglechercherbut;
-- R-0-D
-- SI L'ENSEMBLE DES BUTS N'EST PAS VIDE
-- ALORS COMMENCER / CONTINUER A TRAITER SON CONTENU
Regletraiterbut:
begin
if Collection.Cardinality (Buts) /= 0 then
Rangcourant := Rangcourant + 1;
Situation := Collection.First (Buts);
for Essai in 1 .. Rangfinal loop
if Situationcorrecte
(Situation, Rangcourant, Essai) then
Ajoutsituation (Situation, Rangcourant, Essai);
end if;
end loop;
Fermesituation (Situation);
Collection.Remove (Buts, Situation);
if Collection.Cardinality (Buts) /= 0 then
Rangcourant := Rangcourant -
1; -- continuer au meme niveau
end if; -- tq ens Buts pas vide
return (True);
end if;
end Regletraiterbut;
-- etc ... autres regles du contexte 0
return (False); -- fin des regles de REGLE0
end Regle0;
-- MISE EN ROUTE DU MOTEUR DU S-E
procedure Enroute (Nbrereine : Natural; Affdem : Boolean) is
begin
-- initialisations
Affdemande := Affdem;
Collection.Clear (Buts);
Collection.Clear (Solutions);
Reines.Enroute (Nbrereine);
end Enroute;
-- ENTRETIENT DU MOTEUR DU S-E
function Continue return Boolean is
Resu : Boolean;
begin
case Contexte is
when Contexte0 =>
Resu := Regle0;
--\x09\x09\x09when contexte1 => resu:=regle1;
when others =>
Resu := False;
end case;
return (Resu);
end Continue;
end Systexpertr;
nblk1=5
nid=0
hdr6=a
[0x00] rec0=1e rec1=00 rec2=01 rec3=006
[0x01] rec0=1c rec1=00 rec2=02 rec3=05a
[0x02] rec0=18 rec1=00 rec2=03 rec3=034
[0x03] rec0=26 rec1=00 rec2=04 rec3=03a
[0x04] rec0=0c rec1=00 rec2=05 rec3=001
tail 0x2150c8196823764bbeacc 0x42a00088462060003