Advertisement

Proving properties of logic programs by abstract diagnosis

  • Marco Comini
  • Giorgio Levi
  • Maria Chiara Meo
  • Giuliana Vitiello
Invited Paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1192)

Abstract

We show how declarative diagnosis techniques can be extended to cope with verification of operational properties, such as computed answers, and of abstract properties, such as types and groundness dependencies. The extension is achieved by using a simple semantic framework, based on abstract interpretation. The resulting technique (abstract diagnosis) leads to elegant bottom-up and top-down verification methods, which do not require to determine the symptoms in advance, and which are effective in the case of abstract properties described by finite domains.

Keywords

Logic Programming Declarative diagnosis Verification Semantics Debugging 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    A. Aiken and T. K. Lakshman. Directional type checking of logic programs. In B. Le Charlier, editor, Proc. Static Analysis Symposium, SAS'94, volume 864 of Lecture Notes in Computer Science, pages 43–60. Springer-Verlag, 1994.Google Scholar
  2. 2.
    K. R. Apt. Introduction to Logic Programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B: Formal Models and Semantics, pages 495–574. Elsevier and The MIT Press, 1990.Google Scholar
  3. 3.
    K. R. Apt. Program verification and Prolog. In E. Börger, editor, Specification and validation methods for programming languages and systems. Oxford University Press, 1994.Google Scholar
  4. 4.
    K. R. Apt, M. Gabbrielli, and D. Pedreschi. A closer look to declarative interpretations. Journal of Logic Programming, 28(2):147–180, 1996.Google Scholar
  5. 5.
    K. R. Apt and E. Marchiori. Reasoning about Prolog programs: from modes through types to assertions. Formal Aspects of Computing, 6(6A):743–765, 1994.Google Scholar
  6. 6.
    K. R. Apt and D. Pedreschi. Reasoning about termination of pure PROLOG programs. Information and Computation, 106(1):109–157, 1993.Google Scholar
  7. 7.
    T. Armstrong, K. Marriott, P. Schachte, and H. Søndergaard. Boolean functions for dependency analysis: Algebraic properties and efficient representation. In B. Le Charlier, editor, Proc. Static Analysis Symposium, SAS'94, volume 864 of Lecture Notes in Computer Science, pages 266–280. Springer-Verlag, 1994.Google Scholar
  8. 8.
    A. Bossi, M. Gabbrielli, G. Levi, and M. Martelli. The s-semantics approach: Theory and applications. Journal of Logic Programming, 19–20:149–197, 1994.Google Scholar
  9. 9.
    K. L. Clark. Predicate logic as a computational formalism. Res. Report DOC 79/59, Imperial College, Dept. of Computing, London, 1979.Google Scholar
  10. 10.
    C. Click and K. D. Cooper. Combining analyses, combining optimizations. ACM Transactions on Programming Languages and Systems, 17(2):181–196, 1995.Google Scholar
  11. 11.
    M. Codish, A. Mulkers, M. Bruynooghe, M. García de la Banda, and M. Hermenegildo. Improving abstract interpretations by combining domains. ACM Transactions on Programming Languages and Systems, 17(1):28–44, 1995.Google Scholar
  12. 12.
    P. Codognet and G. Filè. Computations, Abstractions and Constraints. In Proc. Fourth IEEE Int'l Conference on Computer Languages. IEEE Press, 1992.Google Scholar
  13. 13.
    M. Comini and G. Levi. An algebraic theory of observables. In M. Bruynooghe, editor, Proceedings of the 1994 Int'l Symposium on Logic Programming, pages 172–186. The MIT Press, 1994.Google Scholar
  14. 14.
    M. Comini, G. Levi, and M. C. Meo. Compositionality of SLD-derivations and their abstractions. In J. Lloyd, editor, Proceedings of the 1995 Int'l Symposium on Logic Programming, pages 561–575. The MIT Press, 1995.Google Scholar
  15. 15.
    M. Comini, G. Levi, and M. C. Meo. A theory of observables for logic programs. Submitted for publication, 1996.Google Scholar
  16. 16.
    M. Comini, G. Levi, and G. Vitiello. Abstract debugging of logic programs. In L. Fribourg and F. Turini, editors, Proc. Logic Program Synthesis and Transformation and Metaprogramming in Logic 1994, volume 883 of Lecture Notes in Computer Science, pages 440–450. Springer-Verlag, 1994.Google Scholar
  17. 17.
    M. Comini, G. Levi, and G. Vitiello. Declarative diagnosis revisited. In J. Lloyd, editor, Proceedings of the 1995 Int'l Symposium on Logic Programming, pages 275–287. The MIT Press, 1995.Google Scholar
  18. 18.
    M. Comini, G. Levi, and G. Vitiello. Efficient detection of incompleteness errors in the abstract debugging of logic programs. In M. Ducassé, editor, Proc. 2nd International Workshop on Automated and Algorithmic Debugging, AADEBUG'95, 1995.Google Scholar
  19. 19.
    M. Comini and M. C. Meo. Compositionality properties of SLD-derivations. Submitted for publication, 1996.Google Scholar
  20. 20.
    A. Cortesi, G. Filé, R. Giacobazzi, C. Palamidessi, and F. Ranzato. Complementation in abstract interpretation. In A. Mycroft, editor, Proceedings of the 2nd International Static Analysis Symposium (SAS '95), volume 983 of Lecture Notes in Computer Science, pages 100–117. Springer-Verlag, 1995. To appear in ACM Transactions on Programming Languages and Systems.Google Scholar
  21. 21.
    A. Cortesi, G. Filè, and W. Winsborough. Prop revisited: Propositional Formula as Abstract Domain for Groundness Analysis. In Proc. Sixth IEEE Symp. on Logic In Computer Science, pages 322–327. IEEE Computer Society Press, 1991.Google Scholar
  22. 22.
    P. Cousot and R. Cousot. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In Proc. Fourth ACM Symp. Principles of Programming Languages, pages 238–252, 1977.Google Scholar
  23. 23.
    P. Cousot and R. Cousot. Systematic Design of Program Analysis Frameworks. In Proc. Sixth ACM Symp. Principles of Programming Languages, pages 269–282, 1979.Google Scholar
  24. 24.
    P. Cousot and R. Cousot. Abstract Interpretation and Applications to Logic Programs. Journal of Logic Programming, 13(2 & 3):103–179, 1992.CrossRefGoogle Scholar
  25. 25.
    P. Cousot and R. Cousot. Comparing the Galois Connection and Widening/ Narrowing Approaches to Abstract Interpretation. In M. Bruynooghe and M. Wirsing, editors, Proc. of PLILP'92, volume 631 of Lecture Notes in Computer Science, pages 269–295. Springer-Verlag, 1992.Google Scholar
  26. 26.
    P. Cousot and R. Cousot. Higher-order abstract interpretation (and application to comportment analysis generalizing strictness, termination, projection and per analysis of functional languages). In Proceedings of the IEEE International Conference on Computer Languages (ICCL '94), pages 95–112. IEEE Computer Society Press, 1994.Google Scholar
  27. 27.
    E. Eder. Properties of substitutions and unifications. Journal of Symbolic Computation, 1:31–46, 1985.Google Scholar
  28. 28.
    M. Falaschi, G. Levi, M. Martelli, and C. Palamidessi. Declarative Modeling of the Operational Behavior of Logic Languages. Theoretical Computer Science, 69(3):289–318, 1989.CrossRefGoogle Scholar
  29. 29.
    M. Falaschi, G. Levi, M. Martelli, and C. Palamidessi. A Model-Theoretic Reconstruction of the Operational Semantics of Logic Programs. Information and Computation, 102(1):86–113, 1993.Google Scholar
  30. 30.
    G. Ferrand. Error Diagnosis in Logic Programming, an Adaptation of E. Y. Shapiro's Method. Journal of Logic Programming, 4:177–198, 1987.Google Scholar
  31. 31.
    G. Ferrand. The notions of symptom and error in declarative diagnosis of logic programs. In P. A. Fritzson, editor, Automated and Algorithmic Debugging, Proc. AADEBUG '93, volume 749 of Lecture Notes in Computer Science, pages 40–57. Springer-Verlag, 1993.Google Scholar
  32. 32.
    G. Filé, R. Giacobazzi, and F. Ranzato. A unifying view on abstract domain design. ACM Computing Surveys, 28(2):333–336, 1996.Google Scholar
  33. 33.
    G. Filé and F. Ranzato. Improving abstract interpretations by systematic lifting to the powerset. In M. Bruynooghe, editor, Proceedings of the 1994 International Logic Programming Symposium (ILPS '94), pages 655–669. The MIT Press, 1994.Google Scholar
  34. 34.
    R. Giacobazzi, S.K. Debray, and G. Levi. Generalized Semantics and Abstract Interpretation for Constraint Logic Programs. Journal of Logic Programming, 25(3):191–247, 1995.Google Scholar
  35. 35.
    R. Giacobazzi and F. Ranzato. Functional dependencies and Moore-set completions of abstract interpretations and semantics. In J. Lloyd, editor, Proceedings of the 1995 Interantional Symposium on Logic Programming (ILPS '95), pages 321–335. The MIT Press, 1995.Google Scholar
  36. 36.
    R. Giacobazzi and F. Ranzato. Compositional optimization of disjunctive abstract interpretations. In H.R. Nielson, editor, Proc. of the 1996 European Symposium on Programming, volume 1058 of Lecture Notes in Computer Science, pages 141–155. Springer-Verlag, 1996.Google Scholar
  37. 37.
    J. L. Lassez, M. J. Maher, and K. Marriott. Unification Revisited. In J. Minker, editor, Foundations of Deductive Databases and Logic Programming, pages 587–625. Morgan Kaufmann, Los Altos, Ca., 1988.Google Scholar
  38. 38.
    J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2): 133–154, 1987.Google Scholar
  39. 39.
    J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987. Second edition.Google Scholar
  40. 40.
    E. Marchiori. Prime factorizations of abstract domains using first order logic. In M. Hanus and M. Rodriguez-Artalejo, editors, Algebraic and Logic Programming, volume 1139 of Lecture Notes in Computer Science, pages 209–223. Springer-Verlag, 1996.Google Scholar
  41. 41.
    K. Marriott and H. Søndergaard. Precise and efficient groundness analysis for logic programs. ACM Letters on Programming Languages and Systems, 2(1–4): 181–196, 1993.Google Scholar
  42. 42.
    L. Naish. Declarative diagnosis of missing answers. New Generation Computing, 10:255–285, 1991.Google Scholar
  43. 43.
    L. M. Pereira. Rational debugging in logic programming. In E. Y. Shapiro, editor, Proceedings of the 3rd International Conference on Logic Programming, volume 225 of Lecture Notes in Computer Science, pages 203–210. Springer-Verlag, 1986.Google Scholar
  44. 44.
    T. Sato and H. Tamaki. Enumeration of Success Patterns in Logic Programs. Theoretical Computer Science, 34:227–240, 1984.Google Scholar
  45. 45.
    E. Y. Shapiro. Algorithmic program debugging. In Proc. Ninth Annual ACM Symp. on Principles of Programming Languages, pages 412–531. ACM Press, 1982.Google Scholar
  46. 46.
    L. Sterling and E. Y. Shapiro. The Art of Prolog. The MIT Press, 1986.Google Scholar
  47. 47.
    M. H. van Emden and R. A. Kowalski. The semantics of predicate logic as a programming language. Journal of the ACM, 23(4):733–742, 1976.CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Marco Comini
    • 1
  • Giorgio Levi
    • 1
  • Maria Chiara Meo
    • 2
  • Giuliana Vitiello
    • 3
  1. 1.Dipartimento di InformaticaUniversità di PisaPisaItaly
  2. 2.Dipartimento di Matematica Pura ed ApplicataUniversità di L'AquilaL'AquilaItaly
  3. 3.Dipartimento di Informatica ed ApplicazioniUniversità di SalernoBaronissiItaly

Personalised recommendations