首页    期刊浏览 2024年11月28日 星期四
登录注册

文章基本信息

  • 标题:Graphics and animation for software visualization
  • 作者:Hendrix, T Dean
  • 期刊名称:National Forum
  • 印刷版ISSN:1538-5914
  • 出版年度:1998
  • 卷号:Fall 1998
  • 出版社:Honor Society of Phi Kappa Phi (Auburn)

Graphics and animation for software visualization

Hendrix, T Dean

Computer graphics and animation are often associated with applications in diverse areas such as the entertainment industry, meteorology, and medicine. Sophisticated graphics software enables the creation of impressive feature films, as well as life-saving diagnostic tools. Both creating and maintaining this and other types of software are difficult tasks, which often push the limits of the human mind in managing detail and complexity. For example, software systems such as Windows 95, which has been estimated to contain more than ten million lines of program code, offer significant challenges because of their sheer size and complexity.

The Year 2000 problem has brought global attention to the inherent difficulties in maintaining complex software systems and the potential consequences of failing to do so. Much effort has been expended on developing tools and techniques that augment natural human abilities in dealing with software size and complexity. Many of these techniques are focused on augmenting the innate power of the human visual system in problemsolving and comprehension tasks.

The idea that graphical representations can increase comprehensibility has long been accepted in common practice. Indeed, "a picture is worth a thousand words" has become a cliche. The intuitive appeal of this idea is probably rooted in the distant past of human history, when early cultures communicated through visual means such as drawings on cave walls and animal skins. Clear, practical application of this idea is evident today as pictures and diagrams almost always accompany a textual description of how a device works or is put together.

From an intuitive and experiential perspective, the utility of graphical representations is unquestioned. It is not surprising then that, in a nicely recursive way, computer-generated graphics and animation are regularly used to aid people in creating and understanding complex software. This article will survey current tools and techniques that are representative of these efforts, with special attention directed toward practical applications in software engineering.

SOFTWARE VISUALIZATION

Generally, these tools and techniques are based on work in the field known as software visualization. This is a broad area that is not yet mature, and does not lend itself to easy definition. It can be generally circumscribed, however, as the use of graphical representations, animation, and other visual media to enhance the power of the human visual system in the comprehension or creation of software systems. Although some techniques exploit sound and other communication media, visualization primarily involves generating graphical images and animations (normally produced on a computer screen by graphics software) to aid the human user in constructing a mental image of some software artifact. For example, a cartoon-like animation could be produced to increase the comprehensibility of a software system's behavior, or a diagram of relationships among the software components could be used to gain an understanding of the software system's architecture.

Thus, software visualization is a practical application of computer graphics and animation software. Software visualization differs in significant ways from many applications of computer graphics and animation, however. Computer-generated art, for example, might attempt to stimulate human thought over a possibly broad range of interpretations or meaning. In contrast, software visualization must restrict human thought. That is, effective software visualizations must be highly precise and communicate the one, exact meaning of the underlying software artifact. As Marian Petre explains (Communications of the ACM, Vol. 38, No. 6, pp. 33-44), if a picture is worth a thousand words, we must be very careful that it is the correct thousand words that are expressed. A visualization of a software system that is ambiguous or misleading obviously does not contribute to the goal of increasing comprehensibility.

The application of graphical representations to software is not new. Indeed, it could be argued that graphical representations have always been a standard element of common programming practice. Whether visually tracing through an algorithm in the mind's eye or drawing penciland-paper renderings of a program's internal structure and organization, programmers seem to consistently rely on supplementary non-textual representations of programs to aid understanding and comprehension.

Perhaps the oldest and bestknown graphical representation of software is the flow chart. As early as 1947 the utility of flow charts in visualizing program-control flow was demonstrated. By the early 1960s, several tools had been developed that could generate flow charts automatically from program source code. Perhaps the most pervasive technique from the formative days of software visualization is something not generally considered to be graphical. In his 1975 book Programming Proverbs, Ledgard coined the term "pretty-printing" to refer to typographical enhancements of source code such as the use of whitespace, typefaces, and layout. Although not particularly graphical in the sense of using diagrams or pictures, pretty-printing, as well as other techniques which use typographic enhancements to program source code, is certainly an important element of software visualization. Indeed, pretty-printing has become an intuitive and ingrained process of modern programming.

