arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1305.0141cs.LO
收藏

逻辑程序设计中的真值与信息

Truth versus information in logic programming

Lee Naish, Harald Søndergaard

摘要:

逻辑程序的语义最初是用二值逻辑来描述的。然而很快,人们意识到三值逻辑有一些天然的优势,因为它不仅为真和假提供了不同的值,而且还为“未定义”提供了不同的值。Fitting和Kunen提出的三值语义与逻辑程序的计算密切相关,第三个真值与非终止性相关。一个不同的三值语义,由Naish提出,与Fitting和Kunen的语义有很多共同之处,但包含了对程序员意图的允许,第三个真值与欠规范有关。Naish使用了一个(显然)新颖的“箭头”运算符来关联谓词定义左侧和右侧的预期含义。在本文中,我们建议Fitting/Kunen和Naish的附加真值最好被视为“最小值”。我们使用贝尔纳普的四值逻辑,也用于其他地方的拟合,统一的两个三值的方法。真值被安排在一个双格中,它支持真值的经典排序以及“信息排序”。我们注意到Naish的"箭头"算子(以及我们的四值扩展)本质上是信息序,而经典箭头表示真值序。这使我们能够阐明逻辑编程的许多方面,包括程序分析,类型和模式系统,声明式调试和规范和程序之间的关系,以及程序的连续执行状态。这篇论文发表在《逻辑程序设计理论与实践》(Theory and Practice of Logic Programming,TPLP)上。

英文摘要:

The semantics of logic programs was originally described in terms of two-valued logic. Soon, however, it was realised that three-valued logic had some natural advantages, as it provides distinct values not only for truth and falsehood, but also for "undefined". The three-valued semantics proposed by Fitting and by Kunen are closely related to what is computed by a logic program, the third truth value being associated with non-termination. A different three-valued semantics, proposed by Naish, shared much with those of Fitting and Kunen but incorporated allowances for programmer intent, the third truth value being associated with underspecification. Naish used an (apparently) novel "arrow" operator to relate the intended meaning of left and right sides of predicate definitions. In this paper we suggest that the additional truth values of Fitting/Kunen and Naish are best viewed as duals. We use Belnap's four-valued logic, also used elsewhere by Fitting, to unify the two three-valued approaches. The truth values are arranged in a bilattice which supports the classical ordering on truth values as well as the "information ordering". We note that the "arrow" operator of Naish (and our four-valued extension) is essentially the information ordering, whereas the classical arrow denotes the truth ordering. This allows us to shed new light on many aspects of logic programming, including program analysis, type and mode systems, declarative debugging and the relationships between specifications and programs, and successive executions states of a program. This paper is to appear in Theory and Practice of Logic Programming (TPLP).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