In the area of re-engineering or re-purposing of existing software, model driven methodologies are hard to adopt because of lack of the central asset: models for the existing source code. Large companies and organizations that maintain a large code basis over long periods of time have recognized this issue, and are looking for ways to turn that code basis into models understandable under a business purposes point of view.In this paper, we introduce a technique that address this issue for C/C++ code. It delivers code-models, a representation of source code close to control flow graphs, by means of tool-supported analysis and transformations from legacy source code. Code models extend usual control flow graphs with rich information on both nodes and edges. They are immediately analyzable and verifiable in the jABC MDD framework, thus adequate for a model driven design, development, and evolution process.
I. MOTIVATIONModern software development strategies typically describe the development of new software. But, in real life a huge amount of source code exists, which was developed long before modern strategies came up. In the normal life cycle of software, the source code must be maintained and the functionality extended. Therefore, parts of the software have to be reengineered, repurposed or exchanged.Large companies and organizations that maintain a large code basis over long periods of time have recognized this issue, and are looking for ways to turn that code basis into models understandable under a business purposes point of view. As was made clear by the industrial representatives and NASA project responsibles e.g. at the recent NASA Formal Methods Symposium 1 , their strategic and managerial interest is less on reconstructing the software's structure (feasible for example via class analyses) or some quantitative characterizations e.g. in terms of metrics. It is rather on finding a practical way of entering the purpose-driven MDD that characterizes modern and leading-edge software and systems development from the starting point of the current, outdated, code basis. The central issue is how to get, possibly with automated support, from that legacy code into a purpose-oriented style of modelling that servers as basis for code migration and repurposing.In this paper we show how to use the Model driven design and development (MDD) approach, in order to enable the evolution, redesign, and repurposing process of legacy 1 http://ti.arc.nasa.gov/event/nfm09/ software at the model level, in contrast to a new development from scratch.