QOCA - Visualizating Object Oriented Program Execution
QOCA is a system developed for displaying execution of object oriented programs. The difficulty in displaying the dynamics of programs is the large number of objects and messages that are involved. QOCA uses visualization to provide users with different views of this information.
Views
QOCA provides a number of views visualizing the communication of objects during execution. Each of these views is dynamic, changing as the program executes. Additionally, more detail is available in each view by clicking on the desired classes or communications.
- Allocation Matrix. The allocation matrix is a graph of classes vs. the classes they instantiate. Color is used to show the frequency of this allocation. This view thus reveals the dependencies between classes.
- Histogram of Instances This view shows instances grouped by class. Color is used to indicate the level of activity of each instance. Instances appear when first instanstiated and disappear when destroyed. Thus a large number of instances could reveal a memory leak.
- Inter-Class Call Cluster The inter-class call cluster view positions objects according to the frequency they interact. Thus two classes that call
each other often will be pulled together whereas two classes that do not communicate repel each other. Color indicates the overall activity of each class. Clustered classes are likely to be part of the same subsystem and thus more tightly coupled. Lines connect the classes of the currently executing call path, thus enabling a user to dynamically view the execution.
- Inter-Class Call Matrix This view provides an overview of the communication between classes. The matrix plots which classes call which other classes. Classes are arranged along both axes in the order they are instantiated. The color of the dots indicate the frequency of that communication.
- Time Bar Chart The time bar chart shows CPU time usage per class. The classes are written in the order in which they are instantiated, with a bar plotting the amount of CPU time spent thus far in the class.
Examples
The above views could help a developer understand how an object oriented program is working. It could also help in finding problems. For example, say in the histrogram of instances it is noticed that large number of instances of a certain class are being instantiated, are active for a short time, and then remain inactive for the remainder of the execution. This could indicate a memory leak. Looking at the allocation matrix might help decide where these classes are being instantiated. The inter-class call matrix could then help a developer find what objects are calling the classes doing the allocating. This might help to find certain classes or methods that should be responsible for deleting these instances but aren't.