0% found this document useful (0 votes)
16 views45 pages

Software Maintenance in Engineering

Uploaded by

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

Software Maintenance in Engineering

Uploaded by

v67904413
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Software Engineering (3rd ed.), By K.

K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 1
Software Maintenance

What is Software Maintenance?


Software Maintenance is a very broad activity that includes error
corrections, enhancements of capabilities, deletion of obsolete capabilities,
and optimization.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 2
Software Maintenance
Categories of Maintenance

 Corrective maintenance
This refer to modifications initiated by defects in the software.

 Adaptive maintenance
It includes modifying the software to match changes in the ever changing
environment.

 Perfective maintenance
It means improving processing efficiency or performance, or restructuring
the software to improve changeability. This may include enhancement of
existing system functionality, improvement in computational efficiency etc.
Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 3
Software Maintenance

 Other types of maintenance

There are long term effects of corrective, adaptive and perfective changes.
This leads to increase in the complexity of the software, which reflect
deteriorating structure. The work is required to be done to maintain it or to
reduce it, if possible. This work may be named as preventive
maintenance.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 4
Software Maintenance
Corr
ectiv
e (2 1% Perfective
)
Adaptive
Preventive
Corrective

Prev
ent iv
e( 4% ) Perf e
ct ive
(50%
)

Ada p
tive (
2 5%)

Fig. 1: Distribution of maintenance effort

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 5
Software Maintenance
Problems During Maintenance
 Often the program is written by another person or group of persons.

 Often the program is changed by person who did not understand it


clearly.

 Program listings are not structured.

 High staff turnover.

 Information gap.

 Systems are not designed for change.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 6
Software Maintenance
Maintenance is Manageable
A common misconception about maintenance is that it is not manageable.
Report of survey conducted by Lientz & Swanson gives some interesting
observations:
1 Emergency debugging 12.4%
2 Routine debugging 9.3%
3 Data environment adaptation 17.3%
4 Changes in hardware and OS 6.2%
5 Enhancements for users 41.8%
6 Documentation Improvement 5.5%
7 Code efficiency improvement 4.0%
8 Others 3.5%

Table 1: Distribution of maintenance effort


Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 7
Software Maintenance

Kinds of maintenance requests

1 New reports 40.8%


2 Add data in existing reports 27.1%
3 Reformed reports 10%
4 Condense reports 5.6%
5 Consolidate reports 6.4%
6 Others 10.1%

Table 2: Kinds of maintenance requests

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 8
Software Maintenance

Potential Solutions to Maintenance Problems

 Budget and effort reallocation

 Complete replacement of the system

 Maintenance of existing system

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 9
Software Maintenance
The Maintenance Process

Fig. 2: The software


maintenance process

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 10
Software Maintenance

 Program Understanding
The first phase consists of analyzing the program in order to understand.

 Generating Particular Maintenance Proposal


The second phase consists of generating a particular maintenance
proposal to accomplish the implementation of the maintenance objective.

 Ripple Effect
The third phase consists of accounting for all of the ripple effect as a
consequence of program modifications.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 11
Software Maintenance

 Modified Program Testing


The fourth phase consists of testing the modified program to ensure that
the modified program has at least the same reliability level as before.

 Maintainability
Each of these four phases and their associated software quality attributes
are critical to the maintenance process. All of these factors must be
combined to form maintainability.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 12
Software Maintenance
Maintenance Models
 Quick-fix Model
This is basically an adhoc approach to maintaining software. It is a fire
fighting approach, waiting for the problem to occur and then trying to fix it
as quickly as possible.
Problem
found

Fix it

Fig. 3: The quick-fix model


Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 13
Software Maintenance

 Iterative Enhancement Model

 Analysis

 Characterization of proposed modifications

 Redesign and implementation

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 14
Software Maintenance

Analyze existing system

Redesign current Characterize


version and proposed
implementation modifications

Fig. 4: The three stage cycle of iterative enhancement

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 15
Software Maintenance

 Reuse Oriented Model


The reuse model has four main steps:

1. Identification of the parts of the old system that are candidates for
reuse.
2. Understanding these system parts.
3. Modification of the old system parts appropriate to the new
requirements.
4. Integration of the modified parts into the new system.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 16
Software Maintenance

Old system New system

Requirements analysis Requirements analysis

Components
Design library Design

Source code Source code

Test data Test data

Fig. 5: The reuse model

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 17
Software Maintenance

 Boehm’s Model

Boehm proposed a model for the maintenance process based upon


the economic models and principles.

Boehm represent the maintenance process as a closed loop cycle.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 18
Software Maintenance

Management decisions

Proposed changes Approved changes

Change
Evaluation
implementation

Results New version of


software

Fig. 6: Boehm’s model

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 19
Software Maintenance
 Taute Maintenance Model
It is a typical maintenance model and has eight phases in cycle fashion. The
phases are shown in Fig. 7

Fig. 7: Taute maintenance model


Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 20
Software Maintenance
Phases :

1. Change request phase

2. Estimate phase

3. Schedule phase

4. Programming phase

5. Test phase

6. Documentation phase

7. Release phase

8. Operation phase

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 21
Software Maintenance
Estimation of maintenance costs

Phase Ratio

Analysis 1

Design 10

Implementation 100

Table 3: Defect repair ratio

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 22
Software Maintenance

Reverse Engineering
Reverse engineering is the process followed in order to find difficult,
unknown and hidden information about a software system.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 40
Software Maintenance
 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

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 41
Software Maintenance
Reverse Engineering encompasses a wide array of tasks related to understanding
and modifying software system. This array of tasks can be broken into a number of
classes.

 Mapping between application and program domains

