The Art of Prolog
The Aviv Regev paper you link was recently recommended to me as a useful reference for something. It was a nice surprise to see that Regev's thesis advisor was Ehud Shapiro, known to the Prolog community from his co-authorship of one of the good Prolog books (The Art of Prolog, with Leon Sterling - https://mitpress.mit.edu/9780262691635/the-art-of-prolog/). Indeed, Regev's thesis (and the paper above) propose a system based on a Flat Concurrent Prolog. Shapiro was also the author of one of the two PhD theses that were a major influence to Inductive Logic Programming, a field at the…
Thanks for trying to correct me, if I'm wrong (but thanks anyway). What I write is the impression I've formed after reading various sources on the history of Prolog, over the years. Some of them are even by Kowalski himself and my impression that he was the "neat" and Colmerauer the "scruffy" comes from his comments on their relation. I certainly could have misunderstood his comments, or be misremembering them. Unfortunately it will take me some time to dig out the specific sources and check my assumptions [1]. One such recent source is this documentary (in French) about Alain Colmerauer…
You do need to keep both the procedural and declarative reading of Prolog programs in your head at the same time, yes. But there is such a thing as a "pure subset" of Prolog that doesn't use a) cuts, b) the dynamic database or c) destructive assignment (with arg/3 etc) and if you stay in that pure subset you can go a long way before you need to think procedurally. But to be honest, myself I prefer to switch between the two paradigms at will when thinking about my programs. The trick is to do it in a way that leaves you with the best of both worlds, rather than the worst. In terms of sources…
If you want to learn about Prolog, the best book IMHO is _The Art of Prolog_ by Sterling and Shapiro. The newer edition is out of print and expensive (but worth it!), the previous edition is more like $6 and will give you a good taste. _Programming in Prolog_ by Clocksin & Mellish is a pretty straightforward overview of the language, but TAoP really gets at Prolog's real potential. I also liked _Clause and Effect_, which is somewhat like a "Little Schemer" for Prolog, with a couple fairly substantial projects at the end. "Learn Prolog Now" (http://www.learnprolognow.org/) is free…
Learning another language can mean learning yet another slightly different syntax and API, but sometimes it means learning a fundamentally different model. Learning Erlang's concurrency model, logic programming, or something completely different like K can be a real eye opener, even if you don't use them directly. I've been learning Prolog over the summer* , and while I'm not convinced I will make much use of the language directly, it has some really interesting ideas, which are largely usable in Scheme and Lua. For example, I also have a much better understanding of how unification, type…
Really, quite a few of these hold outside of Haskell as well. * "reduce the interactions between components by relying on pure interfaces" * use purely functional data structures to model key parts of the world you're talking to. Model-driven design with easy to verify logic * Avoid partial functions Pure interfaces require you to declare all context, and it's arguably all the context implicit in typical OO software that kills reusability. As Joe Armstrong put it, "...the problem with object-oriented languages is they've got all this implicit environment that they carry around with them.…
I'm only eight chapters into it, but The Art of Prolog by Sterling and Shapiro has been quite good so far. It started with several chapters about logical & declarative programming, and is now getting into the Prolog language's implementation of it. Also, there's http://learnprolognow.org/ , and there's also some interesting material about Prolog and unification in PAIP. I'm not sure how directly useful Prolog is (and I'm expecting naysayers to come marching in any minute now), but Prolog/Horn clauses seem really handy as a notation. After working through some examples in the book, I…
First off, you generally want code to read as much like logically valid relations as possible. A major strength of Prolog is that "clean" Prolog code is extremely easy to reason about with only local context. Chcek out _Clause and Effect_ by Clocksin and _The Art of Prolog_ by Sterling and Shapiro. CAE is sort of like _The Little Schemer_ for Prolog, but has a couple larger case studies as well. TAoP is one of my absolute favorite programming books - it's got as much substance as SICP. The newer edition (1994) is more expensive (though $35 used on Amazon ATM, which is a steal; it's usually…
It's easy to find blog posts to talk yourself out of getting started with any language. None of them are perfect! Lisp has that "stupid parenthetical syntax" [1], Python has the whitespace thing, Lua indexes from 1, Javascript ... I started tinkering with Prolog as a summer project, and as a side effect, Erlang makes sooo much more sense now. (Erlang was originally implemented in Prolog, and inherited a lot of its syntax & style.) I picked it deliberately because it's quite far from everything I know, and Peter Norvig said a lot of interesting things about it in PAIP. Chatter on the web…
I liked "The Art of Prolog" for learning. And then if you dive deeper, "The Craft of Prolog". I'm curiously amused that the price for used versions on Amazon is so high. https://mitpress.mit.edu/books/art-prolog-second-edition https://isbn.nu/0262192500 https://mitpress.mit.edu/books/craft-prolog https://isbn.nu/9780262512275