home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / prolog / 2245 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.7 KB

  1. Path: sparky!uunet!pipex!doc.ic.ac.uk!uknet!nplpsg!rss
  2. From: rss@seg.npl.co.uk (Roger Scowen)
  3. Newsgroups: comp.lang.prolog
  4. Subject: Re: Occurs check
  5. Message-ID: <1992Dec16.114524.21371@seg.npl.co.uk>
  6. Date: 16 Dec 92 11:45:24 GMT
  7. Sender: rss@seg.npl.co.uk (Roger Scowen)
  8. Organization: National Physical Laboratory, UK
  9. Lines: 38
  10.  
  11.  
  12. Jussi.Rintanen@hut.fi
  13. (Message-ID: <1992Dec13.173016.8849@nntp.hut.fi>) asks:
  14.  
  15. > Question 1: What implementations of Prolog implement the occurs check?
  16. > (Our university has both Sicstus and NU-Prolog.)
  17.  
  18. The current draft International Standard for Prolog provides built-in
  19. predicates 
  20.  
  21. 1)  unify_with_occurs_check/2
  22.  
  23.    For any arguments unify_with_occurs_check(X, Y) always 
  24.    succeeds or fails, and never generates an error or 
  25.    gives an undefined result.  
  26.  
  27. 2)   =/2 (unifies) 
  28.  
  29.    When unification involves infinite trees either as arguments 
  30.    or as a partial result of some top-down unification algorithm,
  31.    the behaviour is undefined.  A standard-conforming processor 
  32.    might consistently succeed or fail for a unification that is 
  33.    formally undefined.  This predicate can be implemented 
  34.    much more efficiently than unify_with_occurs_check/2.
  35.  
  36. For more information, see 
  37.     R S Scowen, "An overview of Prolog standardization 
  38.     --- progress, problems and solutions", pp922-936 
  39.     of "Logic programming --- proceedings of the eighth 
  40.     international conference" (K Furukawa: Editor,  MIT Press, 
  41.     Cambridge, Massachusetts, 1991. ISBN 0-262-56058-5.)
  42.  
  43. Roger Scowen (ISO/IEC JTC1 SC22 WG17 Prolog convener),
  44. DITC/93, National Physical Laboratory,
  45. Teddington, Middlesex, Great Britain   TW11 0LW
  46. Telephone: +44 81 943 6956
  47. E-Mail: rss@seg.npl.co.uk         Fax: +44 81 977 7091
  48. 18 December 1992
  49.