Model Oriented Evolutionary Redocumentation Feng Chen and Hongji Yang Software Technology Research Laboratory De Montfort University, Leicester, UK fengchen, hyang @dmu.ac.uk Abstract This paper discusses aspects of the redocumentation of legacy systems and proposes a model oriented approach to generating documentation, which is to produce models from existing systems and to generate the documentation based on the models. Since the software models can bridge the gap of a legacy system and an evolved system, the generated documentation covers all the information of system evolution. A prototype software redocumentation tool is presented to semi-automate this process and a case study of a system in IBM assembler is used for experiments with the approach and the prototype tool. Keywords: Software Reengineering, Redocumentation, Program Transformation, Model Transformation, Wide Spectrum Language (WSL), Model Driven Engineering (MDE) 1. Introduction It is generally accepted in the software engineering that most of legacy software systems suffer from documentation problems [11]. For example, many applications written in assembler were developed 30 years ago and very often have little or no documentation of use to a maintainer. Without documentation, the only reliable and objective information is the source code itself [4]. One approach out of this situation is to redocument the legacy system from the source code. This paper follows the basic principles of Model Driven Engineering (MDE) in the context of reverse engineering and proposes a model oriented approach to generating documentation, which is a process of creating system documentation at different levels of abstraction and in different views of presentation. In Section 2, current researches on redocumentation are reviewed with a focus on existing tools. In Section 3, a model oriented redocumentation approach is introduced. In Section 4, tool support is presented and a case study of a system in IBM assembler is used for experiments with the approach and the prototype tool. Finally, in Section 5, the paper is concluded. 2. Redocumentation One way of producing accurate documentation for an existing software system is through redocumentation. Redocumentation is the creation or revision of a semantically equivalent representation within the same relative abstraction level. Redocumentation is the simplest and oldest form of reverse engineering, and many consider it to be an un-intrusive, weak form of restructuring [3]. There already exist some tools to help redocumentation, including pretty printers, diagram generators, and cross- reference listing generators. Freeman and Munroe [5] discussed requirements for a redocumentation tool and what documentations should be produced. The Rigi- Environment [8] uses reverse engineering to reconstruct the architectural features of a legacy system, which will be done in two steps. The first step parses the source code and stores the extracted data in a repository. The second step disassembles the resource-flow graph and analyses it to find different abstraction patterns. New program comprehension tools often allow the forging of links between source code and documentations. The ParaSET workbench allows the user to create three types of links between code and documentation [12]. The PAS tool [9] supports the incremental redocumentation where the comprehension of the software is recorded in hypertext. In [10], a “design browser” tool is described, for flexible browsing of a system's design level representation and for information exchange, complemented with a “retriever" supporting full-text and structural searching. Assembler program presents a number of unique challenges to automated analysis, which led to our previous development of a commercial tool, FermaT Workbench [13, 16]. Another fundamental work of our previous research is the development of TAGDUR Tool [7], which transforms a legacy system’s outmoded architecture to a more modern one through a series of UML diagrams. The above tool environments can provide different views of a legacy system and are able to transform the system to another level of abstraction, generate and 31st Annual International Computer Software and Applications Conference(COMPSAC 2007) 0-7695-2870-8/07 $25.00 © 2007