Re:Rethinking Prolog [pdf]
by seanmcdirmid on Thursday September 11, 2014 @08:38PM
(#8306042)
The problem with programming in Prolog after learning how to think in Prolog is the need to remaster control of the search space via cut.
[ Parent
| on HN ]
There's a fairly large part of the ex-Prolog community that decided to go all-in on the declarative part, partly in reaction to that, and partly in reaction to other warts in Prolog's semantics, like the fact that statement order is significant. There was a period when logic-programming theorists were trying to come up with what Prolog's semantics would be, if you assumed it was possible to give it a vaguely logic-style semantics versus defining its semantics as "whatever SLDNF gives you". One of the proposals that came out that was the "stable model semantics". And that gave rise to a purely declarative logic-programming paradigm, answer-set programming. That has then turned out to mesh well with modern developments in SAT/SMT/etc. solver-style systems, instead of Prolog's more classic backtracking search, so sits at some kind of intermediate space where it's about equally influenced by the logic-programming heritage and the "solver" heritage.
A well-maintained / open-source implementation: http://potassco.sourceforge.net
An introductory paper: http://www.aaai.org/Papers/AAAI/2008/AAAI08-270.pdf
Let me add another good entry point to answer set programming. http://www.kr.tuwien.ac.at/staff/tkren/pub/2009/rw2009-asp.p...
Re:Rethinking Prolog [pdf]
by craigching on Thursday September 11, 2014 @09:25PM
(#8306166)
This. I'm no Prolog expert, but every time I come back to it I remember how elegant canonical problems are to solve with it. I absolutely love the declarative style. More languages need to have logic extensions a la core.logic for Clojure, various Kanrens for Scheme. I would love to see computer scientists make advancements in logic programming.
Just a nitpick, but core.logic is a version of Kanren[0].
Re:Rethinking Prolog [pdf]
by craigching on Thursday September 11, 2014 @11:45PM
(#8306506)
I'm aware of that, I wasn't aware that I said otherwise ;) I just meant that more implementations in more languages would be a good thing
It's just the way you phrased it, core.logic for Clojure, various Kanrens for Scheme, as opposed to, implementations for Kanren in Clojure and Scheme such as core.logic.
Re:Rethinking Prolog [pdf]
by MonkeyIsNull on Thursday September 11, 2014 @09:27PM
(#8306176)
Amen