Immediacy through Interactivity: Online Analysis of Run-time Behavior

Visualizations of actual run-time data support the comprehension of programs, like examples support the explanation of abstract concepts and principles. Unfortunately, the required run-time analysis is often associated with an inconvenient overhead that renders current tools impractical for frequent use.

We propose an interactive approach to collect and present run-time data. An initial shallow analysis provides for immediate access to visualizations of run-time information. As users explore this information, it is incrementally refined on-demand. Pathfinder is our implementation that realizes our proposed approach and enables developers to instantly explore run-time behavior of selected code entities. We evaluate our interactive approach by measuring time and memory overhead in the context of ten different-sized projects. Our empirical results show that run-time data for an initial overview can be collected in less than 300 milliseconds for 95% of cases.


The following figure illustrates our Pathfinder tool and how it helps to better understand program behavior of the observer pattern (Example taken from Gamma, Helm, Johnson, Vlissides - Design Patterns. Elements of Reusable Object-Oriented Software). The example is also available as podcast (1.7 MB).

The visualized information primarily consists of a call tree that reflects a particular run of the application. Some of the tree nodes have been expanded to reveal details. The following details correspond to the indices in the figure.

  1. The tick method invokes the notify method meaning that the state must change in tick.
  2. Notify sends the update: message to two different clock observers.
  3. The object explorer view confirms that the observers list contains two clock objects.
  4. Moreover, it is highlighted that a ClockTimer participates as the subject in the observer pattern.
  5. Attach: is responsible for registering observers.
  6. In an expanded attach: invocation the combined before and after views of a method node execution show how a ClockTimer registers a DigitalClock observer.
  7. The state of the subject changes after a tick execution.



The data of our empirical evaluation can be found here.