Unit - 5
Unit - 5
If software is being used in the real world, it must keep changing to stay useful. If it doesn’t
change, it becomes outdated or no longer fits user needs.
2. Law of Increasing Complexity
Every time you make changes to software, it tends to become more complicated. Unless you
actively manage and clean up the code, the system becomes harder to understand and
maintain.
3. Law of Conservation of Organization Stability
Even if you add more developers or resources to a software project, the rate at which the
software changes stays roughly the same. Adding more people doesn’t automatically mean
faster progress.
4. Law of Conservation of Familiarity
Software changes slowly and most updates are small, because people working on it need to
stay familiar with how it works. Big changes are rare and risky.
Software Maintenance
• Software Maintenance is a very broad activity that includes error corrections,
enhancements of capabilities, deletion of obsolete capabilities, and
optimization.
• This includes things like:
1.Fixing bugs (errors) – If something in the software isn’t working right, developers
go in and fix it.
2.Adding new features – Sometimes users need new functions, so developers add
them.
3.Removing old features – Some parts of the software might no longer be needed,
so they get removed.
4.Making it faster or better – Developers can optimize the software to work more
smoothly or quickly.
Need for Maintenance
Correct faults.
Improve the design.
Implement enhancements.
Accommodate programs so that different hardware,
software, system features, and telecommunications
facilities can be used.
Migrate legacy software: Move old software to newer technology
or platforms.
Retire software: Shut down or remove software that’s no longer
needed or supported
Categories of Software Maintenance
Corrective Maintenance: Fixing bugs and errors after the software is
released.
Adaptive Maintenance: Updating the software so it works with new
environments or technologies.
Preventive Maintenance: Making the software better internally to prevent
future issues.
Perfective Maintenance: Adding new features or improving existing ones
based on user feedback or needs.
Types of Maintenance
Corrective Maintenance: Fixing bugs or problems that are found in the software after it's
been released.
Adaptive Maintenance:
M = P + Ke(c-d)
Belady and Lehman Model
Solution –
Development effort (P) = 500 pm
K = 0.3
c=8
i) d = 0.9
M = P + Ke(c-d)
= 500 + 0.3e(8-0.9) =863.59 pm
ii) d= 0.1
M = P + Ke(c-d)
= 500 + 0.3e(8-0.1) =1309.18 pm
Belady and Lehman Model
• The development effort for a project is 600 PMs. The empirically
determined constant (K) of Belady and Lehman model is 0.5. The
complexity of code is quite high and is equal to 7. Calculate the
total effort expended (M) if maintenance team has reasonable
level of understanding of the project (d=0.7).
M = P + Ke(c-d)
Boehm Model
Boehm used a quantity called Annual Change Traffic(ACT) which is defined
as
“The fraction of a software product’s source instructions which undergo
change during a year either through addition, deletion or modification”.
ACT tells us how much of the software changes in a year, as a percentage
of the total code.
ACT = (KLOC added + KLOC deleted) / KLOC total
The Annual Maintenance Effort (AME) in person-month can be calculated as:
AME = ACT * SDE
Where SDE – Software development effort in person-month
ACT – Annual Change Traffic
Bohem Model
The formula can be modified further by using some Effort Adjustment
Factors(EAF).
The modified equation is given as :
AME = ACT * SDE * EAF
Bohem Model
Example – Annual change traffic (ACT) for a software system is 15 % per
year. The development effort is 600 pms. Compute an estimate for
annual maintenance effort(AME). If life time of the project is 10 years,
what is the total effort of the project.
Soln – AME = ACT * SDE
= 0.15 * 600 = 90 pm
For 10 years AME= 10 * 90 = 900pm
Total effort = 600 + 900 = 1500 pm.
Reverse Engineering
• It’s the process of taking apart a software system to figure out how it works—
especially when:
• The original developers are gone
• There’s little or no documentation
• The code is complex or old
Why Do We Use Reverse Engineering?
Here’s when it’s useful:
Situation Why Reverse Engineering Helps
Old software (legacy systems) Helps understand and maintain old code
❓ Missing documentation Helps recreate lost technical info
🐞 Bug hunting Helps find errors or security issues
🔧 System upgrades Helps plan changes when no one knows how it works
• How Reverse Engineering Works:
1.Code Analysis:
Reverse engineering starts by examining the code of the software. This could involve
looking at the source code (if available) or even analyzing the compiled machine code.
2.Creating Visuals:
Once the code is understood, the next step is often to create diagrams or charts that
show how the system functions. These could include things like:
1. Data flow diagrams (to see how data moves through the system)
2. UML diagrams (to show relationships between different parts of the software)
3.Generating Documentation:
If no documentation exists, reverse engineering helps generate it. This includes
technical specs, design documentation, user manuals, and more.
• Example in Action:
• Imagine a company has an old inventory management system with no
documentation, and they need to add a new feature. The system is
too complex for the new developers to understand, and the original
team is no longer available.
• Through reverse engineering, they analyze the code, understand its
flow, and create a set of diagrams and documents that explain how
the system works. This allows them to confidently make the changes
and ensure the system continues to function correctly.
Reverse Engineering
• Scope and Tasks
• The areas there reverse engineering is applicable include (but not limited to):
1. Program comprehension
2. Redocumentation and/ or document generation
3. Recovery of design approach and design details at any level of abstraction
4. Identifying reusable components
5. Identifying components that need restructuring
6. Recovering business rules, and
7. Understanding high level system description
Reverse Engineering
• 1. Mapping Between Application and Program Domains
• When doing reverse engineering, you try to connect two
worlds:
• 🧭 1. Application Domain (WHAT it does)
• This is the real-world problem the software is solving.
• It’s about user needs, business rules, goals, etc.
• Think: “What is this software supposed to do?”
• 💻 2. Program Domain (HOW it does it)
• This is the actual code written to solve that problem.
• It's the technical side—functions, classes, variables, loops, etc.
• Think: “How did the developers implement that feature in
code?”
• Example:
In a banking application, you might have a feature for checking
an account balance. Mapping would involve looking at the code
that performs calculations and retrieves data from the
database, then linking it to the user interface that displays the
• 2. Mapping Between Concrete (Actual Code) and Abstract Levels(Design)
• Looking at your code and figuring out which design idea it was written for.
• Goal:
Look at the existing code, Understand what each part of the code is
supposed to do in real life, Match the code (concrete) to the idea behind it
(abstract)
• Example:
Let’s say you designed a feature where users can sort their shopping cart
by price. The abstract design describes what should happen (sort items by
price), but the concrete code is the specific code written to actually do the
sorting. Reverse engineering connects the two.
• 3. Rediscovering High-Level Structures
• What it means:
Sometimes, when software is built over time by different teams, its original
design gets lost, and it becomes hard to understand the big picture. Reverse
engineering helps you rediscover that original design or high-level structure,
which tells you how the software was intended to work overall.
• You look at the full system, and try to figure out how everything was meant to
work together, like the big picture.
• Example:
If you have an old inventory system and don't remember how things like the
database and user interface were originally designed to work together, reverse
engineering helps you figure that out again.
• 4. Finding Missing Links Between Program Syntax and Semantics
• What it means:
Code is written in a specific syntax (structure), but just looking at the syntax
doesn’t always explain what the code does. Reverse engineering helps figure out
the meaning (or semantics) of the code—what it’s actually trying to achieve.
• Looking at the code structure (syntax) and figuring out the actual meaning or
purpose behind it (semantics).
• Example:
Imagine you see a complicated piece of code that sorts customer names in a list.
The syntax of the code might be hard to understand at first, but reverse
engineering will help you figure out that the purpose of the code is to display a
sorted list of customers for the user.
Reverse Engineering
when we reverse engineer software (try to understand how it works), we go
through different levels of detail — from very small technical stuff up to the
overall design.
Levels of Reverse Engineering
Reverse Engineers detect low level implementation constructs and replace
them with their high level counterparts.
You start by reading low-level code (like variables, loops, functions). Then
you figure out what higher-level idea it represents (like a payment system,
or login feature)
Reverse Engineering: Levels of
Abstraction
requirements, functional
descriptions
Actual Code
Reverse Engineering
Redocumentation
Redocumentation is the recreation of a semantically equivalent
representation within the same relative abstraction level.
Design recovery
Design recovery entails identifying and extracting meaningful higher-
level abstractions beyond those obtained directly from examination of
the source code. This may be achieved from a combination of code,
existing design documentation, personal experience, and knowledge
of the problem and application domains.
Re-Engineering
• Software re-engineering is the process of analyzing, modifying, and
reconstructing existing (often legacy) software systems to improve their
quality, performance, maintainability, or to adapt them to new
environments — without discarding the entire system.
Starts from scratch Begins with an existing system
Build new
features or Improve, restructure,
systems adapt existing code
Re-Engineering
Type Legacy?
👴 Old, well-tested, documented code ❌ No
🆕 New, rushed code with no docs/tests ✅ Yes
Baseline
Private
Workplace of the
Developer
Baselines
• Software engineering tasks produce one or more SCIs.
• After SCIs are reviewed and approved, they are placed in a project database
(also called a project library or software repository).
• When a member of a software engineering team wants to make a
modification to a baselined SCI, it is copied from the project database into the
engineer's private work space.
• However, this extracted SCI can be modified only if SCM controls are followed.
• The arrows in figure illustrate the modification path for a baselined SCI.
THE SCM PROCESS
• What does SCM actually do?
1.Controls change – Makes sure changes are reviewed, approved, and tracked.
2.Identifies items – Keeps track of all parts (SCIs) of the software, like code files, documents, designs.
3.Handles versions – Tracks every version of the software as it evolves.
4.Audits the configuration – Checks if everything is correct and follows the process.
5.Reports changes – Lets everyone know what changed, why, and by whom.
•How do we manage all the different versions of a program without confusion?
•How do we control changes both before and after releasing the software?
•Who decides which changes are important and should be approved?
•How do we know the change was done right?
•How do we inform the team or customer about the changes?
SCM Process: IDENTIFICATION OF OBJECTS
IN THE SOFTWARE CONFIGURATION
•To control and manage software configuration items, each must be separately named
and then organized using an object-oriented approach.
•Two types of objects can be identified : basic objects and aggregate objects.
•Basic Object
•A single piece of work created during the project.
•Examples:
•A part of a requirements document
•A source code file
•A test case or test suite
•Aggregate Object
•A collection of basic objects (or even other aggregate objects)
•.Example:
•A Design Specification document is an aggregate object. It might include:
•A data modelDescriptions of multiple components
Evolution Graph
Obj is object , can be a
test case, code file,
requirement
Version Control
• Version control combines procedures and tools to manage different
versions of configuration objects that are created during the software
process.
• This is supported by associating attributes with each software version,
and then allowing a configuration to be specified [and constructed] by
describing the set of desired attributes.
• Each node on the graph is an aggregate object, that is, a complete
version of the software.
• Each version of the software is a collection of SCIs (source code,
documents, data), and each version may be composed of different
variants.
• One or more attributes is assigned for each variant.
• For example Interface for android and iOS.
CHANGE CONTROL
• In large software projects, if changes are made without
proper control, things can quickly spiral into confusion and
errors — this is called uncontrolled change, and it leads to
chaos.
• For such projects, change control combines human
procedures and automated tools to provide a mechanism for
the control of change.
• The request is evaluated carefully, based on:
• Technical merit – Is it a good solution?
• Side effects – Could it break something else?
• Impact – What other parts of the system would be affected?
• Cost – How much time and effort will the change take?
Engineering Change
Order (ECO)
CHANGE CONTROL
1. Change Report
•A change report is created to summarize the evaluation.
•It includes details like:
•What the change is
•Why it's needed
•What the impact would be
1. Improved Productivity
2. Better Documentation
3. Improved Accuracy
4. Intangible benefits
5. Improved Quality
6. Reduced Lifetime Maintenance
7. Reduced cost of Software
8. Produce high quality and consistent document
9. Easy to program software
10. Easy project management
11. An increase in project control through better planning,
monitoring and communication.
12. Help standardization of notations and diagrams
13. Reduction of time and effort
Disadvantages of CASE
• Purchasing is not an easy task – Cost is very high.
• Learning curve – Initial productivity may fall. Users may require extra
training to use CASE tools.
• Tool Mix – Proper selection of CASE tools should there to get
maximum benefit.
• May lead to restriction to the tool’s capabilities
Resource Allocation Model
• Putnam first studied the problem of what should
be a proper staffing pattern for software projects.
• He extended the work of Norden who had earlier
investigated the staffing pattern of research and
development (R&D) type of projects.
• In order to appreciate the staffing pattern of
software projects, Norden’s and Putnam’s results
must be understood.
Resource Allocation Model: Norden’s
Work
• Staffing pattern can be approximated by the Rayleigh distribution
curve.
• Norden represented the Rayleigh curve by the following equation:
Cost Drivers Very Low Nominal High Very High Extra High
Low
RELY 0.75 0.88 1.00 1.15 1.40 --
CPLX 0.70 0.85 1.00 1.15 1.30 1.65
ACAP 1.46 1.19 1.00 0.86 0.71
LEXP * 1.15 1.14
EAF = 1.15 * 0.86 *1.07 1.00
1.07 = 1.2169 0.95 -- --
Example (Contd.)
Initial Effort (E) = ab(KLOC)bb * EAF = 3.2*(12)1.05 * 1.2169 = 52.9 person-months
Initial Development Time = cb(E)db =2.5*(52.9)0.38 = 11.29 months
Phase value of µp and τp
Phase wise effort & development time distribution