procedure Extension(Entree: TableDecision; var Sortie: TableDecision); var Regle: 0..MaxNbRegles; Condition, Cond: 0..MaxNbCond; Action: 0..MaxNbActions; begin { Extension } Sortie.NbConditions := Entree.NbConditions; Sortie.NbRegles := Entree.NbRegles; Sortie.NbActions := Entree.NbActions; for Regle := 1 to Entree.NbRegles do begin for Condition := 1 to Entree.NbConditions do Sortie.ValCond[Regle,Condition] := Entree.ValCond[Regle,Condition]; for Action := 1 to Entree.NbActions do Sortie.Agir[Regle,Action] := Entree.Agir[Regle,Action]; end; { for } Regle := 1; while Regle <= Sortie.NbRegles do begin for Cond := 1 to Sortie.NbConditions do if Sortie.ValCond[Regle,Cond] = Indetermine then begin Sortie.ValCond[Regle,Cond] := Vrai; Sortie.NbRegles := succ(Sortie.NbRegles); for Condition := 1 to Sortie.NbConditions do Sortie.ValCond[Sortie.NbRegles,Condition] := Sortie.ValCond[Regle,Condition]; Sortie.ValCond[Sortie.NbRegles,Cond] := Faux; for Action := 1 to Sortie.NbActions do Sortie.Agir[Sortie.NbRegles,Action] := Sortie.Agir[Regle,Action]; end; { if } Regle := succ(Regle); end; { while } end; { Extension }