Proving correctness and completeness of normal programs – a declarative approach
-
Published:2005-10-31
Issue:6
Volume:5
Page:669-711
-
ISSN:1471-0684
-
Container-title:Theory and Practice of Logic Programming
-
language:en
-
Short-container-title:Theory and Practice of Logic Programming
Author:
DRABENT WŁODZIMIERZ,MIŁKOWSKA MIROSŁAWA
Abstract
We advocate a declarative approach to proving properties of logic programs. Total correctness can be separated into correctness, completeness and clean termination; the latter includes non-floundering. Only clean termination depends on the operational semantics, in particular on the selection rule. We show how to deal with correctness and completeness in a declarative way, treating programs only from the logical point of view. Specifications used in this approach are interpretations (or theories). We point out that specifications for correctness may differ from those for completeness, as usually there are answers which are neither considered erroneous nor required to be computed. We present proof methods for correctness and completeness for definite programs and generalize them to normal programs. For normal programs we use the 3-valued completion semantics; this is a standard semantics corresponding to negation as finite failure. The proof methods employ solely the classical 2-valued logic. We use a 2-valued characterization of the 3-valued completion semantics, which may be of separate interest. The method of proving correctness of definite programs is not new and can be traced back to the work of clark in 1979. However a more complicated approach using operational semantics was proposed by some authors. We show that it is not stronger than the declarative one, as far as properties of program answers are concerned. For a corresponding operational approach to normal programs, we show that it is (strictly) weaker than our method. We also employ the ideas of this work to generalize a known method of proving termination of normal programs.
Publisher
Cambridge University Press (CUP)
Subject
Artificial Intelligence,Computational Theory and Mathematics,Hardware and Architecture,Theoretical Computer Science,Software
Cited by
11 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. On Feasibility of Declarative Diagnosis;Electronic Proceedings in Theoretical Computer Science;2023-09-12
2. On Correctness of Normal Logic Programs;Logic-Based Program Synthesis and Transformation;2022
3. On Correctness and Completeness of an n Queens Program;Theory and Practice of Logic Programming;2021-10-14
4. Automated Personalized Assessment of Computational Thinking MOOC Assignments;2017 IEEE 17th International Conference on Advanced Learning Technologies (ICALT);2017-07
5. Logic + control: On program construction and verification;Theory and Practice of Logic Programming;2017-06-19