arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1909.07479cs.LOcs.PLcs.SE
收藏

关于n皇后规划的正确性

On correctness of an n queens program

Włodzimierz Drabent

摘要:

Thom Frühlynth提出了一个简短,优雅和有效的Prolog程序的n皇后问题。然而,该程序可能被视为相当棘手,人们可能不相信它的正确性。本文以声明的方式解释了程序,并证明了程序的正确性和完整性。规范和证明是声明性的,即它们从任何操作语义中抽象出来。该规范是近似的,不需要精确地描述程序的语义。尽管该程序的工作在非地面条款,这项工作采用了标准的语义,基于逻辑后果和Herbrand解释。本文的另一个目的是提出一个关于逻辑程序语义的精确声明推理的例子。

英文摘要:

Thom Frühwirth presented a short, elegant and efficient Prolog program for the n queens problem. However the program may be seen as rather tricky and one may be not convinced about its correctness. This paper explains the program in a declarative way, and provides proofs of its correctness and completeness. The specification and the proofs are declarative, i.e. they abstract from any operational semantics. The specification is approximate, it is unnecessary to describe the program's semantics exactly. Despite the program works on non-ground terms, this work employs the standard semantics, based on logical consequence and Herbrand interpretations. Another purpose of the paper is to present an example of precise declarative reasoning about the semantics of a logic program.

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

↑