Omega zyxwvu - an Integrated Environment for C++ Program Maintenance zy Xiaoping Chen, Wei-Tek Tsai, Hai Huang, Mustafa Poonawala, Sanjai Rayadurgam, Yamin Wang Department of Computer Science, University of Minnesota, 200, Union Street S.E., Minneapolis, MN 55455, U.S.A. Abstract zyxwvut This paper proposes several zyxwvutsrq new 00 spec@ techniques that are useful in the maintenance zyxwvu of 00 software, especially C+ + programs. The proposed techniques include: zyxwvutsrq 1) new 00 specijk dependence relations, such as class, message and declaration dependence; 2) algorithms to construct a hierarchical C++ dependence graph (C++DG) to capture these dependences from the source code; 3) several new slicing techniques such as class, message, constrained and recursive slicing, besides the existing slicing techniques such as program, variable and condition slicing for 00 programs. Next the paper discusses the application of the dependence and slicing concepts to other maintenance activities such as Ripple Efect Analysis (REA) and regression testing. Finally the paper presents the design of an integrated environment, Omega, that implements many of these techniques for C+ + program maintenance. Omega has been demonstrated in various industrial sites in the US and Japan since May 1995. 1. Introduction 00 technology has gained widespread acceptance in the industry in recent times. With the current trend in migration from mainframe-based legacy systems to client- server architecture, many large programs written in older languages like COBOL zyxwvuts are being re-engineered and implemented in C++ [lo, 61. New technologies for software development bring up new maintenance issues for systems developed using such technologies. Previous work in software maintenance focus on maintenance of programs written in imperative languages like COBOL and C [l, 2, 5, 31. C++ provides features like data encapsulation that effectively address many existing maintenance problems. But new features like inheritance, polymorphism, and message passing pose new problems for maintainers. Early research [13, 7, 8, 141 has shown that many issues in maintenance of 00 software are yet to be unraveled. Many maintenance activities involve analyzing the dependence relationships among various components of a program. In addition to data and control dependence [3], this paper defines class, message and declaration dependence that are required zyx for proper understanding and maintenance of 00 software. For example, identification of the modules invoked due to dynamic binding is an issue. The message dependence proposed in this paper captures all potential relationships due to dynamic binding. A C++ dependence graph, C++DG, can represent the dependencies among different program components. It is a directed graph with a separate type of edges for each type of dependence information. C++DG has a hierarchical structure representing the dependence at various levels of granularity, including statement level, method level, object level and class level. C++DG can be automatically constructed fbm its source code using a set of construction rules fc4. its vertices and edges. C++DG is used by dependence analysis, program slicing, ripple effect analysis (REA) and regression testing. Program slicing [22] is an important technique used in software maintenance. It is used to support program understanding zyxw [5], business rule extraction [3] and REA [15]. [5] proposed a variant called forward slicing. [4] introduced generalized program slicing that includes hierarchical, constraint and recursive slicing among others. This paper defines several new 00-specific slicing techniques that can be performed using C++DG constructed from the source program. This paper also discusses two important applications d the techniques described: REA [15] and regression testing [9, 12, 111. Program slicing zyx can be used to locate the affected parts due to a change made to a program. This paper extends the REA to hierarchical REA that uses hierarchical dependence graph and hierarchical slicing and explain their usehlness in the REA process for 00 programs. For regression testing, this paper discusses test case reduction in the context of 00 programs and explains how the techniques discussed in the paper can be used to address this problem. Finally, this paper presents the design of Omega, an integrated environment for maintenance of C++ programs. Several techniques and concepts described in this paper have been implemented and experimented. The prototype 1063-6773/96 $5.00 0 1996 IEEE 114