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

  1. Path: sparky!uunet!ininx!jkreznar
  2. From: jkreznar@ininx.UUCP (John E. Kreznar)
  3. Newsgroups: comp.lang.prolog
  4. Subject: Re: term comparisons with variables
  5. Message-ID: <270@ininx.UUCP>
  6. Date: 22 Jul 92 05:37:21 GMT
  7. References: <1992Jul10.161816.3247@cs.kuleuven.ac.be> <1992Jul16.072806.8333@ecrc.de>
  8. Organization: Independence Industries, Los Angeles
  9. Lines: 28
  10.  
  11. In article <1992Jul16.072806.8333@ecrc.de>, joachim@ecrc.de (Joachim Schimpf) writes:
  12.  
  13. > However, if one insists on comparing variables (is there actually a
  14. > convincing application for it?),
  15.  
  16. What's a good way to represent sets of (possibly non-ground) terms in a setting
  17. where terms are regarded as identical if they are variants of one another?  (Two
  18. terms are variants of one another if each is an instance of the other, i.e. if
  19. one is obtained from the other by "systematically" renaming variable.)  For
  20. ground terms, a convenient and efficient way to represent sets is as sorted
  21. lists without duplicates.  Doing something like this for non-ground terms may
  22. involve comparing variables.
  23.  
  24. If variable-name correspondence between terms in the set is not important, a
  25. solution is to independently numbervars each term, thereby reducing each to a
  26. canonical ground form.  This would be the case, for example, for a set of
  27. clauses.
  28.  
  29. But if variable-name correspondence between terms in the set _is_ important, as
  30. for example if it's a set of atoms within a clause, this device will not work.
  31. For example, the equivalence of the sets
  32.         {p(X, a), p(Y, b)} and
  33.         {p(U, b), p(V, a)}
  34. does not seem to be easily detectable.
  35.  
  36. -- 
  37.         Relations among people to be by mutual consent, or not at all.
  38.          ---John E. Kreznar, jkreznar@ininx.com, uunet!ininx!jkreznar
  39.