English

Logic + control: On program construction and verification

Logic in Computer Science 2017-05-15 v6 Programming Languages

Abstract

This paper presents an example of formal reasoning about the semantics of a Prolog program of practical importance (the SAT solver of Howe and King). The program is treated as a definite clause logic program with added control. The logic program is constructed by means of stepwise refinement, hand in hand with its correctness and completeness proofs. The proofs are declarative - they do not refer to any operational semantics. Each step of the logic program construction follows a systematic approach to constructing programs which are provably correct and complete. We also prove that correctness and completeness of the logic program is preserved in the final Prolog program. Additionally, we prove termination, occur-check freedom and non-floundering. Our example shows how dealing with "logic" and with "control" can be separated. Most of the proofs can be done at the "logic" level, abstracting from any operational semantics. The example employs approximate specifications; they are crucial in simplifying reasoning about logic programs. It also shows that the paradigm of semantics-preserving program transformations may be not sufficient. We suggest considering transformations which preserve correctness and completeness with respect to an approximate specification.

Keywords

Cite

@article{arxiv.1110.4978,
  title  = {Logic + control: On program construction and verification},
  author = {Włodzimierz Drabent},
  journal= {arXiv preprint arXiv:1110.4978},
  year   = {2017}
}

Comments

29 pages. Version 3 substantially reworked, in particular all informal reasoning replaced by proofs, part of the content moved to 1412.8739 and 1411.3015. Versions 4, 5 and this one -- various modifications and extensions. Under consideration in Theory and Practice of Logic Programming (TPLP)

R2 v1 2026-06-21T19:24:12.298Z