当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
On correctness of an n queens program
arXiv - CS - Programming Languages Pub Date : 2019-09-16 , DOI: arxiv-1909.07479
W{\l}odzimierz Drabent

Thom Fr\"uhwirth 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.

中文翻译:

关于n皇后程序的正确性

Thom Fr\"uhwirth 为 n 皇后问题提出了一个简短、优雅和高效的 Prolog 程序。然而,该程序可能被视为相当棘手,人们可能不相信它的正确性。本文以声明性的方式解释了该程序,并且提供其正确性和完整性的证明。规范和证明是声明性的,即它们从任何操作语义中抽象出来。规范是近似的,没有必要准确地描述程序的语义。尽管程序在非基础术语上工作,这工作采用标准语义,基于逻辑结果和 Herbrand 解释。本文的另一个目的是展示一个关于逻辑程序语义的精确声明性推理的例子。
更新日期:2020-07-21
down
wechat
bug