Skip to main content

2015 | OriginalPaper | Buchkapitel

On Completeness of Logic Programs

verfasst von : Włodzimierz Drabent

Erschienen in: Logic-Based Program Synthesis and Transformation

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

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.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
The same holds for \(A\) of the form \(q(s_{11}\mathtt{-}s_{11},s_2)\), or \(q(s_{11}\mathtt{-}s_{12},s_2)\) with non-unifiable \(s_{11}\), \(s_{12}\). The pruning is implemented using the if-then-else construct in Prolog: \(\mathtt{q(V-P,[A|T]) :\!\!-\,V=\,P\, -\!\!\!> true;\, p(A,T).}\) (And the first case of pruning by \(\mathtt{p(V-P,[B|T]):\!\!-\, non{}var(V)\,-\!\!\!> q(V-P,[B|T]);}\,\, \mathtt{q(B,[V-P|T])}.)\)
 
2
In [9] a weaker version of Theorem 18 was used, and one case of pruning was discussed informally. A proof covering both cases of pruning is illustrated here in Example 20.
 
Literatur
1.
Zurück zum Zitat Apt, K.R.: From Logic Programming to Prolog. International Series in Computer Science. Prentice-Hall, Upper Saddle River (1997) Apt, K.R.: From Logic Programming to Prolog. International Series in Computer Science. Prentice-Hall, Upper Saddle River (1997)
2.
4.
Zurück zum Zitat Clark, K.L.: Predicate logic as computational formalism. Technical report 79/59, Imperial College, London (1979) Clark, K.L.: Predicate logic as computational formalism. Technical report 79/59, Imperial College, London (1979)
5.
Zurück zum Zitat Deransart, P., Małuszyński, J.: A Grammatical View of Logic Programming. The MIT Press, Cambridge (1993) MATH Deransart, P., Małuszyński, J.: A Grammatical View of Logic Programming. The MIT Press, Cambridge (1993) MATH
6.
Zurück zum Zitat Deville, Y.: Logic Programming: Systematic Program Development. Addison-Wesley, Reading (1990) Deville, Y.: Logic Programming: Systematic Program Development. Addison-Wesley, Reading (1990)
8.
Zurück zum Zitat Doets, K.: From Logic to Logic Programming. The MIT Press, Cambridge (1994)MATH Doets, K.: From Logic to Logic Programming. The MIT Press, Cambridge (1994)MATH
13.
Zurück zum Zitat Drabent, W., Miłkowska, M.: Proving correctness and completeness of normal programs - a declarative approach. Theory Pract. Log. Program. 5(6), 669–711 (2005)CrossRefMATHMathSciNet Drabent, W., Miłkowska, M.: Proving correctness and completeness of normal programs - a declarative approach. Theory Pract. Log. Program. 5(6), 669–711 (2005)CrossRefMATHMathSciNet
14.
Zurück zum Zitat Genaim, S., King, A.: Inferring non-suspension conditions for logic programs with dynamic scheduling. ACM Trans. Comput. Log. 9(3), 17:1–17:43 (2008)CrossRefMathSciNet Genaim, S., King, A.: Inferring non-suspension conditions for logic programs with dynamic scheduling. ACM Trans. Comput. Log. 9(3), 17:1–17:43 (2008)CrossRefMathSciNet
15.
Zurück zum Zitat Hogger, C.J.: Introduction to Logic Programming. Academic Press, London (1984)MATH Hogger, C.J.: Introduction to Logic Programming. Academic Press, London (1984)MATH
17.
Zurück zum Zitat King, A.: Personal communication, March 2012 King, A.: Personal communication, March 2012
18.
Zurück zum Zitat 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) 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)
19.
Zurück zum Zitat Pettorossi, A., Proietti, M.: Transformation of logic programs: foundations and techniques. J. Log. Program. 19/20, 261–320 (1994)CrossRefMathSciNet Pettorossi, A., Proietti, M.: Transformation of logic programs: foundations and techniques. J. Log. Program. 19/20, 261–320 (1994)CrossRefMathSciNet
20.
Zurück zum Zitat Pettorossi, A., Proietti, M., Senni, V.: The transformational approach to program development. In: Dovier, A., Pontelli, E. (eds.) GULP. LNCS, vol. 6125, pp. 112–135. Springer, Heidelberg (2010) CrossRef Pettorossi, A., Proietti, M., Senni, V.: The transformational approach to program development. In: Dovier, A., Pontelli, E. (eds.) GULP. LNCS, vol. 6125, pp. 112–135. Springer, Heidelberg (2010) CrossRef
21.
Zurück zum Zitat Shapiro, E.: Algorithmic Program Debugging. The MIT Press, Cambridge (1983) Shapiro, E.: Algorithmic Program Debugging. The MIT Press, Cambridge (1983)
22.
Zurück zum Zitat Stärk, R.F.: The theoretical foundations of LPTP (a logic program theorem prover). J. Log. Program. 36(3), 241–269 (1998)CrossRefMATH Stärk, R.F.: The theoretical foundations of LPTP (a logic program theorem prover). J. Log. Program. 36(3), 241–269 (1998)CrossRefMATH
23.
Zurück zum Zitat Sterling, L., Shapiro, E.: The Art of Prolog, 2nd edn. The MIT Press, Cambridge (1994) MATH Sterling, L., Shapiro, E.: The Art of Prolog, 2nd edn. The MIT Press, Cambridge (1994) MATH
Metadaten
Titel
On Completeness of Logic Programs
verfasst von
Włodzimierz Drabent
Copyright-Jahr
2015
DOI
https://doi.org/10.1007/978-3-319-17822-6_15