8 ms·
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.
by seanmcdirmid 12y ago
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.
- craigching 12y agoThis. 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.
- MonkeyIsNull 12y agoAmen
- malisper 12y agoJust a nitpick, but core.logic is a version of Kanren[0]. [0] https://github.com/clojure/core.logic https://github.com/clojure/core.logic
- craigching 12y agoI'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
- malisper 12y agoIt'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.
- mjn 12y agoThere'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 http://potassco.sourceforge.net An introductory paper: http://www.aaai.org/Papers/AAAI/2008/AAAI08-270.pdf http://www.aaai.org/Papers/AAAI/2008/AAAI08-270.pdf
- leibniz 12y agoLet me add another good entry point to answer set programming. http://www.kr.tuwien.ac.at/staff/tkren/pub/2009/rw2009-asp.pdf http://www.kr.tuwien.ac.at/staff/tkren/pub/2009/rw2009-asp.p...