home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / prolog / 1626 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1.9 KB

  1. Path: sparky!uunet!mcsun!corton!geocub!billaud
  2. From: billaud@greco-prog.fr (Michel BILLAUD)
  3. Newsgroups: comp.lang.prolog
  4. Subject: Re: Help on problem needed!
  5. Keywords: help
  6. Message-ID: <1992Aug28.085511.5037@greco-prog.fr>
  7. Date: 28 Aug 92 08:55:11 GMT
  8. References: <meskes.713709771@ulysses> <1992Aug25.074623.25450@greco-prog.fr> <14219@goanna.cs.rmit.oz.au> <meskes.714916931@ulysses>
  9. Reply-To: billaud@geocub.UUCP (Michel BILLAUD)
  10. Organization: LaBRI - Universite Bordeaux I - France
  11. Lines: 36
  12.  
  13. In article <meskes.714916931@ulysses> meskes@ulysses.informatik.rwth-aachen.de (Michael Meskes) writes:
  14. >All the answers are quite interesting 
  15.     Thank you :-)
  16. but the don't solve the problem.
  17.     At least we've tried !
  18. >As far as I know Prolog is turing-complete and the proofs I know don't use
  19. >the Cut. So why isn't it possible to solve this problem im Prolog?
  20.  
  21.     Because "turing completeness" means that you can  emulate a TM
  22. by a pure-prolog program after appropriate encoding.
  23.  
  24. so if you can express p(X) q(X) and r(X) in Pure Prolog, there is a 
  25. TM which computes the same thing as IF p(X) THEN q(X) ELSE r(X),
  26. (which is is computable by a Prolog+cut+... interpreter) and thus
  27. there is a Pure Prolog program which computes the same results. 
  28.  
  29. But this existence theorem doesnt provide a way to turn
  30. a Prolog+cut+... into a pure prolog program by high-level
  31. source-to-source program transformations, in other words
  32. you desperately need to know the text of p(X), q(X) and s.o.
  33.  
  34. I think (not really sure of that) there is the same kind of problems
  35. if you want to express the exception mechanism in purely functional
  36. languages. 
  37.  
  38. >If you still think I want you to do my homework try not to answer. 
  39.  
  40. ?- not(toAnswer).
  41. yes :-)
  42.  
  43. Michel
  44. -- 
  45. Michel BILLAUD                 :  billaud@geocub.greco-prog.fr
  46. Departement d'Informatique     :  phone W: 56.84.57.92  // 56.84.69.22
  47. IUT "A", Universite Bordeaux I :  "Je veux jouer de l'helicon
  48. 33405 Talence  (FRANCE)        :        pon pon pon pon !    "
  49.