As programming techniques and practices have matured over the years, so have graphical representations and the tools that generate them. The availability of high-resolution bit-mapped displays and windowing systems in the early 1980s spurred a period of increased activity and rapid growth in software visualization. Programmers emphasized the creation of sophisticated computer graphics, which often involved animation or cinematography. Sort Out Sor/ng by Ronald Baecker was a short film developed to visualize the behavior of common sorting algorithms. It remains a classic example of software visualization.

Also during this time of progress, a highly influential software visualization system was created at Brown University. BALSA, as the system was named, was an interactive algorithm-animation system that allowed the dynamic execution properties of a program to be visualized. Program code could be annotated at points where "interesting events" occurred during execution. As the program ran, these interesting events would cause BALSA to draw a new "scene" that depicted the operation of the program. Thus, a sequence of interesting events would result in a cartoon-like animation of the program's behavior being displayed on the computer screen.

POLKA, developed by John Stasko at Georgia Tech, is a modern descendent of BALSA.

Although POLKA follows the interesting-event model of BALSA, it incorporates techniques that ensure smooth transitions between scenes, thus eliminating the "jumpiness" of the animations and providing a very high-quality appearance. Figure 1 shows a snapshot of POLKA animating the behavior of a program that solves a common problem in graph theory. The colored components in the graph change dynamically as the program executes.

SOFTWARE ENGINEERING ENVIRONMENTS

Athough many tools such as POLKA are used primarily in an educational setting to aid students in learning how algorithms and computer programs work, a large number of tools use software-visualization techniques to address practical problems in the software industry. Such tools generally fall into categories such as Computer-Aided Software Engineering (CASE) tools or software-engineering environments. Some of the most notable products of early, influential work in this area include the tools developed by Steven Reiss at Brown University. PECAN (IEEE Transactions on Software Engineering, Vol. SE- 11, 1985, pp. 276-284) provides a user with multiple graphical views of both program structure (static) and behavior (dynamic). All of the visualizations in PECAN are based on the underlying textual form of the program-source code. In GARDEN (IEEE Software, Vol. 4, No. 6, 1987, pp. 16-27), a successor to PECAN, users can completely specify and view a program in purely graphical terms - a technique known as visual programming. Reiss integrates these and other techniques in FIELD (Software Practice and Experience, Vol. 20, No. S1, 1990, pp. 89-115), a sophisticated and comprehensive software-engineering environment.

Modern CASE tools and software-engineering environments reflect the influence of earlier pioneering efforts in software visualization. These tools include many commercial products widely used in industry, as well as state-of-the-art research prototypes in academia. What follows is a brief survey of several modern software-engineering tools that make substantial use of software visualization technology.

GRASP

GRASP (Graphical Representations of Algorithms, Structures, and Processes), developed at Auburn University, is a software-engineering tool that uniquely combines a source-code diagramming technique, the control-structure diagram (CSD), with other comprehension aids such as complexity visualization, architectural visualization, syntax coloring, and source-code folding. The primary focus of GRASP is to improve the comprehension efficiency of software and, as a result, improve reliability and reduce costs during design, implementation, testing, maintenance, and reengineering.

The GRASP control panel, shown in Figure 2, allows users to open graphical program editors that provide a visual interface onto the program-source code. The primary graphical editor is the CSD window, shown in Figure 3, which automatically generates a CSD visualization of source code. The CSD is extremely compact, consuming minimal extra space on the display screen, and non-disruptive, leaving the existing textual arrangement of the source code in place.

Other visualizations produced by GRASP include the complexityprofile graph (CPG) and architecture diagrams. The CPG is a visualization of program complexity, expressed as a colored graph (shown in Figure 4). Each bar in the CPG represents a region of program source code, and the height of the bars shows the relative amount of complexity contained in that region. Measures of program complexity have been correlated with program errors; that is, regions of high complexity are more likely to contain errors or "bugs." Thus, a visual profile of a program's complexity provides a method for programmers to quickly assess the most complex regions of code in a software system, and therefore the areas that possibly have greater potential for errors.

