0% found this document useful (0 votes)
4 views

Lecture 6

Software re-engineering involves analyzing, designing, and modifying existing software systems to enhance their quality, performance, and maintainability. The process includes reverse engineering, redesign, and forward engineering, focusing on improving maintainability, migrating to new technologies, and enhancing functionality. Key steps in reverse engineering include initial analysis, decompilation, and documentation, ultimately leading to code reconstruction and testing.

Uploaded by

Shizra Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Lecture 6

Software re-engineering involves analyzing, designing, and modifying existing software systems to enhance their quality, performance, and maintainability. The process includes reverse engineering, redesign, and forward engineering, focusing on improving maintainability, migrating to new technologies, and enhancing functionality. Key steps in reverse engineering include initial analysis, decompilation, and documentation, ultimately leading to code reconstruction and testing.

Uploaded by

Shizra Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

SOFTWARE RE-ENGINEERING

SE-409
Re-Engineering
• Re-engineering is the process of analyzing, designing, and modifying
existing software systems to improve their quality, performance, and
maintainability.
• This can include updating the software to work with new hardware or
software platforms, adding new features, or improving the software’s
overall design and architecture.
• Software systems are reengineered by keeping one or more of the
following four general objectives in mind:
• Improving maintainability
• Migrating to a new technology
• Improving quality
• Preparing for functional enhancement
Re-Engineering

• Conceptual level: Why does the system


exist?
• Requirements level: What does the
system do?
• Design level: (i) “What are the
characteristics of the system?” (ii) “How is
the system going to possess the
characteristics to deliver the
functionalities?
• Implementation level: “how” exactly the
“Levels of abstraction and refinement” system is implemented.
Re-Engineering

• Abstraction: system can be


gradually increased by successively
replacing the details with abstract
information.
• Refinement: system is gradually
decreased by successively
replacing some aspects of the
system with more details.
• Alteration: making of some
changes to a system representation
is known as alteration.
“Conceptual basis for the reengineering process”
General Model For Software
Reengineering
• The reengineering process accepts as
input the existing code of a system and
produces the code of the renovated
system.
• For example, a program written in C++
can be translated into a new program in
PYTHON.
• This model suggests that reengineering
is a sequence of three activities: reverse
engineering, re-design, and forward
engineering, strongly founded in three
“General model of software reengineering” principles, namely, abstraction,
alteration, and refinement, respectively.
A General Model For Software
Reengineering
• This process is formally captured by Jacobson and Lindstorm with the
following expression:
Reengineering = Reverse engineering + Δ + Forward engineering.
• The element “Δ” captures alterations made to the original system.
• Two major dimensions of alteration are: change in functionality and
change in implementation technique.
• A change in functionality comes from a change in the business rules,
• Next, concerning a change of implementation technique, an end-user
of a system never knows if the system is implemented in an object-
oriented language or a procedural language.
Reverse Engineering
• Reverse engineering is the process of analyzing a system, product, or software
to understand its components, functionality, and design. This involves dissecting
and studying the system without access to its original design documentation or
source code.
• Systematic evaluation of a product with the purpose of replication.
• Design of a new part
• Copy of an existing part
• Recovery of a damage or broken part
Why Reverse Engineering
• Reverse engineering serves various purposes across different fields, industries,
and contexts. Some common reasons why reverse engineering is employed:
• Understanding Existing Systems: Reverse engineering allows individuals or organizations to
understand how existing systems, products, or technologies work. This is particularly useful
when dealing with legacy systems or when trying to integrate new technologies with
existing ones.
• Product Improvement: Engineers often use reverse engineering to analyze competitors'
products and identify areas for improvement.
• Legacy System Maintenance: As technologies evolve, companies may find themselves
relying on legacy systems that are no longer supported or well-documented. Reverse
engineering can be employed to understand these systems, fix bugs, or make necessary
updates.
• Recovery of Lost Information: In cases where the original design documentation or source
code is lost or unavailable, reverse engineering can be a means of recovering essential
information about a system.
Importance
• We are not start from the very beginning to develop a new product every
time.
• We need to optimize the resources available in our hands and reduce the
production time keeping in view the customer’s requirement.
• Scenario for Reverse Engineering:
Imagine a company has a legacy software application critical to its
operations, but the original source code and documentation are no longer
available. The software is outdated, and the company is facing compatibility
issues with modern systems. They decide to perform reverse engineering to
understand the existing software and make necessary updates.
• Steps in Software Reverse Engineering:
1. Initial Analysis:
• Identify the main functionalities of the software.
• Determine the software's inputs, outputs, and overall behavior.
2. Decompilation:
• Use decompilers to analyze the compiled code and attempt to recreate a high-level source code
representation. Understand the algorithms and logic used in the original software.
3. Static and dynamic analysis:
• Both static and dynamic analysis are used in tandem to gain a comprehensive understanding of a
software system. This combined approach provides a more thorough assessment of the software's
structure, behavior, and potential issues.
4. Documentation:
• Create documentation based on the insights gained from reverse engineering. Document the
software's architecture, data flow, and key components.
5. Code Reconstruction:
• Using the information gathered, reconstruct a high-level source code representation of the
software. Implement any necessary updates or improvements.
6. Testing and Validation:
• Test the reconstructed software to ensure that the modifications did not introduce errors. Validate
that the updated software functions as intended and addresses compatibility issues.
Code Reverse Engineering
• Six objectives of reverse engineering, as identified by Chikofsky and Cross II:
• generating alternative views, recovering lost information, synthesizing higher levels of
abstractions, detecting side effects, facilitating reuse, coping with complexity.
• Six key steps in reverse engineering, as documented in the IEEE Standard for
Software Maintenance, are:
• partition source code into units.
• describe the meanings of those units and identify the functional units.
• create the input and output schematics of the units identified before.
• describe the connected units.
• describe the system application.
• create an internal structure of the system.
• The first three of the six steps involve local analysis, the rest involve global
analysis.
Code Reverse Engineering
• Software applications comprise source code files that are compiled
to convert them into binary executable code.
• If this binary executable code is converted back into source code
files using a decompiler then this will be termed as reverse
engineering of source code or code Reverse Engineering.
Reverse Engineering Requirements:
• First, we need source code files of the software such as C/C++ code
files and/or java files of the software etc.
Code Reverse Engineering
• If the source code files of the software are not available then we need to decompile the
software, Decompilation is the process of converting machine code (binary) back into a
higher-level programming language, or at least a representation that is closer to the original
source code.
Tool: Decompilers like IDA Pro, Hopper can be used to analyze and decompile binaries.
• If the purpose of reverse engineering was to explore the source code then we need a
source code editor for searching texts, functionalities, libraries, and/or algorithms in the
decompiled source code files and/or shared source code files.
Tool: Integrated Development Environment (IDE) Cloud storage platform (For example,
GitHub repository, GitLab etc.)
• If the purpose of reverse engineering was to make changes in the source code files then
using the source code editor we can add and/or delete code modules and/or functionalities.
Tool: One popular and widely used example of a source code editor is Visual Studio Code
(VSCode). It is a free and open-source code editor developed by Microsoft.
Restructuring
• Restructuring is a process of rearranging or reconstructing the source
code and decide whether to retain or change the programming
language.
• Software restructuring is a form of perfective maintenance that
modifies the structure of a program's source code.
• The objective of restructuring is to eliminate or restructure the source
code parts that may cause performance issues.
• Apart from this, removing obsolete code or system parts is also an
essential process.
Restructuring
• In restructuring , the parts of the source code then often cause errors
in the software can be changed or updated.
• In restructuring, we eliminate older version of certain parts of the
system (like programming implementation and hardware
components) so that software will perform up to-date.
Forward Propagation
• Forward engineering is same as software engineering process, but it
is carried out after reverse engineering in Re-engineering.
• Forward engineering is the traditional process of designing and
creating a system, product, or software from scratch. In this
approach, designers and developers start with requirements and
proceed to create the system using standard development practices.
• Forward Engineering applies of all the software engineering process
which contains SDLC to recreate associate existing application. It is
near to full fill new needs of the users into re-engineering.

You might also like