Documente Academic
Documente Profesional
Documente Cultură
2
Introduction
• Maintenance is inevitable for almost
any kind of product.
• Most products need maintenance:
due to wear and tear caused by use.
3
Introduction
• Many people think
only bad software products need
maintenance.
• The opposite is true:
bad products are thrown away,
good products are maintained and used
for a long time.
4
Introduction
•Software products need
maintenance for three reasons:
corrective
adaptive
perfective
5
Corrective
•Corrective maintenance of a
software product:
to correct bugs observed while
the system is in use.
to enhance performance of the
product.
6
Adaptive
• A software product needs maintenance
(porting) when customers:
need the product to run on new
platforms,
• or, on new operating systems,
need the product to interface with
new hardware or software.
7
Perfective
•Perfective maintenance:
to support new features required
by users.
to change some functionality
of the system due to customer
demands.
8
Maintenance Effort Distribution
Perfective
Adaptive
Corrective
9
Causes for maintenance
• During development:
Software not anticipated to last very
long (e.g., Y2K problem).
• Rate of hardware obsolescence:
immortality of software products
maintenance necessary for software
performing low-level functions.
10
Causes for maintenance
•Users want existing software
to run on new platforms:
to run in new environments,
and/or with enhanced features.
11
Causes for maintenance
• Whenever other software it works
with change:
maintenance is needed to cope up
with the newer interface.
For instance, a software product may
need maintenance when the
operating system changes.
12
Software evolution
• Every software product continues to
evolve after its development:
through maintenance efforts.
• Larger software products stay in
operation for longer time:
because of high replacement cost.
13
Laws of Maintenance
• There will always be a lot
of old software needing
maintenance.
• Good products are
maintained, bad products
are thrown away.
14
Laws of Maintenance
•Lehman’s first Law:
•“Software products must
change continuously, or
become progressively less
useful.”
15
Laws of Maintenance
•Lehman’s Second Law
•“When software is maintained,
its structure degrades,
unless active efforts are made to
avoid this phenomenon.”
16
Laws of Maintenance
•Lehman’s Third Law:
•“Over a program’s life time,
its rate of development is
approximately constant.”
17
How to do better maintenance?
• Program understanding
• Reverse engineering
• Design recovery
• Reengineering
• Maintenance process models
18
Maintenance activities
• Two types of activities:
Productive activities:
• modification of analysis, design, coding,
etc.
Non-productive activities:
• understanding system design, code, etc.
19
Software Reverse Engineering
20
Software Reverse Engineering
21
Software Reverse Engineering
22
Cosmetic changes
Assign Meaningful
Reformat Program
Names
Simplify Conditions
23
Cosmetic Changes
• Reformat the program:
use any pretty printer program
layout the program neatly.
• Give more meaningful names to:
Variables, data structures, and
functions.
24
Cosmetic Changes
• Replace complex and nested
conditional expressions:
simpler conditional statements
whenever appropriate use
case statements.
25
Software Reverse Engineering
26
Software Reverse Engineering
27
Software Maintenance Process Models 1
28
Software Maintenance Process Model - 2
29
Software Maintenance Process Model - 3
30
Software Maintenance Process Model 4
31
Software Maintenance Process Model 5
32
Software Maintenance Process Model 6
33
Software Maintenance Process Model 7
34
Software Maintenance Process Model 8
35
Software Maintenance Process Model 9
• Preferable when:
amount of rework is significant
software has poor structure.
• Can be represented by a reverse
engineering cycle:
followed by a forward engineering cycle.
36
Software reengineering 1
37
Software reengineering 2
• The module specifications are analyzed
to produce the design.
• The design is analyzed (abstracted)
to produce the original requirements specification.
• The change requests are then applied to the
requirements specification:
arrive at the new requirements specification.
38
Software reengineering 3
39
Process model for Software reengineering
Change Requirements
Design Design
Code Code
40
Software reengineering 4
•Advantages of reengineering:
produces better design than the
original product,
produces required documents,
often results in higher efficiency.
41
Software reengineering 5
42
Software reengineering 6
• Reengineering is preferable
when:
amount of rework is high,
product exhibits high failure rate.
product difficult to understand.
43
Maintenance Cost Estimation
COCOMO Model
• COCOMO (COnstructive COst MOdel)
proposed by Boehm.
• Divides software product
developments into 3 categories:
Organic
Semidetached
Embedded
45
COCOMO Product classes
• Organic:
Relatively small groups
• working to develop well-understood applications.
• Semidetached:
Project team consists of a mixture of experienced and inexperienced staff.
• Embedded:
The software is strongly coupled to complex hardware, or real-time systems.
47
COCOMO Model (CONT.)
48
COCOMO Model (CONT.)
49
Basic COCOMO Model (CONT.)
• Organic :
Effort = 2.4 (KLOC)1.05 PM
• Semi-detached:
Effort = 3.0(KLOC)1.12 PM
• Embedded:
Effort = 3.6 (KLOC)1.20PM
51
Development Time Estimation
• Organic:
Tdev = 2.5 (Effort)0.38 Months
• Semi-detached:
Tdev = 2.5 (Effort)0.35 Months
• Embedded:
Tdev = 2.5 (Effort)0.32 Months
52
Basic COCOMO Model (CONT.)
• Effort is Effort
somewhat super-
linear in problem
size.
Size
53
Basic COCOMO Model (CONT.)
• Development time
sublinear function of
Dev. Time
product size.
• When product size
18 Months
increases two times,
development time does 14 Months
not double.
• Time taken: 30K 60K
Size
almost same for all the
three product
categories.
54
Basic COCOMO Model (CONT.)
55
Basic COCOMO Model (CONT.)
• Effort = 2.4*(32)1.05 = 91 PM
• Nominal development time = 2.5*(91)0.38 = 14
months
57
Intermediate COCOMO
• Basic COCOMO model assumes
effort and development time depend on product size alone.
58
Intermediate COCOMO
• For accurate estimation,
the effect of all relevant parameters
must be considered:
Intermediate COCOMO model recognizes
this fact:
• refines the initial estimate obtained by the
basic COCOMO by using a set of 15 cost
drivers (multipliers).
59
Intermediate COCOMO (CONT.)
60
Intermediate COCOMO (CONT.)
61
Intermediate COCOMO (CONT.)
62
Shortcoming of basic and intermediate
COCOMO models
• Both models:
consider a software product as a single homogeneous entity:
However, most large systems are made up of several smaller sub-systems.
• Some sub-systems may be considered as organic type, some may be
considered embedded, etc.
• for some the reliability requirements may be high, and so on.
63
Complete COCOMO
• Cost of each sub-system is estimated
separately.
• Costs of the sub-systems are added to
obtain total cost.
• Reduces the margin of error in the
final estimate.
64
Complete COCOMO Example
65