Is a Picture Worth a Thousand Words?

 

Rym Mili and Ioannis "Yanni" G. Tollis

Department of Computer Science

The University of Texas at Dallas

P.O. Box 830688, EC 31, Richardson, TX 75083-0688, USA

rmili@utdallas.edu, tollis@utdallas.edu,

http://www.utdallas.edu/~rmili/

http://www.utdallas.edu/~tollis/

 

 

Abstract

Most of the white box reuse activities can be achieved through a graphical representation of software components along with operations defined on them. So far, in the software reuse community, the emphasis has been mostly on the algorithmic aspect of these operations. Little attention has been paid to the graph visualization of the components. On the other hand, the graph drawing community has been developing sophisticated algorithms for graph visualization. It is our belief that software reuse is in great need of advanced visualization techniques and tools, and that the time is ripe to merge the two efforts for mutual benefits.

Keywords: white box reuse, visualization, program slicing, graph drawing.

Workshop Goals: Assessing the pertinence of our ideas; learning; networking.

Working Groups: component issues.

 

1 Position

It is seldom that a software component retrieved from a reuse library meets the user's requirements. What is far more typical is that components that are retrieved approximate the user's requirements and must be adapted to satisfy them precisely. The adaptation phase is without any doubt the most crucial step in a retrieved software component's lifecycle. It usually involves understanding the functionality of the component, assessing the impact of a modification, modifying the component, and testing it. Following the adaptation step, the component is integrated into the host system. It is a common belief that white box reuse activities can be achieved through a graphical representation of software components along with operations defined on them. So far, in the software engineering and software reuse communities, the emphasis has been mostly on the algorithmic aspect of the operations. For example, slicing techniques have been proposed to address the problems of impact analysis [8], debugging [14,2,15,6,7,13], program differencing [12] and program integration [11,17,18]. Even though these techniques make extensive use of graphs, little attention has been paid to the visualization of their underlying structure. On the other hand, the graph drawing community, separately from the software engineering community, has been developing sophisticated algorithms for graph visualization. It is our belief that software reuse is in great need of advanced visualization techniques and tools, and that the time is ripe to merge the two efforts for mutual benefits.

1.1 Graphs in Software Reuse

Among the various program slicing approaches that are used in software reuse, many utilize modified and extended versions of program dependence graphs (PDGs) as their underlying program representation. A program dependence graph for a software component C is a directed graph whose vertices correspond to statements and control predicates of C, and edges correspond to data and control dependences. Control dependence edges are labeled either true or false. A control dependence edge between vertices i and j is interpreted as follows: if the element represented by vertex i is evaluated during program execution and its value matches the label on the edge, then assuming that the program terminates normally, the element represented by j will eventually execute; otherwise, j may never execute.

Data dependence edges include flow dependence edges and def-order dependence edges. Intuitively, a statement j is flow dependent on statement i if a value computed at i is used at j in some program execution. Flow dependences can be further classified as being loop-carried and loop-independent, depending on whether or not they arise as a result of a loop iteration. Def-order dependence edges are included in program dependence graphs to ensure that inequivalent programs cannot have isomorphic program dependence graphs [10].

A system dependence graph (SDG) extends the definition of PDG to accommodate collections of procedures. A SDG contains a program dependence graph for the main program and a procedure dependence graph for each procedure. Procedure dependence graphs are essentially the same as PDG except that they may include additional vertices and edges to represent procedure calls. Figure 1 shows a simple program that computes the circumference and the area of a circle; figure 2 shows the program's SDG [12].

 

program;

P:= 3.14

Rad := 3

if DEBUG then rad := 4 fi

call Mult3(P, rad, rad, area)

call Mult3(2, P, rad, circ)

output(area)

output(circ)

end

procedure Mult3(op1, op2, op3, result)

result := op1 * op2 * op3

end

Figure 1. A sample program

Figure 2. The program's system dependence graph

 

1.2 Graph drawing and Visualization

The field of graph drawing and visualization addresses the problem of constructing geometric representations of conceptual structures that are modeled by graphs, networks, or hypergraphs. Over the last ten years there has been significant growth in research in graph drawing theory, systems and applications. An extensive bibliography can be found in [5].

In information visualization applications, the usefulness of a drawing of a graph depends on its readability, that is the capability of conveying the meaning of the diagram quickly and clearly. Various graphic standards have been proposed for drawing graphs in the plane: straight-line drawings map edges into straight-line segments; polyline drawings represent edges by polygonal chains.

Readability issues are expressed by means of aesthetics, which can be formulated as optimization goals for the drawing algorithms. In general, the aesthetics depend on the graphic standard adopted and the particular class of graphs of interest. A fundamental and classical aesthetic is the minimization of crossings between edges. A drawing is planar if no two edges intersect. A drawing is a grid if the vertices (and the bends) of the edges have integer coordinates. In grid drawings, the area of the smallest rectangle covering the drawing should be minimal. In all graphic standards, the display of symmetries is desirable. It should be noted that aesthetics are subjective and may need to be tailored to suit personal preferences and applications.

1.3 Is a Picture Worth a Thousand Words?

Mere faith in the worth of pictures is not sufficient to make them an effective communication vehicle [9]. The picture has to capture the intent of the words accurately and precisely, which current methodologies in software engineering definitely do. However, for the picture to fulfill its entire purpose, it has to also be legible, which current ad hoc techniques in software engineering do not aspire for. Therefore there has to be a conscious and concerted effort to borrow the more sophisticated algorithms from graph drawing and make visualization an effective tool in software reuse.

 

2 Comparison

In [9], Roman and Cox discuss software visualization tools such as AlADDIN [1], BALSA [4], PAVANE [16], and TANGO [19]. These tools are mainly concerned with the animation of graphical representations of data structures. On the other hand, graph visualization tools such as the Graph Layout Toolkit and the Graph Drawing Server of Brown University have been developed to visualize general graphs.

 

References

[1] Helttula, E., A. Hyrskykari, and K. J. Raiha, "Graphical Specification of Algorithm Animations with ALADDIN" In Proceedings of the 22nd Annual Conference on System Sciences, 1988, pp. 892-901.

[2] Agrawal, H., R. A. DeMillo, and E. H. Spafford, "Dynamic Slicing in the Presence of Unconstrained Pointers", In Proceedings of the ACM Fourth Symposium on Testing, Analysis and Verification, 1991, pp.60-73.

[3] Agrawal H., R. A. DeMillo, and E. H. Spafford, "Debugging with Dynamic Slicing and Backtracking", Software - Practice and Experience, Vol. 23, 1993, pp. 589-616.

[4] Brown, M. H., "Exploring Algorithms Using Balsa-II", IEEE Computer, Vol. 21, No. 5, 1988, pp. 14-36.

[5] Di Battista, G., P. Eades, R. Tamassia, and I. G. Tollis, "Algorithms for Drawing Graphs: an Annotated Bibliography", Computational Geometry: Theory and Applications, Vol. 4, No. 5, 1994, pp.235-282.

[6] Fritzson, P., N. Shahmehri, M. Kamkar, and T. Gyimothy, "Generalized Algorithmic Debugging and Testing", ACM Letters on Programming Languages and Systems, Vol. 1, 1992, pp. 303-322.

[7] Kamkar, M., N. Shahmehri, and P. Feitzson, "Interprocedural Dynamic Slicing and its Application to Generalized Algorithmic Debugging", In Proceedings of the International Conference on Programming Language Implementation and Logic Programming, 1992.

[8] Gallaher, K. B., and J.R. Lyle, "Using Program Slicing in Software Maintenance", IEEE Transactions on Software Engineering, Vol. 17, 1991, pp. 751-761.

[9] Roman, G., and K. C. Cox, "Program Visualization: The Art of Mapping Programs to Pictures", In Proceedings of the 14th International Conference on Software Engineering, Melboune, Australia, 1992, pp. 412-411.

[10] Horwitz, S., J. Prins, and T. Reps, "On the Adequacy of Program Dependence Graphs for Representing Programs", in Conference Record of the 15th ACM Symposium on Principles of Programming Languages, San Diego, CA, 1988.

[11] Horwitz, S., J. Prins, and T. Reps, "Integrating Noninterfering Versions of Programs", ACM Transactions on Programming Languages and Systems, Vol. 11, 1989, pp. 345-387.

[12] Horwitz, S., and T. Reps, "The Use of Program Dependence Graphs in Software Engineering", In Proceedings of the 14th International Conference on Software Engineering, Melboune, Australia, 1992, pp. 392-411.

[13] Kamkar, M., P. Fritzson, and N. Shahmeri, "Interprocedural Dynamic Slicing Applied to Interprocedural Data Flow Testing", In Proceedings of the Conference on Software Maintenance, Montreal, Canada, 1993, pp. 386-395.

[14] Lyle, J. R., and M. Weiser, "Automatic Bug Location by Program Slicing", In Proceedings of the Second International Conference on Computers and Application, Beijing, China, 1987, pp. 877-883.

[15] Pan, H., and E. H. Spafford, "Fault Localization Methods for Software Debugging", Journal of Computer and Software Engineering, 1994.

[16] Roman, G. C., K. C. Cox, C. D. Wilcox, and J. Y. Plun, "Pavane: a System for Declarative Visualization of Concurrent Computations", Journal of Visual Languages and Computing, Vol. 3, 1992.

[17] Reps, T., and W. Yang, "The Semantics of Program Slicing and Program Integration", In Proceedings of the Colloquium on Current Issues in Programming Languages, Vol. 352 of Lecture Notes in Computer Science, Springer-Verlag, 1989, pp. 60-74.

[18] Reps, T., "Algebraic Properties of Program Integration" Science of Computer Programming, Vol. 17, 1991, pp. 139-215.

[19] Stasko, J., "Simplifying Algorithm Animation with TANGO", In Proceedings of the IEEE Workshop on Visual Languages, Illinois, 1990, pp. 1-6.

 

Biographies

Rym Mili holds a Ph.D. degree in computer science from the University of Ottawa, Canada, and a Doctorat de Specialite in computer science from the University of Tunis, Tunisia. She is an assistant professor at the University of Texas at Dallas. Her research interests are in software reuse, requirements and program visualization, and formal specifications.

Ioannis G. Tollis holds a Ph.D. degree in Computer Science from the University of Illinois at Urbana-Champaign. He is currently a professor of computer science at the University of Texas at Dallas. His research interests include information visualization and graph drawing, graph layout, computer aided design and computational geometry.