3 ms·
I'd say the difference is that Prolog -- and its derivatives like Datalog and Problog -- have seen a huge amount of usage and solve real problems. Commercial im
by usgroup 3y ago
I'd say the difference is that Prolog -- and its derivatives like Datalog and Problog -- have seen a huge amount of usage and solve real problems. Commercial implementations like SICStus support varied specialised mission critical systems. Prolog is a general purpose programming language: you can do everything in Prolog and its naturally extended with constraint programming packages.
Meanwhile, MiniKanren is not a general purpose programming language. You'll struggle to find a commercial grade interpreter or any of the sort of sophistication even opensource Prolog interpreters typically have. What you do find however is hundreds of re-implementations of mini or micro Kanren in every language, and many academic papers about extensions to it.
- anentropic 3y agoI can't speak to the relative usefulness, performance etc of the two paradigms... but: > MiniKanren is not a general purpose programming language and > you do find ... implementations of mini or micro Kanren in every language could easily be positives - the idea of being able to do a bit of "logic programming" in your regular language is appealing My impression is it's fully intended to be implemented as a library in other languages and no one expects there to be a dedicated "commercial grade" MiniKanren interpreter
- _a_a_a_ 3y agoI have no idea if this is even remotely correct, but perhaps MiniKanren could be called the Pascal of the logic programming world?
- will_byrd 3y agoI think that's a fair comparison. I have always loved Pascal, BTW!
- will_byrd 3y agoI agree. Much of the success of miniKanren has been due to it not trying to be an Everything Language. The most pragmatic variant of miniKanren, core.logic in Clojure, was popular because it didn't try to replace Clojure's behavior in general. Clojure programmers don't want to write a web server or financial application in a logic language, but might want just a bit of miniKanren-like reasoning in part of their application. As pointed out by @giraffe_lady, pragmatic core.logic-like small embedded domain-specific language implementations in other popular languages would be useful. The original motivation for miniKanren was to have a small, simple, easy to learn/teach/hack implementation of logic programming that could be taught to students learning functional programming in Scheme. microKanren in particular seems to have nailed this, especially since you can wrap macros around microKanren primitives to get miniKanren, and since microKanren can easily be implemented an almost any language. Once again, the fact that miniKanren and microKanren don't try to do everything is probably a key reason for their success from a teaching standpoint.
- usgroup 3y agoIf you know of a few serious applications of miniKanren in the wild, it would be great to see. I also like the idea of logic programming as a library but I’ve seen enough Prolog to know that making logic programming viable takes a sophisticated interpreter, and I’ve yet to see Kanren indispensable to an application.
- usgroup 3y agoCould be a positive but is it? What does a non-toy problem requiring a bit of logic programming look like? Perhaps a routing or a scheduling problem? Would you not use a MIP or a constraint solver for that? They are typically callable from host languages. Too easy and you don’t need logic programming, a bit harder and you reach for proper solvers, so where does embedded logic programming fit? Prolog takes the view — and mostly exists in the wild — as primarily a non embedded general purpose language. For some applications — eg a stock exchange or an airline booking service — it makes a lot of sense. You could write a web service in Prolog and then call it from other services not written in Prolog.
- tosh 3y agocore.logic in Clojure is a minikanren implementation w/ some performance optimizations and extensions. https://www.youtube.com/watch?v=1_v3l7uY-Ac https://www.youtube.com/watch?v=1_v3l7uY-Ac (The Architecture of core logic - David Nolen)
- will_byrd 3y agoOne success story of core.logic was its use in Threat Grid's software, which apparently ran core.logic on a cluster. Threat Grid was bought out by Cisco for an undisclosed--but apparently large--amount of money. The Clojure community is very pragmatic, and uses (or used?) core.logic more like an embedded Prolog than for purely relational programming like in most of the miniKanren research. The fact that core.logic doesn't try to do everything is a benefit in the eye of Clojure programmers, I believe. I don't know to what extent core.logic is still used in the Clojure community. Datomic uses Datalog as a query language. I don't know if there any any projects that combine Datomic and core.logic; certainly both could be used in the same application.