Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>What are the names of the algorithms and concepts used in Prolog?</p> </blockquote> <ul> <li><a href="https://secure.wikimedia.org/wikipedia/en/wiki/Logic_programming" rel="noreferrer">Logic programming</a></li> <li>Depth-first, <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Backtracking" rel="noreferrer">backtracking</a> search</li> <li><a href="https://secure.wikimedia.org/wikipedia/en/wiki/Unification_%28computer_science%29" rel="noreferrer">Unification</a></li> </ul> <p>See Sterling &amp; Shapiro, <em>The Art of Prolog</em> (MIT Press) for the theory behind Prolog.</p> <blockquote> <p>Probably it builds some kind of tree structure or directed object graph, and then upon queries it traveres that graph with a sophisticated algorithm. A Depth First Search maybe.</p> </blockquote> <p>It doesn't build the graph explicitly, that wouldn't even be possible with infinite search spaces. Check out the first chapters of <a href="http://aima.cs.berkeley.edu/" rel="noreferrer">Russell &amp; Norvig</a> for the concept of state-space search. Yes, it does depth-first search with backtracking, but no, that isn't very sophisticated. It's just very convenient and programming alternative search strategies isn't terribly hard in Prolog.</p> <blockquote> <p>understanding Prolog seems to be a great way to start, imho.</p> </blockquote> <p>Depends on what you want to do, but knowing Prolog certainly doesn't hurt. It's a very different way of looking at programming. Knowing Prolog helped me understand functional programming very quickly.</p> <blockquote> <p>My idea is to try to rebuild something similar and skipping the parser part completely</p> </blockquote> <p>You mean skipping the Prolog syntax? If you happen to be familiar with Scheme or Lisp, then check out <a href="http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-29.html" rel="noreferrer">section 4.4 of Abelson &amp; Sussman</a> where they explain how to implement a logic programming variant of Scheme, in Scheme.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload