Skip to main content

Combined Static and Dynamic Assertion-Based Debugging of Constraint Logic Programs

  • Conference paper
Logic-Based Program Synthesis and Transformation (LOPSTR 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1817))

Abstract

We propose a general framework for assertion-based debugging of constraint logic programs. Assertions are linguistic constructions for expressing properties of programs. We define several assertion schemas for writing (partial) specifications for constraint logic programs using quite general properties, including user-defined programs. The framework is aimed at detecting deviations of the program behavior (symptoms) with respect to the given assertions, either at compile-time (i.e., statically) or run-time (i.e., dynamically). We provide techniques for using information from global analysis both to detect at compile-time assertions which do not hold in at least one of the possible executions (i.e., static symptoms) and assertions which hold for all possible executions (i.e., statically proved assertions). We also provide program transformations which introduce tests in the program for checking at run-time those assertions whose status cannot be determined at compile-time. Both the static and the dynamic checking are provably safe in the sense that all errors flagged are definite violations of the specifications. Finally, we report briefly on the currently implemented instances of the generic framework.

This work has been supported in part by projects ESPRIT LTR #22532 DiSCiPl and CICYT TIC99-1151 EDIPIA. The authors would also like to thank Jan Małuszyński, Wlodek Drabent and Pierre Deransart for many interesting discussions on assertions.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Apt, K.R., Marchiori, E.: Reasoning about Prolog programs: from modes through types to assertions. Formal Aspects of Computing 6(6), 743–765 (1994)

    Article  MATH  Google Scholar 

  2. Apt, K.R., Pedreschi, D.: Reasoning about termination of pure PROLOG programs. Information and Computation 1(106), 109–157 (1993)

    Article  MathSciNet  Google Scholar 

  3. Boye, J., Drabent, W., Małuszyński, J.: Declarative diagnosis of constraint programs: an assertion-based approach. In: Proc. of the 3rd. Int’l Workshop on Automated Debugging–AADEBUG 1997, Linköping, Sweden, pp. 123–141. U. of Linköping Press (1997)

    Google Scholar 

  4. Bueno, F., Cabeza, D., Carro, M., Hermenegildo, M., López-García, P., Puebla, G.: The Ciao Prolog System. Reference Manual. The Ciao System Documentation Series–TR CLIP3/97.1, School of Computer Science, Technical University of Madrid (UPM) (August 1997)

    Google Scholar 

  5. Bueno, F., Cabeza, D., Hermenegildo, M., Puebla, G.: Global Analysis of Standard Prolog Programs. In: Riis Nielson, H. (ed.) ESOP 1996. LNCS, vol. 1058, pp. 108–124. Springer, Heidelberg (1996)

    Google Scholar 

  6. Bueno, F., Deransart, P., Drabent, W., Ferrand, G., Hermenegildo, M., Maluszynski, J., Puebla, G.: On the Role of Semantic Approximations in Validation and Diagnosis of Constraint Logic Programs. In: Proc. of the 3rd. Int’l Workshop on Automated Debugging–AADEBUG 1997, Linköping, Sweden, May 1997, pp. 155–170. U. of Linköping Press (1997)

    Google Scholar 

  7. Le Charlier, B., Van Hentenryck, P.: Experimental Evaluation of a Generic Abstract Interpretation Algorithm for Prolog. ACM Transactions on Programming Languages and Systems 16(1), 35–101 (1994)

    Article  Google Scholar 

  8. Comini, M., Levi, G., Meo, M.C., Vitiello, G.: Proving properties of logic programs by abstract diagnosis. In: Dam, M. (ed.) LOMAPS-WS 1996. LNCS, vol. 1192, pp. 22–50. Springer, Heidelberg (1997)

    Google Scholar 

  9. Comini, M., Levi, G., Vitiello, G.: Abstract debugging of logic programs. In: Fribourg, L., Turini, F. (eds.) LOPSTR 1994 and META 1994. LNCS, vol. 883, pp. 440–450. Springer, Heidelberg (1994)

    Google Scholar 

  10. Cousot, P., Cousot, R.: Abstract Interpretation: a Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In: Fourth ACM Symposium on Principles of Programming Languages, pp. 238–252 (1977)

    Google Scholar 

  11. Deransart, P.: Proof methods of declarative properties of definite programs. Theoretical Computer Science 118, 99–166 (1993)

    Article  MATH  MathSciNet  Google Scholar 

  12. Deransart, P., Hermenegildo, M., Maluszynski, J.: Debugging of Constraint Programs: The DiSCiPl Approach. In: Deransart, P., Hermenegildo, M., Maluszynski, J. (eds.) Analysis and Visualization Tools for Constraint Programming. Springer, Heidelberg (2000) (to appear)

    Chapter  Google Scholar 

  13. Drabent, W., Nadjm-Tehrani, S., Małuszyński, J.: The Use of Assertions in Algorithmic Debugging. In: Proceedings of the Intl. Conf. on Fifth Generation Computer Systems, pp. 573–581 (1988)

    Google Scholar 

  14. Drabent, W., Nadjm-Tehrani, S., Maluszynski, J.: Algorithmic debugging with assertions. In: Abramson, H., Rogers, M.H. (eds.) Meta-programming in Logic Programming, pp. 501–522. MIT Press, Cambridge (1989)

    Google Scholar 

  15. Ferrand, G.: Error diagnosis in logic programming. J. Logic Programming 4, 177–198 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  16. Gallagher, J.P., de Waal, D.A.: Fast and precise regular approximations of logic programs. In: Van Hentenryck, P. (ed.) Proc. of the 11th International Conference on Logic Programming, pp. 599–613. MIT Press, Cambridge (1994)

    Google Scholar 

  17. García de la Banda, M., Hermenegildo, M., Bruynooghe, M., Dumortier, V., Janssens, G., Simoens, W.: Global Analysis of Constraint Logic Programs. ACM Transactions on Programming Languages and Systems 18(5), 564–615 (1996)

    Article  Google Scholar 

  18. Hermenegildo, M.: A Documentation Generator for Logic Programming Systems. In: ICLP 1999 Workshop on Logic Programming Environments, N.M. State University, December 1999, pp. 80–97 (1999)

    Google Scholar 

  19. Hermenegildo, M., Bueno, F., Puebla, G., López-García, P.: Program Analysis, Debugging and Optimization Using the Ciao System Preprocessor. In: 1999 International Conference on Logic Programming, November 1999, pp. 52–66. MIT Press, Cambridge (1999)

    Google Scholar 

  20. Hermenegildo, M.: The CLIP Group. Programming with Global Analysis. In: Proceedings of ILPS 1997, Cambridge, MA, pp. 49–52. MIT Press, Cambridge (1997)

    Google Scholar 

  21. Hermenegildo, M., Puebla, G., Bueno, F.: Using Global Analysis, Partial Speci fications, and an Extensible Assertion Language for Program Validation and Debugging. In: Apt, K.R., Marek, V., Truszczynski, M., Warren, D.S. (eds.) The Logic Programming Paradigm: a 25 –Year Perspective, pp. 161–192. Springer, Heidelberg (1999)

    Google Scholar 

  22. Hill, P., Lloyd, J.: The Goedel Programming Language. MIT Press, Cambridge (1994)

    MATH  Google Scholar 

  23. Jaffar, J., Maher, M.J.: Constraint Logic Programming: A Survey. Journal of Logic Programming 19/20, 503–581 (1994)

    Article  MathSciNet  Google Scholar 

  24. Le Métayer, D.: Proving properties of programs defined over recursive data structures. In: ACM Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 88–99 (1995)

    Google Scholar 

  25. Muthukumar, K., Hermenegildo, M.: Compile-time Derivation of Variable Dependency Using Abstract Interpretation. Journal of Logic Programming 13(2/3), 315–347 (1992)

    Article  MATH  Google Scholar 

  26. Puebla, G., Bueno, F., Hermenegildo, M.: A Generic Preprocessor for Program Validation and Debugging. In: Deransart, P., Hermenegildo, M., Maluszynski, J. (eds.) Analysis and Visualization Tools for Constraint Programming, Springer, Heidelberg (2000) (to appear)

    Google Scholar 

  27. Puebla, G., Bueno, F., Hermenegildo, M.: An Assertion Language for Debugging of Constraint Logic Programs. In: Deransart, P., Hermenegildo, M., Maluszynski, J. (eds.) Analysis and Visualization Tools for Constraint Programming, Springer. Heidelberg (2000) (to appear)

    Google Scholar 

  28. Puebla, G., Hermenegildo, M.: Abstract Multiple Specialization and its Application to Program Parallelization. J. of Logic Programming. Special Issue on Synthesis, Transformation and Analysis of Logic Programs 41(2&3), 279–316 (1999)

    MATH  MathSciNet  Google Scholar 

  29. Somogyi, Z., Henderson, F., Conway, T.: The execution algorithm of Mercury: an efficient purely declarative logic programming language. JLP 29(1–3) (October 1996)

    Google Scholar 

  30. Vetillard, E.: Utilisation de Declarations en Programmation Logique avec Constraintes. PhD thesis, U. of Aix-Marseilles II (1994)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Puebla, G., Bueno, F., Hermenegildo, M. (2000). Combined Static and Dynamic Assertion-Based Debugging of Constraint Logic Programs. In: Bossi, A. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 1999. Lecture Notes in Computer Science, vol 1817. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10720327_16

Download citation

  • DOI: https://doi.org/10.1007/10720327_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67628-7

  • Online ISBN: 978-3-540-45148-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics