Reviewing the Collected Information and Extracting the Structure of the Program


© Faisal Bin Bashir
Articles in this Topic    Discussions in this Topic

Examining Information Sources

The second step is to become familiar with the program, its structure and how it works. This stage includes the steps for the review of the information that has been collected during the previous stage. This step is important because it allows people doing the design recovery process to become familiar with the system and its components. This step permits a plan to be created for dissecting the program and entering its information into the development environment.

Extracting the Structure

The third step is to begin recovering detailed design from the source code. This step involves two tasks: extracting the calling hierarchy and expressing it as a structure chart, and recording information about data exchanged between nodes in the chart. The recovered information can be recorded using the structure chart editor and the data structure editor in the software development environment.

While creating the structure chart, the main program routine or procedure or function becomes the top node or the root node in the chart. For example, in case of a C program, the function main( ) becomes the root node of the structure. Routines/Procedures/Functions called by the main function are represented by the second layer of nodes in the structure chart. Thus, each node in the structure chart corresponds to a subroutine, function, procedure or a library routine in the program. For each node, sub-nodes are added if the corresponding routine/procedure/function calls to other routines/procedures/functions. This is done until the leaf nodes are reached. Leaf nodes correspond to the routines/procedures/functions that call no other routines/procedures/functions or library routines.

Creating structure charts from the source code should be automated. The structure chart captures the calling hierarchy of a program and must contain all the cross-reference information within the program. The intent is to capture this information at an implementation language independent level. This could be achieved by giving the routines/procedures/functions or library routines, the names that are easily intelligible by the viewer because that is the main purpose of reverse engineering. Therefore, if the names of the routines/procedures/functions used in the domain system are not understandable, then less implementation oriented names should be assigned to the nodes in the structure chart.

Along with recording the structure chart information, the data items passed between nodes should also be recorded. Structure charts must show the direction in which the data items are passed between nodes. Data item usage has to be analyzed to determine whether data items serve to carry input data, output data or both. Information about data items, such as purpose, data type, range of values, etc., should be recorded in the data structure diagrams. Similarly, here, the data items should be assigned names that are less implementation oriented and their data types should be mapped to more generic types such that they are easily understandable, so as to achieve language independence.

Go To Page: 1 2


Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo