On Completeness of Logic Programs
Program correctness (in imperative and functional programming) splits in logic programming into correctness and completeness. Completeness means that a program produces all the answers required by its specification. Little work has been devoted to reasoning about completeness. This paper presents a few sufficient conditions for completeness of definite programs. We also study preserving completeness under some cases of pruning of SLD-trees (e.g. due to using the cut).
We treat logic programming as a declarative paradigm, abstracting from any operational semantics as far as possible. We argue that the proposed methods are simple enough to be applied, possibly at an informal level, in practical Prolog programming. We point out importance of approximate specifications.
KeywordsLogic programming Program completeness Declarative programming Approximate specification
- 1.Apt, K.R.: From Logic Programming to Prolog. International Series in Computer Science. Prentice-Hall, Upper Saddle River (1997)Google Scholar
- 4.Clark, K.L.: Predicate logic as computational formalism. Technical report 79/59, Imperial College, London (1979)Google Scholar
- 6.Deville, Y.: Logic Programming: Systematic Program Development. Addison-Wesley, Reading (1990)Google Scholar
- 9.Drabent, W.: Logic + control: an example. In: Dovier, A., Santos Costa, V. (eds.) Technical Communications of ICLP 2012. LIPIcs, vol. 17, pp. 301–311 (2012). http://drops.dagstuhl.de/opus/volltexte/2012/3631
- 10.Drabent, W.: Logic + control: an example of program construction, CoRR. abs/1110.4978 (2012). http://arxiv.org/abs/1110.4978.
- 11.Drabent, W.: Correctness and completeness of logic programs, CoRR. abs/1412.8739 (2014). http://arxiv.org/abs/1412.8739
- 12.Drabent, W.: On completeness of logic programs, CoRR. abs/1411.3015(2014). http://arxiv.org/abs/1411.3015
- 17.King, A.: Personal communication, March 2012Google Scholar
- 18.Kowalski, R.A.: The relation between logic programming and logic specification. In: Hoare, C., Shepherdson, J. (eds.) Mathematical Logic and Programming Languages, pp. 11–27. Prentice-Hall, Upper Saddle River (1985). Also in Phil. Trans. R. Soc. Lond. A, 312, 345–361(1984)Google Scholar
- 21.Shapiro, E.: Algorithmic Program Debugging. The MIT Press, Cambridge (1983) Google Scholar