Abstract
AbstractThis 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.
Publisher
Cambridge University Press (CUP)
Subject
Artificial Intelligence,Computational Theory and Mathematics,Hardware and Architecture,Theoretical Computer Science,Software
Cited by
8 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. A relaxed condition for avoiding the occur-check;Theoretical Computer Science;2023-10
2. On Feasibility of Declarative Diagnosis;Electronic Proceedings in Theoretical Computer Science;2023-09-12
3. Implementing Backjumping by Means of Exception Handling;Theory and Practice of Logic Programming;2023-07
4. On Correctness of Normal Logic Programs;Logic-Based Program Synthesis and Transformation;2022
5. On Correctness and Completeness of an n Queens Program;Theory and Practice of Logic Programming;2021-10-14