Report ID
1999-27
Report Authors
Raimondas Lencevicius
Report Date
Abstract
Object relationships in modern software systems are becoming increasinglynumerous and complex. Program errors due to violations of object relationshipsare hard to find because of the cause-effect gap between the time when an erroroccurs and the time when the error becomes apparent to the programmer.Although debugging techniques such as conditional and data breakpoints help tofind error causes in simple cases, they fail to effectively bridge thecause-effect gap in many situations. Programmers need new tools that allowthem to explore objects in a large system more efficiently and to detect brokenobject relationships instantaneously. Many existing debuggers present only alow-level, one-object-at-a-time view of objects and their relationships.We propose a new solution to overcome these problems: query-based debugging.The implementation of the query-based debugger described here offersprogrammers an effective query tool that allows efficient searching of largeobject spaces and quick verification of complex relationships. Even forprograms that have large numbers of objects, the debugger achieves interactiveresponse times for common queries by using a combination of fast searchingprimitives, query optimization, and incremental result delivery. Dynamicquery-based debuggers extend query-based debugging by providing instant erroralerts. In other words, they continuously check inter-object relationshipswhile the debugged program is running. To speed up dynamic query evaluation,our debugger (implemented in portable Java) uses a combination of programinstrumentation, load-time code generation, query optimization, and incrementalreevaluation. Experiments and a query cost model show that selection queriesare efficient in most cases, while more costly join queries are practical whenquery evaluations are infrequent or query domains are small. We thusdemonstrate that query-based debugging is a useful method that can beefficiently implemented and effectively used in program debugging.
Document
1999-27.ps1.11 MB