home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / prolog / 2293 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.8 KB

  1. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!sbusol.rz.uni-sb.de!gs-serv3.dfki.uni-sb.de!dfki.uni-sb.de!smolka
  2. From: smolka@dfki.uni-sb.de (Gert Smolka)
  3. Newsgroups: comp.lang.prolog
  4. Subject: Re: Occurs check
  5. Date: 22 Dec 1992 16:20:21 +0100
  6. Organization: DFKI - German Research Center for AI
  7. Lines: 69
  8. Sender: gs-soft@gs-serv3.dfki.uni-sb.de
  9. Distribution: world
  10. Message-ID: <1h7bnlINN5es@eagle.dfki.uni-sb.de>
  11. References: <TORKEL.92Dec18231028@lludd.sics.se> <24454@alice.att.com> <TORKEL.92Dec20104928@bast.sics.se> <1992Dec21.153147.26177@cs.brown.edu>
  12. NNTP-Posting-Host: gs-serv1.dfki.uni-sb.de
  13.  
  14. In article <1992Dec21.153147.26177@cs.brown.edu>, 
  15. mj@cs.brown.edu (Mark Johnson) writes:
  16. |> This is a nice way of viewing things, but I don't know any Prolog that
  17. |> gives you all of the constraints C.  Consider the following program:
  18. |> 
  19. |>     p(a) :- q(X,X).
  20. |> 
  21. |>     q(Y, f(Y)).
  22. |> 
  23. |> One the query p(X), Sicstus returns the following:
  24. |> 
  25. |> | ?- p(X).
  26. |> 
  27. |> X = a ? ;
  28. |> 
  29. |> no
  30.  
  31. This is the perfect answer with respect to
  32. rational trees (there is exactly one X such that X=f(X)).
  33.  
  34. |> | ?- q(X,X).
  35. |> 
  36. |> X = f(f(f(f(f(f(f(f(f(f(f(f(f(f ...
  37.  
  38. Again, the right answer (maybe, some depth limit
  39. in printing things would be nice).
  40.  
  41. |> That is, sicstus only returns constraints related to variables appearing
  42. |> the goal.  But the constraints that only have cyclic solutions may be
  43. |> associated with other variables.
  44.  
  45. Sure, but this is how it has to be, isn't it?
  46.  
  47. By the way, a recent paper of Ralf Treinen and myself in the
  48. Proceedings of JICSLP'92 gives an in-depth study of incremental
  49. decision methods for satisfiability, entailment and negation for
  50. rational trees (actually, a proper generalization of Colmerauer's
  51. rational tree system also accommodating features).  The full paper
  52. describes an abstract machine (WAM-like) providing for an
  53. efficient incremental implementation of the decision methods.
  54.  
  55. Both papers can be obtained by anonymous ftp from
  56. duck.dfki.uni-sb.de (134.96.188.92) from the directory pub/papers.
  57.  
  58. @inproceedings{CFT-JICLP92,
  59.    editor =     "K. Apt",
  60.    author =     "Gert Smolka and Ralf Treinen",
  61.    title =      "Records for Logic Programming",
  62.    booktitle =  "Proceedings of the 1992 Joint International Conference and
  63.                  Symposium on Logic Programming",
  64.    year =     "1992",
  65.    publisher =     "The MIT Press",
  66.    address =     "Cambridge, Mass."
  67. }
  68.  
  69. @TechReport{ST:cft92rep,
  70. author    = "Gert Smolka and Ralf Treinen",
  71. title    = "Records for Logic Programming",
  72. institution = "German Research Center for Artificial Intelligence (DFKI)",
  73. year    = 1992,
  74. type    = "Research Report",
  75. number    = "RR-92-23",
  76. address    = {Stuhlsatzenhausweg 3, 6600 Saarbr\"ucken 11, Germany}
  77. }
  78.  
  79. ***********
  80. Gert Smolka, DFKI, Stuhlsatzenhausweg 3, D-W-6600 Saarbr"ucken, Germany
  81. Tel: +49 681 302-5311;  Fax: +49 681 302-5341; Net: smolka@dfki.uni-sb.de
  82.  
  83.