home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / prolog / 1700 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  1.7 KB

  1. Path: sparky!uunet!sun-barr!ames!elroy.jpl.nasa.gov!sdd.hp.com!think.com!hsdndev!burrhus!generali!mbp
  2. From: mbp@generali.harvard.edu (Mark B Palmerino)
  3. Newsgroups: comp.lang.prolog
  4. Subject: SB-Prolog Tutorial?
  5. Message-ID: <1992Sep14.185148.13562@burrhus.harvard.edu>
  6. Date: 14 Sep 92 18:51:48 GMT
  7. Sender: news@burrhus.harvard.edu (USENET News System)
  8. Organization: Harvard University, Cambridge, MA
  9. Lines: 41
  10.  
  11. I'm just starting the process of learning prolog and have obtained a copy
  12. of SB-Prolog to experiment with and I have a few questions.
  13.  
  14. 1. Is there a FAQ for this newsgroup. If yes, where might I find it?
  15.  
  16. 2. How to efficiently learn?
  17.  
  18. I've picked up a book entitled "Prolog and Natural-Language Analysis" by
  19. F. Pereira and S. Shieber and want to work through it. When I compare the
  20. prolog presented in the book with SB-Prolog there are, understandably,
  21. differences. For example, the book seems to indicate that one can enter
  22. facts right into the interpreter as follows:
  23.  
  24. wrote(terry, shrdlu).
  25. wrote(bill, lunar).
  26. etc.
  27.  
  28. However, the only way I can get facts like this into SB-Prolog is to say:
  29.  
  30. $assert(wrote(terry, shrdlu)).
  31.  
  32. On recursion, the book indicates the following:
  33.  
  34. ancestor(Old, Young) :-
  35.     parent(Old, Young).
  36. ancestor(Old, Young) :-
  37.     parent(Old, Middle),
  38.     ancestor(Middle, Young).
  39.  
  40. Well, wrapping these in separate asserts doesn't seem to work. How does
  41. one define recursion?
  42.  
  43. Ok, there are differences - that's ok. But what I need is some sane way
  44. of learning how to use SB-Prolog. Would there be, by any chance, an
  45. ftp'able tutorial that would get me started?
  46.  
  47. Thanks so much for your help!
  48.  
  49. -- 
  50. ========================================================================
  51. Mark Palmerino, Ph.D.    mbp@wjh12.harvard.edu     Voice: (617) 345-9500
  52.