Skip to main content
Log in

Using Static Analysis to Reduce Dynamic Analysis Overhead

  • Published:
Formal Methods in System Design Aims and scope Submit manuscript

Abstract

Dynamic analysis (instrumenting programs with code to detect and prevent errors during program execution) can be an effective approach to debugging, as well as preventing harm from being caused by malicious code. One problem with this approach is the runtime overhead introduced by the instrumentation. We define several techniques that involve using the results of static analysis to identify some cases where instrumentation can safely be removed. While we have designed the techniques with a specific dynamic analysis in mind (that used by the Runtime Type-Checking tool), the ideas may be of more general applicability.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. L.O. Andersen, “Program Analysis and Specialization for the C Programming Language,” Ph D thesis, DIKU,University of Copenhagen, May 1994. (DIKU report 94/19).

  2. T. Austin, S. Breach, and G. Sohi, “Efficient detection of all pointer and array access errors,” in ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '94), SIGPLAN Notices29(6), Orlando, FL, June 1994, pp. 290–301.

  3. N. Suzuki and K. Ishihata, “Implementation of an array bound checker,” in ACM Symposium on Principles of Programming Languages, Los Angeles, CA, Jan. 1977, pp. 132–143.

  4. V. Markstein, J. Cocke, and P. Markstein, “Optimization of range checking,” in ACM SIGPLANSymposium on Compiler Construction, SIGPLAN Notices, Boston, MA, June 1982, Vol. 17, No. 6, pp. 114–119.

    Google Scholar 

  5. Ckit. http://cm.bell-labs.com/cm/cs/what/smlnj/doc/ckit/.

  6. M. Das, “Unification-based pointer analysis with directional assignments,” in ACM SIGPLANConference on Programming Language Design and Implementation (PLDI '00), SIGPLAN NoticesVancouver, BC, June 2000, Vol. 35, No. 5, pp. 35–46.

    Google Scholar 

  7. R. Gupta, “Optimizing array bound checks using flow analysis,” ACM Letters on Programming Languagesand Systems, Vol. 2, Nos. 1–4, pp. 135–150, 1993.

    Google Scholar 

  8. R. Hasting and B. Joyce, “Purify: Fast detection of memory leaks and access errors,” in Proceedings of the Winter Usenix Conference, 1992.

  9. F. Henglein, “Global tagging optimization by type inference,” in LISP and Functional Programming, 1992, pp. 205–215.

  10. T. Jim, G. Morrisett, D. Grossman, M. Hicks, J. Cheney, and Y. Wang, “Cyclone: A safe dialect of C,” in USENIX Annual Technical Conference, Monterey, CA, June 2002.

  11. A. Loginov, S. Yong, S. Horwitz, and T. Reps, “Debugging via run-time type checking,” in Fundamental Approaches to Software Engineering (FASE), volume 2029 of Lec. Notes in Comp. Sci., Springer, Apr. 2001, pp. 217–232.

    Google Scholar 

  12. R. Bodik, R. Gupta, and V. Sarkar, “ABCD: Eliminating array bounds checks on demand,” in ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '00), SIGPLAN Notices, Vancouver, BC, Vol. 35, No. 5, pp. 321–333, June, 2000.

    Google Scholar 

  13. W.-N. Chin, S.-C. Khoo, and D.N. Xu, “Deriving pre-conditions for array bound check elimination,” in Proceedings of the Second Symposium on Programs as Data Objects, PADO 2001, Aarhus, Denmark, May2001, pp. 2–24.

  14. G. Necula, S. McPeak, and W. Weimer, “CCured: Type-safe retrofitting of legacy code,” in ACMSymposium on Principles of Programming Languages, Portland, OR, Jan. 2002.

  15. Parasoft. Insure++: An automatic runtime error detection tool, 2001. http://www.parasoft.com/insure/papers/tech.htm.

  16. H. Patil and C. Fischer, “Low-cost, concurrent checking of pointer and array accesses in C programs,” Software-Practice and Experience, Vol. 27, No. 27, pp. 87–110, 1997.

    Google Scholar 

  17. J. Seward, “The design and implementation of Valgrind,” Technical report, http://developer.kde.org/~sewardj/, 2000.

  18. M. Siff, S. Chandra, T. Ball, K. Kunchithapadam, and T. Reps, “Coping with type casts in C,” in Proc. of ESEC/FSE '99: Seventh European Softw. Eng. Conf. and Seventh ACM SIGSOFT Symp. on the Found, of Softw. Eng., Sept. 1999, pp. 180–198.

  19. R. Stallman and R. Pesch. Using GDB: A Guide to the GNU Source-Level Debugger, July 1991.

  20. B. Steensgaard, “Points-to analysis in almost linear time,” in ACM Symposium on Principles of Programming Languages, 1996, pp. 32–41.

  21. M. Lujan, J.R,. Gurd, T.L. Freeman, and J. Miguel, “Elimination of Java array bounds checks in thepresence of indirection,” Technical Report CSPP-13, Department of Computer Science, University of Manchester, Feb. 2002.

  22. S. Yong, S. Horwitz, and T. Reps, “Pointer analysis for programs with structures and casting,” in ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '90), SIGPLAN NoticesAtlanta, GA, May 1999, Vol. 25, No. 6, pp. 91–103.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Suan Hsi Yong.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Yong, S.H., Horwitz, S. Using Static Analysis to Reduce Dynamic Analysis Overhead. Form Method Syst Des 27, 313–334 (2005). https://doi.org/10.1007/s10703-005-3401-0

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10703-005-3401-0

Keywords

Navigation