Specification-based automatic verification of Prolog programs

  • Agostino Cortesi
  • Baudouin Le Charlier
  • Sabina Rossi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1207)


The paper presents an analyzer for verifying the correctness of a Prolog program relative to a specification which provides a list of input/output annotations for the arguments and parameters that can be used to establish program termination. The work stems from Deville's methodology to derive Prolog programs that correctly implement their declarative meaning. In this context, we propose an algorithm that combines, adapts, and sometimes improves various existing static analyses in order to verify total correctness of Prolog programs with respect to formal specifications. Using the information computed during the verification process, an automatic complexity analysis can be also performed.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    A. Bossi, N. Cocco, and M. Fabris. Norms on Terms and Their Use in Proving Universal Termination of a Logic Program, Theoretical Computer Science, 124:297–328, 1994.Google Scholar
  2. 2.
    C. Braem, B. Le Charlier, S. Modart, and P. Van Hentenryck. Cardinality Analysis of Prolog. In Proc. Int'l Logic Programming Symposium, (ILPS'94), Ithaca, NY. The MIT Press, Cambridge, Mass., 1994.Google Scholar
  3. 3.
    K.L. Clark. Negation as Failure. In H. Gallaire and J. Minker editors, Advances in Data Base Theory, Plenum Press, New York, pp. 293–322, 1978.Google Scholar
  4. 4.
    J. Cohen and J. Katcoff. Symbolic solution of finite-difference equations. ACM Transactions on Mathematical Software, 3(3):261–271, 1977.Google Scholar
  5. 5.
    A. Cortesi, B. Le Charlier and P. van Hentenryck, Conceptual and Software Support for Abstract Domain Design: Generic Structural Domain and Open Product. Technical Report CS-93-13, Brown University, 1993.Google Scholar
  6. 6.
    A. Cortesi, B. Le Charlier and P. van Hentenryck, Combinations of Abstract. Domains for Logic Programming, In Proc. 21th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'94), ACM-Press, New York, pp. 227–239, 1994.Google Scholar
  7. 7.
    P. De Boeck and B. Le Charlier. Static Type Analysis of Prolog Procedures for Ensuring Correctness. In P. Deransart and J. Maluszyński, editors, Proc. Second Int'l Symposium on Programming Language Implementation and Logic Programming, (PLILP'90), LNCS 456, Springer-Verlag, Berlin, 1990.Google Scholar
  8. 8.
    P. De Boeck and B. Le Charlier. Mechanical Transformation of Logic Definitions Augmented with Type Information into Prolog Procedures: Some Experiments. In Proc. Int'l Workshop on Logic Program Synthesis and Transformation, (LOPSTR'93). Springer Verlag, July 1993.Google Scholar
  9. 9.
    S. K. Debray and N. W. Lin. Cost analysis of logic programs. ACM Transactions on Programming Languages and Systems, 15(5):826–875, 1993.CrossRefGoogle Scholar
  10. 10.
    D. De Schreye, K. Verschaetse, and M. Bruynooghe. A Framework for analyzing the termination of definite logic programs with respect to call patterns. In H. Tanaka, editor, FGCS'92, 1992.Google Scholar
  11. 11.
    Y. Deville. Logic Programming: Systematic Program Development. Addison-Wesley, 1990.Google Scholar
  12. 12.
    J. Henrard and B. Le Charlier. FOLON: An Environment for Declarative Construction of Logic Programs (extended abstract). In M. Bruynooghe and M. Wirsing, editors, Proc. Fourth Int'l Workshop on Programming Language Implementation and Logic Programming (PLILP'92), LNCS 631 Springer-Verlag, pp. 237–231, 1992.Google Scholar
  13. 13.
    J. Ivie. Some MACSYMA programs for solving recurrence relations. ACM Transactions on Mathematical Software, 4(1):24–33, 1978.Google Scholar
  14. 14.
    B. Le Charlier, and S. Rossi. Automatic Derivation of Totally Correct Prolog Procedures from Logic Descriptions. Research Report RP-95-009, University of Namur.Google Scholar
  15. 15.
    B. Le Charlier, S. Rossi, and P. Van Hentenryck. An Abstract Interpretation Framework which Accurately Handles Prolog Search-Rule and the Cut. In Proc. Int. Logic Programming Symposium, (ILPS'94), Ithaca, NY. The MIT Press, Cambridge, Mass., 1994.Google Scholar
  16. 16.
    B. Le Charlier and P. Van Hentenryck. Experimental evaluation of a generic abstract interpretation algorithm for Prolog. ACM Transactions on Programming Languages and Systems, 16(1), pp. 35–101, 1994.CrossRefGoogle Scholar
  17. 17.
    C. Leclère and B. Le Charlier. Two Dual Abstract Operations to Duplicate, Eliminate, Equalize, Introduce and Rename Place-Holders Occurring Inside Abstract Descriptions. Research Paper N. RP-96-028, University of Namur, Belgium, September 1996.Google Scholar
  18. 18.
    J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, 1987. Second edition.Google Scholar
  19. 19.
    P. van Hentenryck, A. Cortesi, and B. Le Charlier, Evaluation of the Domain Prop. The Journal of Logic Programming 23(3):237–278, 1995.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Agostino Cortesi
    • 1
  • Baudouin Le Charlier
    • 2
  • Sabina Rossi
    • 3
  1. 1.Dipartimento di Matematica e InformaticaVeneziaItaly
  2. 2.Institut d'InformatiqueNamurBelgium
  3. 3.Dipartimento di MatematicaPadovaItaly

Personalised recommendations