Hostname: page-component-77c78cf97d-9dm9z Total loading time: 0 Render date: 2026-05-05T03:46:10.084Z Has data issue: false hasContentIssue false

On Systematic Construction of Correct Logic Programs

Published online by Cambridge University Press:  12 September 2025

WŁODZIMIERZ DRABENT*
Affiliation:
Institute of Computer Science, Polish Academy of Sciences, Poland (e-mail: drabent@ipipan.waw.pl)
Rights & Permissions [Opens in a new window]

Abstract

Partial correctness of imperative or functional programming divides in logic programming into two notions. Correctness means that all answers of the program are compatible with the specification. Completeness means that the program produces all the answers required by the specifications. We also consider semi-completeness – completeness for those queries for which the program does not diverge. This paper presents an approach to systematically construct provably correct and semi-complete logic programs, for a given specification. Normal programs are considered, under Kunen’s 3-valued completion semantics (of negation as finite failure) and the well-founded semantics (of negation as possibly infinite failure). The approach is declarative, it abstracts from details of operational semantics, like, for example, the form of the selected literals (“procedure calls”) during the computation. The proposed method is simple and can be used (maybe informally) in actual everyday programming.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Supplementary material: File

Drabent supplementary material

Drabent supplementary material
Download Drabent supplementary material(File)
File 256.3 KB