On correctness and completeness of an n queens program

08/18/2021
by   Włodzimierz Drabent, et al.
0

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 not be 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. Under consideration in Theory and Practice of Logic Programming (TPLP).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/16/2019

On correctness of an n queens program

Thom Frühwirth presented a short, elegant and efficient Prolog program f...
research
06/10/2020

S-semantics – an example

The s-semantics makes it possible to explicitly deal with variables in p...
research
01/01/2018

TWAM: A Certifying Abstract Machine for Logic Programs

Type-preserving (or typed) compilation uses typing derivations to certif...
research
10/13/2022

Soundness and Completeness of SPARQL Query Containment Solver SpeCS

Tool SPECS implements an efficient automated approach for reasoning abou...
research
03/29/2022

Towards the Future: Bring Program Correctness back to the focus

Program correctness used to be the main concern of computer software in ...
research
09/28/2020

A Theoretical Study of (Full) Tabled Constraint Logic Programming

Logic programming with tabling and constraints (TCLP, tabled constraint ...
research
02/22/2019

Reducing Total Correctness to Partial Correctness by a Transformation of the Language Semantics

We give a language-parametric solution to the problem of total correctne...

Please sign up or login with your details

Forgot password? Click here to reset