Advertisement

Proofs of declarative properties of logic programs

  • Pierre Deransart
Communications
Part of the Lecture Notes in Computer Science book series (LNCS, volume 351)

Abstract

In this paper we shall consider proofs of declarative properties of Logic Programs, i.e. properties associated with the logical semantics of pure Logic Programs, in particular what is called the partial correctness of a logic program with respect to a specification. A specification consists of a logical formula associated with each predicate and establishing a relation between its arguments. A definite clause program is partially correct iff every possible answer substitution satisfies the specification.

This paper generalizes known results in logic programming in two ways : first it considers any kind of specification, second its results can be applied to extensions of logic programming such as functions or constraints.

In this paper we present two proof methods adapted from the Attribute Grammar field to the field of Logic Programming. Both are proven sound and complete. The first one consists of defining a specification stronger than the original one, which furthermore is inductive (fix-point induction).

The second method is a refinement of the first one : with every predicate, we associate a finite set of formulas (we call this an annotation), together with implications between formulas. The proofs become more modular and tractable, but the user has to verify the consistency of his proof, which is a decidable property. This method is particularly suitable for proving the validity of specifications which are not inductive.

References

  1. [AvE 82]
    K.R. Apt, M.H. Van Emden: Contributions to the theory of Logic Programming. JACM V29, No 3, July 1982 pp 841–862.Google Scholar
  2. [CD 88]
    B. Courcelle, P. Deransart: Proof of partial Correctness for Attribute Grammars with application to Recursive Procedure and Logic Programming. Information and Computation 78, 1, July 1988 (First publication INRIA RR 322-July 1984).Google Scholar
  3. [Cla 79]
    K.L. Clark: Predicate Logic as a Computational Formalism. Res. Mon. 79/59 TOC. Imperial College, December 1979.Google Scholar
  4. [Coo 78]
    S.A. Cook: Soundness and Completeness of an Axiom System for Programs Verification. SIAM Journal. Comput. V7, no 1, February 1978.Google Scholar
  5. [Cou 84]
    B. Courcelle: Attribute Grammars: Definitions, Analysis of Dependencies, Proof Methods. In Methods and Tools for Compiler Construction, CEC-INRIA Course (B. Lorho ed.). Cambridge University Press 1984.Google Scholar
  6. [Der 83]
    P. Deransart: Logical Attribute Grammars. Information Processing 83, pp 463–469, R.E.A. Mason ed. North Holland, 1983.Google Scholar
  7. [Dev 87]
    Y. Deville: A Methodology for Logic Program Construction.PhD Thesis, Institut d'Informatique, Facultés Universitaires de Namur (Belgique), February 1987.Google Scholar
  8. [DF 87]
    P. Deransart, G. Ferrand: Programmation en Logique avec Négation: Présentation Formelle. Publication du laboratoire d'Informatique, University of Orléans, RR 87-3 (June 1987).Google Scholar
  9. [DF 88]
    P. Deransart, G. Ferrand: Logic Programming, Methodology and Teaching. K. Fuchi, L. Kott editors, French Japan Symposium, North Holland, pp 133–147, August 1988.Google Scholar
  10. [DF 88]
    P. Deransart, G. Ferrand: On the Semantics of Logic Programming with Negation. RR 88-1, LIFO, University of Orléans, January 1988.Google Scholar
  11. [DJL 88]
    P. Deransart, M. Jourdan, B. Lorho: Attribute Grammars: Definitions, Systems and Bibliography, LNCS 323, Springer Verlag, August 1988.Google Scholar
  12. [DM 84]
    P. Deransart, J. Maluszynski: Modelling Data Dependencies in Logic Programs by Attribute Schemata. INRIA, RR 323, July 1984.Google Scholar
  13. [DM 85]
    P. Deransart, J. Maluszynski: Relating Logic Programs and Attribute Grammars. J. of Logic Programming 1985, 2 pp 119–155. INRIA, RR 393, April 1985.Google Scholar
  14. [DM 89]
    P. Deransart, J. Maluszynski: A Grammatical View of Logic Programming. PLILP'88, Orléans, France, May 16–18, 1988, LNCS 348, Springer Verlag, 1989.Google Scholar
  15. [DR 88]
    P. Deransart, G. Richard: The Formal Specification of PROLOG standard. Draft 3, December 1987. (Draft 1 published as BSI note PS 198, April 1987, actually ISO-WG17 document, August 1988).Google Scholar
  16. [Dra 87]
    W. Drabent, J. Maluszynski: Do Logic Programs Resemble Programs in Conventional Languages. SLP87, San Francisco, August 31–September 4 1987.Google Scholar
  17. [DrM 87]
    W. Drabent, J. Maluszynski: Inductive Assertion Method for Logic Programs. CFLP 87, Pisa, Italy, March 23–27 1987 (also: Proving Run-Time Properties of Logic Programs. University of Linköping. IDA R-86-23 Logprog, July 1986).Google Scholar
  18. [Fer 85]
    G. Ferrand: Error Diagnosis in Logic Programming, an Adaptation of E. Y. Shapiro's Methods. INRIA, RR 375, March 1985. J. of Logic Programming Vol. 4, 1987, pp 177–198 (French version: University of Orléans, RR no 1, August 1984).Google Scholar
  19. [FGK 85]
    N. Francez, O. Grumberg, S. Katz, A. Pnuelli: Proving Termination of Prolog Programs. In “Logics of Programs, 1985”, R. Parikh Ed., LNCS 193, pp 89–105, 1985.Google Scholar
  20. [Fri 88]
    L. Fribourg: Equivalence-Preserving Transformations of Inductive Properties of Prolog Programs. ICLP'88, Seattle, August 1988.Google Scholar
  21. [Hog 84]
    C.J. Hogger: Introduction to Logic Programming. APIC Studies in Data Processing no 21, Academic Press, 1984.Google Scholar
  22. [KH 81]
    T. Katayama, Y. Hoshino: Verification of Attribute Grammars. 8th ACM POPL Conference. Williamsburg, VA pp 177–186, January 1981.Google Scholar
  23. [Knu 68]
    D.E. Knuth: Semantics of Context Free Languages. Mathematical Systems Theory 2, 2, pp 127–145, June 1968.Google Scholar
  24. [KS 86]
    T. Kanamori, H. Seki: Verification of Prolog Programs using an Extension of Execution. In (Shapiro E., ed.), 3rd ICLP, LNCS 225, pp 475–489, Springer Verlag, 1986.Google Scholar
  25. [Llo 87]
    J. W. Lloyd: Foundations of Logic Programming. Springer Verlag, Berlin, 1987.Google Scholar
  26. [SS 86]
    L. Sterling, E. Y. Shapiro: The Art of Prolog. MIT Press, 1986.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • Pierre Deransart
    • 1
  1. 1.INRIA Domaine de VoluceauLe Chesnay Cédex

Personalised recommendations