Lecture 2
Lecture 2
• Software Reuse
2
Software Reverse Engineering
• Software Reverse Engineering is a process of recovering the design,
requirement specifications and functions of a product from an
analysis of its code. It builds a program database and generates
information from this.
• The purpose of reverse engineering is to facilitate the maintenance
work by improving the understandability of a system and to produce
the necessary documents for a legacy system.
3
Reverse Engineering Goals
• Cope with Complexity.
• Recover lost information.
• Detect side effects.
• Synthesize higher abstraction.
• Facilitate Reuse.
4
Steps of Software Reverse
Engineering
• Collection Information:
This step focuses on collecting all possible information (i.e., source design
documents etc.) about the software.
• Examining the information:
The information collected in step-1 as studied so as to get familiar with the
system.
• Extracting the structure:
This step concerns with identification of program structure in the form of
structure chart where each node corresponds to some routine.
• Recording the functionality:
During this step processing details of each module of the structure, charts are
recorded using structured language like decision table, etc.
5
Steps of Software Reverse
Engineering
• Recording data flow:
From the information extracted in step-3 and step-4, set of data flow
diagrams are derived to show the flow of data among the processes.
• Recording control flow:
High level control structure of the software is recorded.
• Review extracted design:
Design document extracted is reviewed several times to ensure consistency
and correctness. It also ensures that the design represents the program.
• Generate documentation:
Finally, in this step, the complete documentation including SRS, design
document, history, overview, etc. are recorded for future use.
6
Software Reuse
• Code reuse, also called software reuse, is the use of existing software, or
software knowledge, to build new software
• Almost all artifacts associated with software development, including
project plan and test plan, can be used again. However, the important
items that can be effectively used again are,
• Requirements specification
• Design
• Code
• Test cases
• Knowledge
7
Basic issues in any reuse program
• The following are some of the basic issues that must be for starting
any reuse program,
• Component creation
• Component indexing and storing
• Component search
• Component understanding
• Component adaptation
• Repository maintenance
8
Basic issues in any reuse program
• Component creation
• The reusable components have to be first identified. The selection of
the correct kind of components having the potential for reuse is best.
• Component indexing and storing
• Indexing requires classification of the again usable components so
that they can be easily found when looking for a component for
reuse. The components need to be stored in a Relational Database
Management System (RDBMS) or an Object-Oriented Database
System (ODBMS) for efficient access when the number of
components becomes large.
9
Basic issues in any reuse program
• Component searching
• The programmers need to search for correct components matching their
needs in a database of components. To be able to search components
efficiently, the programmers require a perfect method to tells the
components that they are looking for.
• Component understanding
• The programmers need a prefect and sufficiently complete
understanding of what the component does to be able to decide
whether they can reuse the component or not. To understand, the
components should be well documented and should do something
simple in the code.
10
Basic issues in any reuse program
• Component adaptation
• Before they can be reused, the components may need adaptation,
since a selected component may not exactly be mixed the problem at
hand. However, tinkering with the code is also not the best solution
because this is very likely to be a source of faults.
11
Basic issues in any reuse program
• Repository maintenance
• It once is created requires repeated maintenance. New components,
as and when made have to be entered inside the repository. The
faulty components have to be followed.
• Further, when new applications mixed, the older applications become
obsolete. In this case, the obsolete components might have to be
deleted from the repository.
• Domain analysis
• The aim is to find the reusable pieces for a problem domain.
12
Advantages of software reuse
13
The reuse approach
• Although reuse is often simply thought of as the reuse of system
components, there are many different approaches to reuse that may
be used.
• Reuse is possible at a range of levels from simple functions to
complete application systems.
• The reuse landscape covers the range of possible reuse techniques.
14
15
The reuse approach
• Key factors for reuse planning:
• The development schedule for the software.
• The expected software lifetime.
• The background, skills and experience of the development team.
• The criticality of the software and its non-functional requirements.
• The application domain.
• The execution platform for the software.
16
THANK YOU
17