Preserving the Mental Map when Visualizing Dynamic Graphs : An Approach for Intermediate Representations in the C2 Java Compiler

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: Graphs are powerful data structures that are widely used to represent complex forms of information. One area in which graphs are successfully being used is within compiler engineering, where a program under compilation can be represented as a graph that changes as the program is being compiled. These graphs, known as Intermediate Representation graphs, can be visualized to aid compiler engineers in understanding and debugging the compiler. However, graphs that change over time need to be visualized so that the viewer’s internal understanding of the graph is maintained. Simultaneously, the graph layouts should be of high quality. These criteria can be conflicting, making the visualization of changing graphs difficult. In this thesis, a dynamic graph layout algorithm to visualize dynamic Intermediate Representation graphs used in the C2 compiler in the Java HotSpotTM Virtual Machine was developed and evaluated. Currently, these graphs are visualized with hierarchical layouts, using a static graph layout algorithm. Five metrics were developed and used to evaluate the layouts by the dynamic algorithm against the layouts by the static algorithm. Four of these were concerned with the layout quality, by measuring the number of edge crossings, number of reversed edges, average degree of the edge bends and the average edge length. The fifth metric was related to mental map preservation and measures the Euclidean distance of node displacement across two layouts. Two experiments were conducted to compare the algorithms. The first experiment measured the layouts drawn by the algorithms when there were a couple of nodes added to or removed from a graph iteratively. A total of 1061 layouts were measured. In 74% of these, the dynamic algorithm caused less node displacement. The second experiment aimed to evaluate the algorithms against what is possible to achieve in regards of minimum node displacement while maintaining a high quality. The results of both experiments indicate that the dynamic layout algorithm yields layouts with less node displacement. However, the layouts generally have more reversed edges, more bends in the edges and overall longer edges. These metrics worsened as more iterations of changes were applied. The findings suggest that the dynamic layout algorithm is better at preserving the mental map, but at the cost of the layout quality.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)