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. The considered semantics of normal programs is the standard one, given by the program completion in 3-valued logic.
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.
This research was partly supported by a KBN grant no. 8 T11C 015 15.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
K. R. Apt and K. Doets. A new definition of SLDNF-resolution. Journal of Logic Programming, 18(2):177–190, 1994.
K. Apt. Logic programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, Volume B, chapter 10, pages 493–574. Elsevier Science Publishers B.V., 1990.
K. R. Apt. Declarative programming in Prolog. In D. Miller, editor, Logic Programming, Proc. ILPS’93, pages 12–35. The MIT Press, 1993.
K. R. Apt. From Logic Programming to Prolog. Prentice-Hall, 1997.
A. Bossi and N. Cocco. Verifying correctness of logic programs. In Proceedings of TAPSOFT’ 89, vol. 2, pages 96–110. Springer-Verlag, 1989. LNCS 352.
B. Courcelle and P. Deransart. Proofs of partial correctness for attribute grammars with application to recursive procedures and logic programming. Information and Computation, 78(1):1–55, 1988.
K. L. Clark. Predicate logic as computational formalism. Technical Report Technical Report 79/59, Imperial College, London, December 1979.
F.S. de Boer et al. Proving concurrent constraint programs correct. ACM TOPLAS, 19(5):685–725, 1997.
P. Deransart. Proof methods of declarative properties of definite programs. Theoretical Computer Science, 118:99–166, 1993.
Y. Deville. Logic Programming: Systematic Program Development. Addison-Wesley, 1990.
W. Drabent and J. Małuszyński. Inductive assertion method for logic programs. Theoretical Computer Science, 59:133–155, 1988.
P. Deransart and J. Małuszyński. A Grammatical View of Logic Programming. The MIT Press, 1993.
W. Drabent and M. Miłkowska. Proving correctness and completeness of normal programs-a declarative approach. Preliminary, unabridged version, http://www.ipipan.waw.pl/~drabent/proving.iclp01-prel.ps.gz, 2001.
K. Doets. From Logic to Logic Programming. The MIT Press, Cambridge, MA, 1994.
W. Drabent. What is failure? An approach to constructive negation. Acta Informatica, 32(1):27–59, 1995.
W. Drabent. It is declarative: On reasoning about logic programs. Poster in Proc. 1999 International Conference on Logic Programming (unpublished report, http://www.ipipan.waw.pl/~drabent/itsdeclarative3.ps.gz), May 1999.
C. J. Hogger. Derivation of logic programs. J. of ACM, 28(2):372–392, 1981.
K. Kunen. Negation in logic programming. Journal of Logic Programming, 4(4):289–308, 1987.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 2nd edition, 1987.
L. Naish. A declarative view of modes. In Proceedings of JICSLP’96, pages 185–199. MIT Press, 1996.
Lee Naish. A three-valued semantics for Horn clause programs. Australian Computer Science Communications, 22(1):174–180, January 2000.
D. Pedreschi and S. Ruggieri. Verification of logic programs. Journal of Logic Programming, 39(1–3):125–176, 1999.
R. F. Stärk. From logic programs to inductive definitions. In W. A. Hodges et al., editors, Logic: From Foundations to Applications, European Logic Colloqium’93, pages 453–481. Clarendon Press, Oxford, 1996.
R. F. Stärk. Formal verification of logic programs: Foundations and implementation. In Logical Foundations of Computer Science LFCS’97-Logic at Yaroslavl, pages 354–368. Springer-Verlag, 1997. LNCS 1234.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Drabent, W., Miłkowska, M. (2001). Proving Correctness and Completeness of Normal Programs — A Declarative Approach. In: Codognet, P. (eds) Logic Programming. ICLP 2001. Lecture Notes in Computer Science, vol 2237. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45635-X_27
Download citation
DOI: https://doi.org/10.1007/3-540-45635-X_27
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42935-7
Online ISBN: 978-3-540-45635-3
eBook Packages: Springer Book Archive