Graph-based tools for re-engineering

Katja Cremer, Andr� Marburger, Bernhard Westfechtel
2002 Journal of Software Maintenance and Evolution Research and Practice  
Maintenance of legacy systems is a challenging task. Often, only the source code is still available, while design or requirements documents have been lost or have not been kept up-to-date with the actual implementation. In particular, this applies to many business applications which are run on a mainframe computer and are written in COBOL. Many companies are confronted with the difficult task of migrating these systems to a client/server architecture with clients running on PCs and servers
more » ... ng on the mainframe. REforDI (REengineering for DIstribution) is a graph-based environment supporting this task. REforDI provides integrated code analysis, re-design, and code transformation for COBOL applications. To prepare the application for distribution, REforDI assists in the transition to an object-based architecture, according to which the source code is subsequently transformed into Object COBOL. Internally, REforDI makes heavy use of generators to reduce the implementation effort and thus to enhance adaptability. In particular, graph-based tools for re-engineering are generated from a formal specification which is based on programmed graph transformations. While modern programming languages such as Java and C++ are becoming more and more widespread, a considerable amount of code being operational today is still written in FORTRAN and COBOL. The latter has been used extensively for programming business applications in banks, insurance companies, administrations, etc. Originally, these applications were programmed for a centralized environment consisting of a mainframe computer connected with dumb terminals. Later on, companies were faced with the challenge of taking advantage of more modern equipment such as PCs, laptops, etc. operating in a distributed environment. However, migration to a client/server architecture is far from easy because units of distribution are hard to identify due to missing separation of concerns. The REforDI environment (REengineering for DIstribution) [1, 2, 3] assists with this task by providing integrated tools for code analysis, re-design, and source code transformation. REforDI is fed with the source code of an application written in COBOL 85 (or COBOL 77). The source code is parsed and analyzed, resulting in a graph representation aiding program understanding. Then, a re-design is performed to identify units of distribution. This results in an object-based architecture, according to which the source code is transformed (making use of classes, which are available in Object COBOL). In this way, the application is prepared for distribution, which can be performed with the help of CORBA (see [4] for the latter step). To realize the REforDI environment, we used formal specifications and generators extensively. In particular, source code transformations -which were used to transform the original application into Object COBOL -were specified with the help of tree transformation rules. Similarly, we specified the manipulation of graph representations with the help of graph transformations. These graph transformations are used for constructing an internal representation of the source program and for mapping the source program to an object-based architecture. From these specifications, a large amount of code was generated. In this way, implementation effort was reduced significantly such that only small portions of the overall environment had to be hand-coded. The contributions of REforDI may be summarized as follows: Re-engineering methodology. REforDI puts a strong emphasis on software architecture. In order to understand a legacy system, it is essential to recover and document its software architecture. Only then may the system be re-designed and re-implemented successfully. Transformations performed directly on the source code level are helpful to some extent. However, they do not improve program understanding, which we consider crucial to reduce maintenance efforts in the long run. Functionality. REforDI is a highly interactive environment. In particular, re-design is supported through a set of algorithms whose application may be controlled by the user. Moreover, the user may adjust the outcomes of these algorithms manually. We believe that there is no re-design algorithm performing 'best' in all situations. Rather, re-design is a non-deterministic, creative process which should be supported by flexible and interactive tools rather than by automatic processors. User interface. REforDI offers a graphical user interface which visualizes the software system under study at different levels of abstraction. We consider graphical visualizations as an important aid to support program understanding and re-design.
doi:10.1002/smr.254 fatcat:mo4d2eghazftracb2ir7fw4bci