……理论方面,另一位评论者推荐了 Perreira & Shreiber 的书,我也极力推荐。另外,如果你想找一本更形式化、包含完整证明的逻辑编程著作,经典参考书就是 J. W. Lloyd 的《逻辑编程基础》(Foundations of Logic Programming)。同样,你大概能在你附近的大学图书馆里找到(或者,额,直接去 Google 搜一本来源可疑、画质渣得不行的盗版扫描件,你懂的)。
…theoretical side, another commenter recommended Perreira & Shreiber, which I can't recommend enough. Also, for a more formal text on logic programming, with proofs and all, the classic reference is J. W. Lloyd, Foundations of Logic Programming. Again, you can probably find a copy in your friendly neighbourhood university library (or, er, google it for a very bad copy of dubious legitimacy, like).
还有 Bratko 的《Prolog 编程与人工智能》(Prolog Programming for AI),以及 Clocksin 和 Mellish 合著的《Prolog 编程》(Programming in Prolog)。不过现在的话,我会建议任何对 Prolog 感兴趣的人直接上一记猛药,去啃 George W. Lloyd 的《逻辑编程基础》(Foundations of Logic Programming),因为我吃过亏才明白:把 Prolog 仅仅当作一门普通的编程语言来教,而不解释清楚背后的整套逻辑编程理念,绝对会翻车。
And also "Prolog Programming for AI" by Bratko and "Programming in Prolog" by Clocksin and Mellish. Although these days I'd recommend anyone interested in Prolog starts in at the deep end with "Foundations of Logic Programming" by George W. Lloyd, because I've learned the hard way that teaching Prolog as a mere programming language, without explaining the whole logic programming thing, fails.
……声明式的,纯函数式和逻辑编程语言(在某种程度上)就属于这一类。有趣的是,结合文中的结论来看,Sterling 和 Shapiro 的《Prolog 的艺术》(The Art of Prolog)以及 Lloyd 的《逻辑编程基础》(Foundations of Logic Programming)都把日本的第五代计算机项目作为例子,预言 Prolog 即将迎来迈入主流的突破。
…declarative, which purely functional and logic programming languages are (to some extent). Interestingly, given the conclusions reached in the article, both Sterling and Shapiro's The Art of Prolog and Lloyd's Foundations of Logic Programming mention the Japanese fifth generation project as an example of Prolog's impending breakthrough into the mainstream.
有点扯远了,不过你举的圣诞老人的例子,真是一下子帮我理清了我最近一直在看的东西。我正在读 Lloyd 的《逻辑编程基础》(Foundations of Logic Programming),这本书本质上讲的就是像 Prolog 这种逻辑语言背后的底层原理。我们用未解释函数(uninterpreted functions)[0] 来表示数据,并定义谓词来驱动程序运行。……
So this is a bit of a tangent, but your Santa Claus example really clarified something I've been reading about recently. I'm reading Lloyd's "Foundations of Logic Programming", which essentially explains the fundamentals behind logic languages like Prolog. We write programs using uninterpreted functions[0] to represent our data, and define predicates to drive the program.…
……不仅要对它的实现有深刻理解,还要懂那些促成它作为典型逻辑编程语言落地的扎实理论成果(例如,参见 J. W. Lloyd 的《逻辑编程基础》 Foundations of Logic Programming)。问题在于,Prolog 绝不仅仅是“一门能用来控制数字计算机的语言”这么简单。逻辑编程是数理逻辑学家们工作的延续……
…non-trivial understanding not only of its implementation but also of the substantial theoretical work that led to its implementation as the prototypical logic programming language (e.g. see J. W. Lloyd, Foundations of Logic Programming). The thing is, there is a lot more going on with Prolog than "here is a language that can be used to control a digital computer". Logic programming is the continuation of the work of the logicians…
……如果存在一个可以从 S 导出的子句 C,且 C 包含(subsumes)D,那么逻辑程序 S 就蕴涵该命题。在逻辑编程的相关文献中也能找到类似的陈述,比如 Lloyd 的《逻辑编程基础》(Foundations of Logic Programming)。这个定理的起源其实有点扑朔迷离。Ninenhuys-Cheng 和 de Wolf 撰写的一系列类似论文指出,该定理存在不同的定义,并且似乎被多次重复发现,而且……
…entailed by a logic program S if there exists a clause C that can be derived from S and such that C subsumes D. Similar statements are also found in the logic programming literature, for example in Lloyd's Foundations of Logic Programming. There's a bit of a mystery about the origins of the Theorem. A series of similar papers by Ninenhuys-Cheng and de Wolf point out different definitions and apparent rediscoveries of the Theorem, and…
……理论方面,另一位评论者推荐了 Perreira & Shreiber 的书,我也极力推荐。另外,如果你想找一本更形式化、包含完整证明的逻辑编程著作,经典参考书就是 J. W. Lloyd 的《逻辑编程基础》(Foundations of Logic Programming)。同样,你大概能在你附近的大学图书馆里找到(或者,额,直接去 Google 搜一本来源可疑、画质渣得不行的盗版扫描件,你懂的)。
…theoretical side, another commenter recommended Perreira & Shreiber, which I can't recommend enough. Also, for a more formal text on logic programming, with proofs and all, the classic reference is J. W. Lloyd, Foundations of Logic Programming. Again, you can probably find a copy in your friendly neighbourhood university library (or, er, google it for a very bad copy of dubious legitimacy, like).
还有 Bratko 的《Prolog 编程与人工智能》(Prolog Programming for AI),以及 Clocksin 和 Mellish 合著的《Prolog 编程》(Programming in Prolog)。不过现在的话,我会建议任何对 Prolog 感兴趣的人直接上一记猛药,去啃 George W. Lloyd 的《逻辑编程基础》(Foundations of Logic Programming),因为我吃过亏才明白:把 Prolog 仅仅当作一门普通的编程语言来教,而不解释清楚背后的整套逻辑编程理念,绝对会翻车。
And also "Prolog Programming for AI" by Bratko and "Programming in Prolog" by Clocksin and Mellish. Although these days I'd recommend anyone interested in Prolog starts in at the deep end with "Foundations of Logic Programming" by George W. Lloyd, because I've learned the hard way that teaching Prolog as a mere programming language, without explaining the whole logic programming thing, fails.
……声明式的,纯函数式和逻辑编程语言(在某种程度上)就属于这一类。有趣的是,结合文中的结论来看,Sterling 和 Shapiro 的《Prolog 的艺术》(The Art of Prolog)以及 Lloyd 的《逻辑编程基础》(Foundations of Logic Programming)都把日本的第五代计算机项目作为例子,预言 Prolog 即将迎来迈入主流的突破。
…declarative, which purely functional and logic programming languages are (to some extent). Interestingly, given the conclusions reached in the article, both Sterling and Shapiro's The Art of Prolog and Lloyd's Foundations of Logic Programming mention the Japanese fifth generation project as an example of Prolog's impending breakthrough into the mainstream.
有点扯远了,不过你举的圣诞老人的例子,真是一下子帮我理清了我最近一直在看的东西。我正在读 Lloyd 的《逻辑编程基础》(Foundations of Logic Programming),这本书本质上讲的就是像 Prolog 这种逻辑语言背后的底层原理。我们用未解释函数(uninterpreted functions)[0] 来表示数据,并定义谓词来驱动程序运行。……
So this is a bit of a tangent, but your Santa Claus example really clarified something I've been reading about recently. I'm reading Lloyd's "Foundations of Logic Programming", which essentially explains the fundamentals behind logic languages like Prolog. We write programs using uninterpreted functions[0] to represent our data, and define predicates to drive the program.…
……不仅要对它的实现有深刻理解,还要懂那些促成它作为典型逻辑编程语言落地的扎实理论成果(例如,参见 J. W. Lloyd 的《逻辑编程基础》 Foundations of Logic Programming)。问题在于,Prolog 绝不仅仅是“一门能用来控制数字计算机的语言”这么简单。逻辑编程是数理逻辑学家们工作的延续……
…non-trivial understanding not only of its implementation but also of the substantial theoretical work that led to its implementation as the prototypical logic programming language (e.g. see J. W. Lloyd, Foundations of Logic Programming). The thing is, there is a lot more going on with Prolog than "here is a language that can be used to control a digital computer". Logic programming is the continuation of the work of the logicians…
……如果存在一个可以从 S 导出的子句 C,且 C 包含(subsumes)D,那么逻辑程序 S 就蕴涵该命题。在逻辑编程的相关文献中也能找到类似的陈述,比如 Lloyd 的《逻辑编程基础》(Foundations of Logic Programming)。这个定理的起源其实有点扑朔迷离。Ninenhuys-Cheng 和 de Wolf 撰写的一系列类似论文指出,该定理存在不同的定义,并且似乎被多次重复发现,而且……
…entailed by a logic program S if there exists a clause C that can be derived from S and such that C subsumes D. Similar statements are also found in the logic programming literature, for example in Lloyd's Foundations of Logic Programming. There's a bit of a mystery about the origins of the Theorem. A series of similar papers by Ninenhuys-Cheng and de Wolf point out different definitions and apparent rediscoveries of the Theorem, and…