230 likes | 256 Vues
Software Visualization. Visualization. “A picture is worth 1000 words” Effective visualization can help with the understanding of complex structures The key word is “effective”. Compare this with…. useproc dslvrg.pl9 dsmdlv.pl9 useproc dslvrg.pl9 dsmrgs.pl9 useproc dsmdlv.pl9 dslivlst.pl9
E N D
Visualization • “A picture is worth 1000 words” • Effective visualization can help with the understanding of complex structures • The key word is “effective” COSC6431
Compare this with… useproc dslvrg.pl9 dsmdlv.pl9 useproc dslvrg.pl9 dsmrgs.pl9 useproc dsmdlv.pl9 dslivlst.pl9 useproc dsmdlv.pl9 dsmdlv.pl9 useproc dsmrgs.pl9 dslivlst.pl9 useproc dsmrgs.pl9 dsmdlv.pl9 useproc optimiz.pl9 ds.pl9 useproc ds.pl9 artificial.pl9 useproc ds.pl9 dsdbg.pl9 useproc ds.pl9 dselim.pl9 useproc ds.pl9 dsinit.pl9 useproc ds.pl9 dslivlst.pl9 useproc ds.pl9 dslvbb.pl9 useproc ds.pl9 dslvrg.pl9 useproc ds.pl9 dsmemuse.pl9 useproc ds.pl9 errorbe.pl9 useproc ds.pl9 ilstats.pl9 useproc dsdbg.pl9 artificial.pl9 useproc dsdbg.pl9 both.pl9 useproc dsdbg.pl9 getval.pl9 useproc dselim.pl9 dsdbg.pl9 useproc dselim.pl9 dslivlst.pl9 useproc dselim.pl9 dsmdlv.pl9 useproc dselim.pl9 dsmrgs.pl9 useproc dselim.pl9 gen_bag.pl9 useproc dselim.pl9 pl_del.pl9 useproc dselim.pl9 storame.pl9 useproc dsinit.pl9 alias.pl9 useproc dsinit.pl9 artificial.pl9 useproc dsinit.pl9 blevel1.pl9 useproc dsinit.pl9 both.pl9 useproc dsinit.pl9 choprnd.pl9 useproc dsinit.pl9 dslivlst.pl9 useproc dsinit.pl9 dsmemuse.pl9 useproc dsinit.pl9 getval.pl9 useproc dsinit.pl9 ilstats.pl9 useproc dslivlst.pl9 artificial.pl9 useproc dslivlst.pl9 dslivlst.pl9 useproc dslivlst.pl9 dsmemuse.pl9 useproc dslvbb.pl9 dslivlst.pl9 useproc dslvbb.pl9 dsmdlv.pl9 useproc dslvrg.pl9 dslivlst.pl9 useproc dslvrg.pl9 dslvrg.pl9 COSC6431
Key questions • What views are useful? • Low-level or high-level • Kind of information displayed (procedure calls, data flow, control flow, inheritance) • What technique to use? • Automatic graph layout • Animation • What part of the information should be elided? COSC6431
Low-level visualizations • Execution of algorithms can be visualized to help with their understanding • Classic example: “Sorting out Sorting” • Many tools have been developed to do this automatically COSC6431
Parallel Quicksort visualization The left view shows the values being sorted (color indicates thread) and the right view shows a history of the swaps made in the program. COSC6431
Automatic graph layout • Given a graph, what is its most understandable layout? • Understandability usually refers to number of edge crossings • A tough problem in the general case • Minimizing edge crossings for a bipartite graph with one side fixed is NP-hard COSC6431
Heuristics - Sugiyama • In software systems, one often deals with layered graphs • Sugiyama developed a widely used algorithm for layout of layered graphs • Main idea: Minimize edge crossings by having edges be as vertical as possibleAbscissa of each vertex is the average of the abscissas of its neighbours COSC6431
Sugiyama example COSC6431
Heuristics – Spring Layout • Attaches forces between the nodes of a graph • Connected nodes are attracted to each other, otherwise they are pushed apart • Converges to a stable position • Of dubious value for systems with many cycles (as most software systems are) COSC6431
Spring Layout example COSC6431
Graphviz • Set of graph drawing tools from AT&T • Supports both Sugiyama and Spring layout • Has been used in a number of different settings • Receives textual input and transforms it into graphs • Bunch can produce output that Graphviz can visualize COSC6431
Data structures COSC6431
Automata COSC6431
Program profile COSC6431
Module dependencies COSC6431
Rigi • Interactive, visual tool designed to help understand and re-document software • Includes parsers for C, C++, and COBOL • Incorporates selection, filtering, and editing operations • Uses simple file format to represent graphs (RSF) COSC6431
SHriMP Views • Simple Hierarchical Multi-Perspective • Originally developed for program understanding • Can be used for other knowledge bases as well • Usual problem: How does it scale up? COSC6431
3D Visualizations • A number of papers present attempts to visualize software structures in 3D • While interesting, it is doubtful that these approaches can be useful (see aside on the course webpage) • Some examples…. COSC6431
Metaballs COSC6431
Cone trees COSC6431
World cities COSC6431