Next: Coherent Printing Up: The Concert Debugger Users Previous: The Concert Interpreter

Abstraction-Based Debugging

Abstraction based debugging is an experimental feature provided The Concert Debugger . The idea is that object oriented programs often contain one or more collections of objects that co-operate to provide some functionality through a well defined interface. A distributed priority queue implemented with an aggregate is a stock example of this notion; such groups of objects are called abstractions.

Localizing program errors is the name of the game in debugging, and abstraction provide an attractive, high-level way to do this. The correctness of an abstraction can be determined simply by observing the requests that come across its interface, and its responses to those requests. If an abstraction gives exclusively correct answers to requests, it is not the cause of whatever bug is being tracked; if it provides wrong answers, there must be a problem within the abstraction. Thus, if a program abstraction can be instrumented to display all its requests, paired with the responses to them, a bug can be quickly localized to inside or outside that abstraction.

The Concert Debugger provides such instrumentation with the concert abstraction family of commands; these provide the ability to define the interface to an abstraction, and observe the requests across that interface. It is not necessary to specify the entire abstraction; just the interface is enough to allow the debugger to monitor the abstraction. The following commands are available.

abstraction new
creates a new abstraction monitor. It must be given an expression which it evaluates; if this expression is an object or aggregate name, it creates an abstraction monitor using those objects as the interface.
abstraction add
adds a given object to a pre-existing abstraction monitor. The format is <number> <expression>, where the number is the id of the abstraction monitor to be expanded and the expression evaluates to an object name.

An example abstraction based debugging session is shown below. To make clear what monitoring the interface means, the source code for the buffer class is also show. Note how only interface methods are shown in the abstraction request trace, so isfull is not shown since it is used internally; also, while the reply to the request comes from a different object, abstraction monitoring finds it anyway. Further note that the numbers on the left side of the transcript are program output, not abstraction debugging messages.



Next: Coherent Printing Up: The Concert Debugger Users Previous: The Concert Interpreter


Julian Dolby
Concurrent Systems Architecture Group