有没有好的非 Prolog 或基于 Prolog 的逻辑编程语言?
谁有这方面的经验或有什么好的经验?
答案集编程是一种非常强大的逻辑编程范式。我在使用clasp/clingo 答案集求解器方面取得了很大的成功。
I highly recommend The Reasoned Schemer, by Dan Friedman, Oleg Kiselyov, and Will Byrd. It introduces miniKanren, a small (three core operators) logic programming language built atop Scheme. It's a joy to use, particularly with the matche
macro that allows unifying pattern matches.
我是通过答案集编程了解 DLV 和模型的,这基本上是逻辑编程。
您可以查看 CLIPS。它的结构类似于 Lisp(很多括号),但它是为构建专家系统而设计的;我还没有看到 Prolog 解决了 CLIPS 无法解决的问题。与 Prolog 一样,它基于构建事实,然后针对它们运行查询。
还有一个用Clojure编写的非常快的 miniKanren 实现,称为core.logic。
还有一些使用它的教程:
https://github.com/clojure/core.logic/wiki/A-Core.logic-Primer
https://github.com/frenchy64/Logic-Starter/wiki
http://objectcommando.com/blog/2011/11/04/the-magical-island-of-kanren-core-logic-intro-part-1/
水星和奥兹浮现在脑海中。还有 Datalog,它是 Prolog 的受限(非图灵完备)版本。