home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / aijournl / 1986_09 / aiapp2.ltg < prev    next >
Text File  |  1986-10-30  |  571b  |  21 lines

  1.  
  2. Listing 2
  3. Calls to procedure solve to answer query
  4.  
  5.  
  6. call to procedure    matching rule
  7.  
  8. solve(a,e)           1. a:- b,c,d 
  9.   solve(b,c,d,e)     no matching rule
  10. solve(a,e)           2. a:- e,f
  11.   solve(e,f,e)       5. e
  12.     solve(f,e)       6. f
  13.       solve(e)       5. e
  14.         solve(NIL)   write 'yes', recursion terminated 
  15.       solve(e)       no matching rule 
  16.                         (backing out of recursion we continue search)
  17.     solve(f,e)       no match
  18.   solve(e,f,e)       no match            
  19. solve(a,e)           no match, finished
  20.  
  21.