Assertion-based debugging of imperative programs by abstract interpretation | SpringerLink
Skip to main content

Assertion-based debugging of imperative programs by abstract interpretation

  • Conference paper
  • First Online:
Software Engineering — ESEC '93 (ESEC 1993)

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

Included in the following conference series:

Abstract

Abstract interpretation is a formal method that enables the static determination (i.e. at compile-time) of the dynamic properties (i.e. at run-time) of programs. So far, this method has mainly been used to build sophisticated, optimizing compilers. In this paper, we show how abstract interpretation techniques can be used to perform, prior to their execution, a static and automatic debugging of imperative programs. This novel approach, which we call abstract debugging, lets programmers use assertions to express invariance properties as well as inevitable properties of programs, such as termination. We show how such assertions can be used to find the origin of bugs, rather than their occurrences, and determine necessary conditions of program correctness, that is, necessary conditions for programs to be bug-free and correct with respect to the programmer's assertions. We also show that assertions can be used to restrict the control-flow of a program and examine its behavior along specific execution paths and find necessary conditions for the program to reach a particular point in a given state. Finally, we present the Syntox system that enables the abstract debugging of Pascal programs by the determination of the range of scalar variables, and discuss implementation, algorithmic and complexity issues.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman: “Compilers — Principles, Techniques and Tools”, Addison-Wesley Publishing Company (1986)

    Google Scholar 

  2. François Bourdoncle: “Interprocedural Abstract Interpretation of Block Structured Languages with Nested Procedures, Aliasing and Recursivity”, Proc. of the International Workshop PULP'90, Lecture Notes in Computer Science 456, Springer-Verlag (1990)

    Google Scholar 

  3. François Bourdoncle: “Abstract Interpretation By Dynamic Partitioning”, Journal of Functional Programming, Vol. 2, No. 4 (1992)

    Google Scholar 

  4. François Bourdoncle: “Sémantiques des langages impératifs d'ordre supérieur et interprétation abstraite”, Ph. D. dissertation, Ecole Polytechnique (1992)

    Google Scholar 

  5. François Bourdoncle: “Efficient Chaotic Iteration Strategies with Widenings”, Proc. of the International Conf. on Formal Methods in Programming and their Applications, Lecture Notes in Computer Science, Springer-Verlag (1993) to appear

    Google Scholar 

  6. François Bourdoncle: “Abstract Debugging of Higher-Order Imperative Languages”, Proc. of SIGPLAN '93 Conference on Programming Language Design and Implementation (1993)

    Google Scholar 

  7. Patrick and Radhia Cousot: “Abstract Interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints”, Proc. of the 4th ACM Symp. on POPL (1977) 238–252

    Google Scholar 

  8. Patrick Cousot: “Asynchronous iterative methods for solving a fixpoint system of monotone equations”, Research Report IMAG-RR-88, Université Scientifique et Médicale de Grenoble (1977)

    Google Scholar 

  9. Patrick Cousot and Nicolas Halbwachs: “Automatic discovery of linear constraints among variables of a program”, Proc. of the 5th ACM Symp. on POPL (1978) 84–97

    Google Scholar 

  10. Patrick Cousot: “Méthodes itératives de construction et d'approximation de points fixes d'opérateurs monotones sur un treillis. Analyse sémantique de programmes”, Ph. D. dissertation, Université Scientifique et Médicale de Grenoble (1978)

    Google Scholar 

  11. Patrick and Radhia Cousot: “Static determination of dynamic properties of recursive procedures”, Formal Description of Programming Concepts, North Holland Publishing Company (1978) 237–277

    Google Scholar 

  12. Patrick Cousot: “Semantic foundations of program analysis”, in Muchnick and Jones-Eds., Program Flow Analysis, Theory and Applications, Prentice-Hall (1981) 303–343

    Google Scholar 

  13. Alain Deutsch: “On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications”, Proc. of the 17th ACM Symp. on POPL (1990)

    Google Scholar 

  14. Alain Deutsch: “A Storeless Model of Aliasing and its Abstractions using Finite Representations of Right-Regular Equivalence Relations”, Proc. of the IEEE'92 International Conference on Computer Languages, IEEE Press (1992)

    Google Scholar 

  15. Philippe Granger: “Static analysis of arithmetical congruences”, International Journal of Computer Mathematics (1989) 165–190

    Google Scholar 

  16. Rajiv Gupta: “A Fresh Look at Optimizing Array Bound Checking”, Proc. of SIG-PLAN '90 Conf. on Programming Language Design and Implementation (1990) 272–282

    Google Scholar 

  17. Victoria Markstein, John Cocke and Peter Markstein: “Optimization of Range Checking”, Proc. of the SIGPLAN'82 Symp. on Compiler Construction (1982) 114–119

    Google Scholar 

  18. ISO/IEC 7185: “Information technology — Programming languages — Pascal”, Revised 1983, Second edition (1990)

    Google Scholar 

  19. Micha Sharir and Amir Pnueli: “Two Approaches to Interprocedural Data Flow Analysis” in Muchnick and Jones Eds., Program Flow Analysis, Theory and Applications, Prentice-Hall (1981) 189–233

    Google Scholar 

  20. R.E. Tarjan: “Depth-first search and linear graph algorithms”, SIAM J. Comput., 1 (1972) 146–160

    Google Scholar 

  21. Andrew P. Tolmach and Andrew W. Appel: “Debugging Standard ML Without Reverse Engineering”, Proc. 1990 ACM Conf. on Lisp and Functional Programming, ACM Press (1990) 1–12

    Google Scholar 

  22. Niklaus Wirth and Kathleen Jensen: “Pascal user manual and report” (Second Ed.), Springer-Verlag (1978)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Ian Sommerville Manfred Paul

Rights and permissions

Reprints and permissions

Copyright information

© 1993 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bourdoncle, F. (1993). Assertion-based debugging of imperative programs by abstract interpretation. In: Sommerville, I., Paul, M. (eds) Software Engineering — ESEC '93. ESEC 1993. Lecture Notes in Computer Science, vol 717. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57209-0_33

Download citation

  • DOI: https://doi.org/10.1007/3-540-57209-0_33

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-57209-1

  • Online ISBN: 978-3-540-47972-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics