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

  1. %====================== save/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. Goal: save("con",dba1)
  21. fact1(1,"fact1",[1,2,3])
  22. fact1(2,"fact2",[1,3])
  23. fact1(3,"fact2",[3,2,1])
  24. True
  25. Goal: save("con",dba2)
  26. fact2(1,"one")
  27. fact2(1,"one once more")
  28. fact2(2,"two")
  29. True
  30.