succ  prec  indice 

Predicato "foil_loop/5"


*
/******************************************************************/
/*                                                                */
/*  call        : foil_loop (+POSITIVE,+GOAL,+NEGATIVE,+ACCU,     */
/*                           -CLAUSES)                            */
/*                                                                */
/*  arguments   : POSTITIVE = Positive examples left to be covered*/
/*                GOAL      = The predicate which should be       */
/*                            defined.                            */
/*                NEGATIVE  = Negative examples of GOAL           */
/*                ACCU      = Clauses found in previous iterations*/
/*                CLAUSES   = Resulting clauses defining GOAL     */
/*                                                                */
/******************************************************************/
/* This predicate corresponds to the "outer loop" in Quinlan 90.  */
/* Each iteration of the outer loop attempts to construct a       */ 
/* clause, printsit and determines the remaining set of positive  */
/* examples for the next iteration. If no positive examples are   */
/* left, the outer loop terminates, and the set of clauses        */
/* defining GOAL is given back as result.                         */
/******************************************************************/
foil_loop(Pos, Goal, Neg, Clauses0, Clauses) :-
        ( Pos = [] ->
              Clauses = Clauses0
        ; nl, write('Uncovered positives:'), nl, 
          write(Pos), nl, 
          nl, write('Adding a clause ...'), nl, nl,
          extend_clause_loop(Neg, Pos, (Goal :- true), Clause),
          nl, write('Clause found:'), nl,
          portray_clause(Clause),
          uncovered_examples(Clause, Pos, Pos1),
          foil_loop(Pos1, Goal, Neg, [Clause|Clauses0], Clauses)
        ).
*


 
 
 
 


 succ  prec  indice