Rule-based Model Extraction from Source Code

Abstract

In the context of an approach for reengineering legacy soft-
ware systems at the architectural level, we present in this paper a reverse
engineering methodology that uses a model deÂ¯ned as a type graph to
represent source-code subject to a code categorization process. Two al-
ternative methods for referencing the source code are discussed: native
vs. graphical. To represent the code, the native representation uses the
abstract syntax tree while the graphical uses a programming language
metamodel. Two options regarding the way that the graph can relate to
the source code reference model are also considered: association model
vs. direct link. The extraction of the program representation, complying
to the type graph, is based on rules that categorize source code according
to its purpose. The techniques to address this process, such as the code
categorization rules, are shown together with examples.