Problem/
application domain

Mapping

Programming/
implement domain

Fig. 10: Mapping between application and domains program


Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 42
Software Maintenance

 Mapping between concrete and abstract levels

 Rediscovering high level structures

 Finding missing links between program syntax and


semantics
 To extract reusable component

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 43
Software Maintenance

 Levels of Reverse Engineering

Reverse Engineers detect low level implementation constructs and replace


them with their high level counterparts.

The process eventually results in an incremental formation of an overall


architecture of the program.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 44
Software Maintenance

Fig. 11: Levels of abstraction

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 45
Software Maintenance

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.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 46
Software Maintenance

Software RE-Engineering
Software re-engineering is concerned with taking existing legacy systems
and re-implementing them to make them more maintainable.

The critical distinction between re-engineering and new software


development is the starting point for the development as shown in Fig.12.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 47
Software Maintenance

Existing
System
software
specification
system

Understanding
Design and
and
implementation
transformation

New system Re-engineered


system

Fig. 12: Comparison of new software development with re-engineering


Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 48
Software Maintenance
The following suggestions may be useful for the modification of the legacy
code:
 Study code well before attempting changes
 Concentrate on overall control flow and not coding
 Heavily comment internal code
 Create Cross References
 Build Symbol tables
 Use own variables, constants and declarations to localize the effect
 Keep detailed maintenance document
 Use modern design techniques

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 49
Software Maintenance

 Source Code Translation


1. Hardware platform update: The organization may wish to
change its standard hardware platform. Compilers for the original
language may not be available on the new platform.

2. Staff Skill Shortages: There may be lack of trained


maintenance staff for the original language. This is a particular
problem where programs were written in some non standard
language that has now gone out of general use.

3. Organizational policy changes: An organization may decide to


standardize on a particular language to minimize its support
software costs. Maintaining many versions of old compilers can
be very expensive.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 50
Software Maintenance

 Program Restructuring

1. Control flow driven restructuring: This involves the imposition


of a clear control structure within the source code and can be
either inter modular or intra modular in nature.

2. Efficiency driven restructuring: This involves restructuring a


function or algorithm to make it more efficient. A simple example
is the replacement of an IF-THEN-ELSE-IF-ELSE construct with
a CASE construct.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 51
Software Maintenance

Fig. 13: Restructuring a program

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 52
Software Maintenance
Configuration Management
The process of software development and maintenance is controlled is
called configuration management. The configuration management is
different in development and maintenance phases of life cycle due to
different environments.

 Configuration Management Activities


The activities are divided into four broad categories.
1. The identification of the components and changes
2. The control of the way by which the changes are made
3. Auditing the changes
4. Status accounting recording and documenting all the activities
that have take place
Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 54
Software Maintenance
The following documents are required for these activities

 Project plan
 Software requirements specification document
 Software design description document
 Source code listing
 Test plans / procedures / test cases
 User manuals

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 55
Software Maintenance
 Software Versions
Two types of versions namely revisions (replace) and variations (variety).

Version Control :

A version control tool is the first stage towards being able to manage
multiple versions. Once it is in place, a detailed record of every version of
the software must be kept. This comprises the

 Name of each source code component, including the variations and


revisions
 The versions of the various compilers and linkers used
 The name of the software staff who constructed the component
 The date and the time at which it was constructed

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 56
Software Maintenance

 Change Control Process


Change control process comes into effect when the software and
associated documentation are delivered to configuration management
change request form (as shown in fig. 14), which should record the
recommendations regarding the change.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 57
Software Maintenance

Fig. 14: Change request form


Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 58
Software Maintenance

Documentation
Software documentation is the written record of the facts about a
software system recorded with the intent to convey purpose, content
and clarity.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 59
Software Maintenance
 User Documentation
[Link]. Document Function
1. System Overview Provides general description of system’s functions.
2. Installation Guide Describes how to set up the system, customize it to
local hardware needs and configure it to particular
hardware and other software systems.

3. Beginner’s Guide Provides simple explanations of how to start using


the system.

4. Reference Guide Provides in depth description of each system facility


and how it can be used.
5. Enhancement Booklet Contains a summary of new features.
6. Quick reference card Serves as a factual lookup.
7. System administration Provides information on services such as net-
working, security and upgrading.

Table 5: User Documentation


Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 60
Software Maintenance

 System Documentation

It refers to those documentation containing all facets of system, including


analysis, specification, design, implementation, testing, security, error
diagnosis and recovery.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 61
Software Maintenance
 System Documentation
[Link]. Document Function
1. System Rationale Describes the objectives of the entire system.
2. SRS Provides information on exact requirements of
system as agreed between user and developers.

3. Specification/ Design Provides description of:


(i) How system requirements are implemented.
(ii) How the system is decomposed into a set of
interacting program units.
(iii) The function of each program unit.
4. Implementation Provides description of:
(i) How the detailed system design is expressed in
some formal programming language.
(ii) Program actions in the form of intra program
comments.

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 62
Software Maintenance

[Link]. Document Function

5. System Test Plan Provides description of how program units are


tested individually and how the whole system is
tested after integration.

6. Acceptance Test Plan Describes the tests that the system must pass
before users accept it.

7. Data Dictionaries Contains description of all terms that relate to the


software system in question.

Table 6: System Documentation

Software Engineering (3rd ed.), By K.K Aggarwal & Yogesh Singh, Copyright © New Age International Publishers, 2007 63

You might also like