home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / REFEXAMP.ARC / RTRCTAL2.PRO < prev    next >
Encoding:
Text File  |  1988-06-21  |  577 b   |  33 lines

  1. %====================== retractall/2          ===============================
  2. DOMAINS
  3.   LIST = INTEGER*
  4.  
  5. DATABASE - dba1
  6.   fact1(INTEGER,STRING,LIST)
  7.  
  8. DATABASE - dba2
  9.   fact2(INTEGER,STRING)
  10.  
  11. CLAUSES
  12.   fact1(1,"fact1",[1,2,3]).
  13.   fact1(2,"fact2",[1,3]).
  14.   fact1(3,"fact2",[3,2,1]).
  15.  
  16.   fact2(1,"one").
  17.   fact2(1,"one once more").
  18.   fact2(2,"two").
  19.  
  20.   -------- Dialog --------
  21. Goal: fact1(X,Y,A)
  22. X=1, Y=fact1, A=[1,2,3]
  23. X=2, Y=fact2, A=[1,3]
  24. X=3, Y=fact2, A=[3,2,1]
  25. 3 Solutions
  26.  
  27. Goal: retractall(_,dba1)
  28. True
  29.  
  30. Goal: fact1(X,Y,Z)
  31. No Solution
  32. Goal:
  33.