Hindsight

Hindsight, a commercial product from IntegriSoft, Inc., in San Jose, California, automates the generation of various charts and diagrams to facilitate program understanding. The main control panel for Hindsight, shown in Figure 5, illustrates the particular visualizations that are offered. The approach to program understanding taken by Hindsight is from a top-down perspective. That is, the tool directs a user toward an understanding of a software system by first visualizing the overall, highlevel architecture and structure of the system and then visualizing more and more detailed views at lower levels of abstraction. The structure chart, shown in Figure 6, is the primary visual interface onto the software system. Users can navigate to more detailed views, such as the flowchart of a particular region of source code, through clicking on the elements in the structure chart.

Rigi

Rigi is a software engineering tool designed to aid in the comprehension of existing, large software systems (Software Engineering Notices, Vol. 17, No. 5, 1992, pp. 88-98). A graph representing dependencies among components of the software system, as shown in Figure 7, is Rigi's initial view of the program-source code, much as in Hindsight. Rigi, however, allows users to interactively manipulate the diagram by grouping several related modules together into one graphical symbol. This function allows users to visually express their understanding of the various relationships among the software components.

For large software systems, graphs such as the one shown in Figure 7, and even the "condensed" graphs resulting after any grouping operations performed by the user, can be quite large and unwieldy. Rigi supports a visualization technique called distortion viewing, which is especially useful for these large graphs. Distortion viewing allows a user to choose a particular region of the graph and "zoom in" for a close-up view while still retaining the remainder of the graph in the viewable area of the display. The other regions of the graph become smaller and less detailed relative to the region under inspection. Rigi's implementation of this technique is shown in Figure 8.

ARE PICTURES REALLY BETTER?

Many evaluations of software visualizations reported in the literature have indicated mixed results, with perhaps a majority in the negative. Some empirical studies indicated gains in comprehensibility when using visualizations, while others reported that graphics were significantly slower than text in the experimental comprehension tasks. Marian Petre, among others, has asserted that elements of notation that are secondary to a particular graphical representation, such as spacing, shape of symbols, and layout, play a significant role in the effect of that graphical representation (Communications of the ACM, Vol. 38, No. 6, pp. 33-44).

Furthermore, Petre claims that comprehensibility is affected mainly by this secondary notation rather than by the primary graphical constructs and symbols that comprise the representation. Empirical studies support this notion and have shown that poor use of secondary notation can confuse and mislead users reading the graphical representation.

Although empirical studies of the usefulness of software visualizations generally show mixed results, other studies comparing the cognitive processing of simple pictures and text favor the efficiency of pictures. Numerous studies indicate that semantic analysis is performed faster for pictures than for text, and that graphical information is more easily and efficiently remembered than textual information. The conclusion is that graphical representations of software are inherently useful, though particular representations may not be.

CONCLUSION

Computer-generated graphics and animation play an important role in the human comprehension and creation of software systems. Research in software visualization and modem software-engineering tools has clearly demonstrated great potential for such techniques. More research is needed, however, for this potential to be fully understood and quantified.

T. Dean Hendrix is an assistant professor of computer science and engineering at Auburn University. His research interests include software methods, software metrics, reverse engineering, and software visualization. James H. Cross II is a professor and chair of computer science and engineering at Auburn University. He teaches courses in software engineering and directs research in software methods, quality assurance, testing, metrics, and reverse engineering. Dr. Cross currently serves on the IEEE Computer Society Board of Governors.

Acknowledgements: The authors' work is supported in part by a grant from the National Science Foundation. The authors also wish to acknowledge the important contributions of Larry Barowski and Karl Mathias.

Copyright National Forum: Phi Kappa Phi Journal Fall 1998
Provided by ProQuest Information and Learning Company. All rights Reserved

联系我们|关于我们|网站声明
国家哲学社会科学文献中心版权所有