Automated Software Engineering

, Volume 10, Issue 1, pp 39–74

Dynamic Query-Based Debugging of Object-Oriented Programs

  • Raimondas Lencevicius
  • Urs Hölzle
  • Ambuj K. Singh

DOI: 10.1023/A:1021816917888

Cite this article as:
Lencevicius, R., Hölzle, U. & Singh, A.K. Automated Software Engineering (2003) 10: 39. doi:10.1023/A:1021816917888


Program errors are hard to find because of the cause-effect gap between the instant when an error occurs and when the error becomes apparent to the programmer. Although debugging techniques such as conditional and data breakpoints help in finding errors in simple cases, they fail to effectively bridge the cause-effect gap in many situations. This paper proposes two debuggers that provide programmers with an instant error alert by continuously checking inter-object relationships while the debugged program is running. We call such tool a dynamic query-based debugger. To speed up dynamic query evaluation, our debugger implemented in portable Java uses a combination of program instrumentation, load-time code generation, query optimization, and incremental reevaluation. Experiments and a query cost model show that selection queries are efficient in most cases, while more costly join queries are practical when query evaluations are infrequent or query domains are small. To enable query-based debugging in the middle of program execution in a portable way, our debugger performs efficient Java class file instrumentation. We call such debugger an on-the-fly debugger. Though the on-the-fly debugger has a higher overhead than a dynamic query-based debugger, it offers additional interactive power and flexibility while maintaining complete portability.

object-oriented software development debugging query optimization run-time tools 

Copyright information

© Kluwer Academic Publishers 2003

Authors and Affiliations

  • Raimondas Lencevicius
    • 1
  • Urs Hölzle
    • 2
  • Ambuj K. Singh
    • 3
  1. 1.Nokia Research CenterBurlingtonUSA
  2. 2.Google IncMountain ViewUSA
  3. 3.Department of Computer ScienceUniversity of CaliforniaSanta BarbaraUSA