<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Peter Verswyvelen wrote:
<blockquote cite="mid:46DA4F34.1010202@telenet.be" type="cite">
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
Thanks, this is very useful information!<br>
  <br>
Prolog is indeed on my list as languages I want to learn. I understand
the basic principles, but haven't digged deep yet. But first I want to
do Haskell, which I'm now totally addicted to!<br>
  <br>
But after reading <a moz-do-not-send="true"
 href="http://en.wikipedia.org/wiki/Fifth_generation_computer">http://en.wikipedia.org/wiki/Fifth_generation_computer</a>,
it seemed to me that Prolog was a dead language, having only pure
theoretical purposes. Is this true?<br>
  <br>
Having a rich imperative background (I wrote some simple imperative
compilers and a large semi-functional visual programming toolkit
currently being used by a game development company), a book I found
really useful to understand how the inners of FP and Prolog work is <a
 moz-do-not-send="true" href="http://www.wiley.co.uk/wileychi/grune">Modern
Compiler Design</a>.
It provides C code for all the concepts, so an imperative programmer
feels right at home. But to me it had the side effect that after
reading the last chapters on functional and logical programming, I felt
I had to get rid of these imperative languages as quickly as possible
(I always felt I was hacking when doing C, C++, or C#... which maybe
just meant I'm a bad programmer ;-)<br>
  <br>
PS: A part of the "Prolog for AI" book can be read  on <a
 moz-do-not-send="true"
 href="http://books.google.be/books?id=-15su78YRj8C&amp;pg=PP1&amp;dq=Prolog+Programming+for+Artificial+Intelligence&amp;sig=MZ-8wlIlu05423cIC1VGZOMAzlo#PPA89,M1">Google
Books</a> (this Google Books thing looks *very* illegal to me, but
since it's google and not some hackers website, I felt free to provide
a link here...)<br>
  <br>
Cheers,<br>
Peter Verswyvelen<br>
  <br>
  <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:jerzy.karczmarczuk@info.unicaen.fr">jerzy.karczmarczuk@info.unicaen.fr</a>
wrote:
  <blockquote cite="mid:courier.46D9D1AA.0000605F@averell" type="cite">Yes,
I know, this is Haskell list. So, I apologize, but not too much... <br>
Johan Grönqvist cites me: <br>
    <blockquote type="cite">
      <blockquote type="cite">Anyway, I believe strongly that ALL
people
who have problems... <br>
should be encouraged to learn Prolog. IN DEPTH, <br>
      </blockquote>
      <br>
Do you have a recommendation on how to do this? <br>
(e.g., books, web-pages, (available) lecture notes, problem sets) <br>
    </blockquote>
    <br>
First, install a decent Prolog on your machine. There are plenty: <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://kti.mff.cuni.cz/%7Ebartak/prolog/implementations.html">http://kti.mff.cuni.cz/~bartak/prolog/implementations.html</a>
    <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.cs.cmu.edu/Groups/AI/html/faqs/lang/prolog/prg/part2/faq-doc-2.ht">http://www.cs.cmu.edu/Groups/AI/html/faqs/lang/prolog/prg/part2/faq-doc-2.ht</a>
ml <br>
You may wish to install the free version of Visual Prolog. <br>
My favourite is the SWI Prolog: <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.swi-prolog.org/">http://www.swi-prolog.org/</a> <br>
(University of Amsterdam) <br>
The documentation is complete, and the reference manual contains
references <br>
to such standard books as ClocksinMellish, or Sterling&amp;Shapiro. The
last one <br>
is very, very instructive. <br>
Also, Prolog Programming for Artificial Intelligence, written by
Bratko, is <br>
very useful. There are on the web collection of examples from this
book, <br>
don't remember where. <br>
Try here: <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://promethee.philo.ulg.ac.be/engdep1/download/prolog/bratko/">http://promethee.philo.ulg.ac.be/engdep1/download/prolog/bratko/</a>
    <br>
On-line there are thousands of examples, tutorials, etc. <br>
J. Fisher: (There is an example of cut, especially for A. Coppin) <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.csupomona.edu/%7Ejrfisher/www/prolog_tutorial/contents.html">http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/contents.html</a>
    <br>
others: <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.coli.uni-saarland.de/%7Ekris/learn-prolog-now/lpnpage.php?pageid=on">http://www.coli.uni-saarland.de/~kris/learn-prolog-now/lpnpage.php?pageid=on</a>
line <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://computing.unn.ac.uk/staff/cgpb4/prologbook/book.html">http://computing.unn.ac.uk/staff/cgpb4/prologbook/book.html</a>
    <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.cs.nuim.ie/%7Ejpower/Courses/PROLOG/">http://www.cs.nuim.ie/~jpower/Courses/PROLOG/</a>
    <br>
Etc., etc. Really! <br>
Examples. For example: <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.csse.monash.edu.au/%7Elloyd/tildeLogic/Prolog.toy/Examples/">http://www.csse.monash.edu.au/~lloyd/tildeLogic/Prolog.toy/Examples/</a>
    <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://kti.mff.cuni.cz/%7Ebartak/prolog/learning.html">http://kti.mff.cuni.cz/~bartak/prolog/learning.html</a>
    <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.visual-prolog.com/vip/example/">http://www.visual-prolog.com/vip/example/</a>
    <br>
and of course there are discussion lists, FAQs, etc. Ask Google... <br>
=================== <br>
Andrew Coppin writes: <br>
    <blockquote type="cite">I did once try to learn Prolog. And failed.
Miserably. <br>
    </blockquote>
    <br>
    <blockquote type="cite">I just couldn't bend my head around how the
Prolog interpreter manages to &gt; make seemingly "impossible" leaps of
deduction. (It's a *machine*! How can &gt; it deduce arbitrarily
complex conclusions from any arbitrary set of axioms? That requires
*intelligence*!) And yet, in other, seemingly identical cases, it
utterly fails to deduce patently *obvious* results... really weird! </blockquote>
    <br>
One of standard exercices in Prolog is the construction of the <br>
meta-interpreter of Prolog in Prolog. While this is cheating, I
recommend <br>
it to you. It opens eyes. <br>
Actually, there are three basic items to learn while trying to master
Prolog <br>
after having dealt with the syntactic essentials term construction, and
the <br>
like. <br>
1. The unification, which shows the "ultimate" instance of
pattern-matching <br>
 and is useful for recognizing some techniques for the automatic
inference <br>
 of types in functional languages. <br>
2. The usage of unbound "logical variable", which sometimes permits to <br>
 to do things which require laziness in Haskell. <br>
3. The control backtracking, which is at the heart of the logical
non-de- <br>
 terminism. <br>
Now, the non-deterministic algorithms in Haskell are usually
implemented <br>
using the *data backtracking*, or the List Monad. The control
backtrack, <br>
via, say success/failure continuations, is more difficult, they are
rarely <br>
taught, and problematic because of strong typing. <br>
Prolog strategies are straightforward, and I simply cannot understand
the <br>
comments of Andrew Coppin. Which arbitrary set of conclusions?? Which <br>
patently obvious results not derivable?? Be kind, give some examples, <br>
otherwise people may suspect that you are issuing vacuous statements...
    <br>
The best. <br>
Jerzy Karczmarczuk <br>
    <br>
_______________________________________________ <br>
Haskell-Cafe mailing list <br>
    <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a> <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a>
    <br>
    <br>
    <br>
  </blockquote>
  <br>
</blockquote>
<br>
</body>
</html>