isbn 0-13-146913-4 prentice-hall, 2006 chapter 11 maintaining the system copyright 2006...

63
ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved.

Upload: brianne-preston

Post on 16-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

ISBN 0-13-146913-4Prentice-Hall, 2006

Chapter 11

Maintaining theSystem

Copyright 2006 Pearson/Prentice Hall. All rights reserved.

Page 2: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.2© 2006 Pearson/Prentice Hall

Contents

11.1 The Changing System11.2 The Nature of Maintenance11.3 Maintenance Problems11.4 Measuring Maintenance Characteristics11.5 Maintenance Techniques and Tools11.6 Software Rejuvenation11.7 Information System Example 11.8 Real Time Example11.9 What this Chapter Means for You

Page 3: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.3© 2006 Pearson/Prentice Hall

Chapter 11 Objectives

• System evolution• Legacy systems• Impact analysis• Software rejuvenation

Page 4: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.4© 2006 Pearson/Prentice Hall

11.1 The Changing System

• Maintenance: any work done to change the system after it is in operation– Software does not degrade or require periodic

maintenance– However, software is continually evolving

• Maintenance process can be difficult

Page 5: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.5© 2006 Pearson/Prentice Hall

11.1 The Changing SystemLehman’s System Types

• S-system: formally defined, derivable from a specification

• P-system: requirements based on approximate solution to a problem, but real-world remains stable

• E-system: embedded in the real world and changes as the world does

Page 6: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.6© 2006 Pearson/Prentice Hall

11.1 The Changing SystemS-System

• Problem solved is related to the real world

Page 7: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.7© 2006 Pearson/Prentice Hall

11.1 The Changing SystemP-System

• The solution produces information that is compared with the problem

Page 8: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.8© 2006 Pearson/Prentice Hall

11.1 The Changing SystemE-System

• It is an integral part of the world it models– The changeability depends on its real-world

context

Page 9: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.9© 2006 Pearson/Prentice Hall

11.1 The Changing SystemChanges During the System Life Cycle

• S-system: un-change• P-system: incremental change• E-system: constant change

Page 10: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.10© 2006 Pearson/Prentice Hall

11.1 The Changing SystemExamples of Change During Software Development

Activity from which Initial change results Artifacts requiring consequent change

Requirements analysis Requirements specification

System design Architectural design specificationTechnical design specification

Program design Program design specification

Program implementation Program codeProgram documentation

Unit testing Test plansTest scripts

System testing Test plansTest scripts

System delivery User documentationOperator documentationSystem guideProgrammer’s guideTraining classes

Page 11: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.11© 2006 Pearson/Prentice Hall

11.1 The Changing SystemThe System Life Span

• Will we need maintenance phase?– Development time vs. maintenance time

• How much change can we expect?– System evolution vs. system decline– Laws of software evolution

Page 12: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.12© 2006 Pearson/Prentice Hall

11.1 The Changing SystemDevelopment Time Vs. Maintenance Time

• Parikh and Zvegintzov (1983)– Development time: 2 years– Maintenance time: 5 to 6 years

• Fjedstad and Hamlen (1979)– 39% of effort in development– 61% of effort in maintenance

• 80-20 rule– 20% of effort in development– 80% of effort in maintenance

Page 13: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.13© 2006 Pearson/Prentice Hall

11.1 The Changing SystemSystem Evolution vs. Decline

• Is the cost of maintenance too high?

• Is the system reliability unacceptable?

• Can the system no longer adapt to further change, and within a reasonable amount of time?

• Is system performance still beyond prescribed constraints?

• Are system functions of limited usefulness?

• Can other systems do the same job better, faster, or cheaper?

• Is the cost of maintaining the hardware great enough to justify replacing it with cheaper, newer hardware?

Page 14: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.14© 2006 Pearson/Prentice Hall

11.1 The Changing SystemLaws of Software Evolution

• Continuing change: leads to less utility• Increasing complexity: structure

deteriorates• Fundamental law of program evolution:

program obeys statistically-determined trends and has invariants

• Conservation of organizational stability: global activity rate is invariant

• Conservation of familiarity: release content is invariant

Page 15: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.15© 2006 Pearson/Prentice Hall

11.1 The Changing SystemSidebar 11.1 Bell Atlantic Replaces Three Systems with One Evolving One

• Sales Service Negotiation System (SSNS)– Replaced three legacy system– The goals of the system changed from order-

taking to needs-based sales– Replaced archaic commands with plain English– Originally written in C and C++, the system was

modified with Java

Page 16: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.16© 2006 Pearson/Prentice Hall

11.2 The Nature of MaintenanceTypes of Maintenance

• Corrective: maintaining control over day-to-day functions

• Adaptive: maintaining control over system modifications

• Perfective: perfecting existing functions• Preventive: preventing system

performance from degrading to unacceptable levels

Page 17: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.17© 2006 Pearson/Prentice Hall

11.2 The Nature of MaintenanceWho Performs Maintenance

• Separate maintenance team– May be more objective– May find it easier to distinguish how a system

should work from how it does work

• Part of development team– Will build the system in a way that makes

maintenance easier– May feel over-confident, and ignore the

documentation to help maintenance effort

Page 18: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.18© 2006 Pearson/Prentice Hall

11.2 The Nature of MaintenanceMaintenance Team Responsibilities

• Understanding the system

• Locating information in system documentation

• Keeping system documentation up-to-date

• Extending existing functions to accommodate new or changing requirements

• Adding new functions to the system

• Finding the source of system failures or problems

• Locating and correcting faults

• Answering questions about the way the system works

• Restructuring design and code components

• Rewriting design and code components

• Deleting design and code components that are no longer useful

• Managing changes to the system as they are made

Page 19: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.19© 2006 Pearson/Prentice Hall

11.2 The Nature of MaintenanceUse of Maintenance Time

• Graphical representation of distribution of maintenance effort (Lientz and Swanson)

Page 20: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.20© 2006 Pearson/Prentice Hall

11.3 Maintenance Problems

• Staff problems– Limited understanding– Management priorities– Morale

• Technical problems– Artifacts and paradigms– Testing difficulties

Page 21: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.21© 2006 Pearson/Prentice Hall

11.3 Maintenance ProblemsSidebar 11.2 The Benefits and Drawbacks of Maintaining OO System

• Benefits– Maintenance changes to a single object class may not affect

the rest of the program– Maintainers can reuse objects easily

• Drawbacks– OO techniques may make programs more difficult to

understand– Multiple parts can make it difficult to understand overall

system behavior– Inheritance can make dependencies difficult to trace– Dynamic binding makes it impossible to determine which of

several methods will be executed– By hiding the details of data structure, program function is

often distributed across several classes

Page 22: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.22© 2006 Pearson/Prentice Hall

11.3 Maintenance ProblemsThe Need to Compromise

• Balancing need for change with the need for keeping the system available to users– The complaint is usually brought by a user or

operator

• Fixing problem quick but inelegant solution, or more involved but elegant way– Solving problem involves only the immediate

correction of a fault

Page 23: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.23© 2006 Pearson/Prentice Hall

11.3 Maintenance ProblemsSidebar 11.3 Balancing Management and Technical Needs at Chase Manhattan

• Relationship Management System (RMS)– Developed by Chemical Bank, and then

modified and merged with Global Management System

– Combined with other systems to eliminate duplication and link hardware platforms and business office

– Windows-based GUI was developed– Modified to allow it to run spreadsheets and

print reports using Microsoft products– Incorporated Lotus Notes

Page 24: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.24© 2006 Pearson/Prentice Hall

11.3 Maintenance ProblemsFactors Affecting Maintenance Approach

• The type of failure• The failure’s criticality or severity• The difficulty of the needed changes• The scope of the needed changes• The complexity of the components being

changed• The number of physical locations at which

the changes must be made

Page 25: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.25© 2006 Pearson/Prentice Hall

11.3 Maintenance ProblemsFactors Affecting Maintenance Effort

• Application type• System novelty• Turnover and maintenance staff ability• System life span• Dependence on a changing environment• Hardware characteristics• Design quality• Code quality• Documentation quality• Testing quality

Page 26: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.26© 2006 Pearson/Prentice Hall

11.3 Maintenance ProblemsModeling Maintenance Effort: Belady and Lehman

• M = p + Kc-d

– M : total maintenance effort– p : productive effort– c: complexity– d : degree of familiarity– K : empirical constant

Page 27: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.27© 2006 Pearson/Prentice Hall

11.3 Maintenance ProblemsModeling Maintenance Effort: COCOMO II

• Size = ASLOC (AA + SU + 0.4DM + 0.3CM + 0.3IM)/100– ASLOC: number of source lines of code to be

adapted– AA: assessment and assimilation effort– SU: amount of software understanding required– DM: percentage of design to be modified– CM: percentage of code to be modified– IM: percentage of external code to be integrated

Page 28: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.28© 2006 Pearson/Prentice Hall

11.3 Maintenance ProblemsCOCOMO II Rating for SU

Very low Low Nominal High Very high

Structure Very low cohesion, high coupling, spaghetti code

Moderately low cohesion, high coupling

Reasonably well structured, some weak areas

High cohesion, low coupling

Strong modularity, information hiding in data and control structure

Application clarity

No match between program and application worldviews

Some correlation between program and application

Moderate correlation between program and application

Good correlation between program and application

Clear match between program and application worldviews

Self descriptiveness

Obscure code; documentation missing, obscure, or obsolete

Some code commentary headers; some useful documentation

Moderate level of code commentary headers, and documentation

Good code commentary and headers; useful documentation; some weak areas

Self descriptive code; documentation up-to-date , well organized, with design rationale

SU increment 50 40 30 20 10

Page 29: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.29© 2006 Pearson/Prentice Hall

11.3 Maintenance ProblemsCOCOMO II Rating AA Effort

Assessment and Assimilation Increment

Level of Assessment and Assimilation Effort

0 None

2 Basic component search and documentation

4 Some component test and evaluation documentation

6 Considerable component test and evaluation documentation

8 Extensive component test and evaluation documentation

Page 30: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.30© 2006 Pearson/Prentice Hall

11.4 Measuring Maintenance Characteristics

• Maintainability is not only restricted to code, but also including specification, design, and test plan documentations

• Maintainability can be viewed in two ways– External view of the software– Internal view of the software

Page 31: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.31© 2006 Pearson/Prentice Hall

11.4 Measuring Maintenance CharacteristicsExternal View of Maintainability

• Necessary data– time at which problem is

reported– time lost due to

administrative delay– time required to analyze

problem– time required to specify

which changes are to be made

– time needed to make the change

– time needed to test the change

– Time needed to document the change

• Desirable data– ratio of total change

implementation time to total number of changes implemented

– number of unresolved problems

– time spent on unresolved problems

– percentage of changes that introduce new faults

– number of components modified to implement a change

Page 32: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.32© 2006 Pearson/Prentice Hall

11.4 Measuring Maintenance CharacteristicsExternal View of Maintainability (continued)

• Graph illustrates the mean time to repair the various subsystems for software at a large British firm

Page 33: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.33© 2006 Pearson/Prentice Hall

11.4 Measuring Maintenance CharacteristicsInternal Attributes Affecting Maintainability

• Cyclomatic number (McCabe, 1976)– The structural complexity of the source code

• linearly independent path– Based on graph theoretic concept

Page 34: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.34© 2006 Pearson/Prentice Hall

11.4 Measuring Maintenance Characteristics Example for Calculating Cyclomatic Number• Consider the following code

Scoreboard::drawscore(int n){

while(numdigits-- > 0} {score[numdigits]->erase();

}// build new score in loop, each time update positionnumdigits = 0;// if score is 0, just display “0”if (n == 0) {

delete score[numdigits];score[numdigits] = new Displayable(digits[0]);score[numdigits]->move(Point((700-numdigits*18),40));score[numdigits]->draw();numdigits++;

}while (n) {

int rem = n % 10;delete score[numdigits];score[numdigits] = new Displayable(digits[rem]);score[numdigits]->move(Point(700-numdigits*18),40));score[numdigits]->draw();n /= 10;numdigits++;

}}

Page 35: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.35© 2006 Pearson/Prentice Hall

11.4 Measuring Maintenance Characteristics Example for Calculating Cyclomatic Number (continued)• Linearly independent path = e - n + 2

– e: edges, n : nodes

Page 36: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.36© 2006 Pearson/Prentice Hall

11.4 Measuring Maintenance CharacteristicsOther Measures

• Classification tree analysis– Identify product measures that are the best predictors of

interface errors

• Fog index: textual products, readability affects maintainability– F = 0.4 X (number of words/number of sentences) +

percentage of words of three or more syllables

• De Young and Kampen readability– R = 0.295a – 0.499b + 0.13c

• a : the average normalized length of variable• b: number of lines containing statements• c : McCabe’s cyclomatic number

Page 37: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.37© 2006 Pearson/Prentice Hall

11.4 Measuring Maintenance CharacteristicsSidebar 11.4 Models of Fault Behavior

• Hatton and Hopkins (1989) studied the NAG Fortran scientific subroutine library – Smaller components contained proportionately

more faults than larger ones

• They notes similar evidence – at Siemens– Ada code at Unisys– Fortran products at NASA Goddard

Page 38: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.38© 2006 Pearson/Prentice Hall

11.4 Measuring Maintenance CharacteristicsSidebar 11.5 Maintenance Measures at Hewlett-Packard

• Used maintainability index– Index was calibrated with a large number of

metrics– A tailored polynomial index was calculated

using extended cyclomatic number, lines of code, number of comments, and an effort measure

– The polynomial was applied to 714 components containing 236,000 lines of C code developed by third party

Page 39: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.39© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and Tools

• Configuration management– Configuration control board– Change control

• Impact analysis• Automated maintenance tools

Page 40: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.40© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and ToolsConfiguration Control Process• Problem discovered by or change requested by

user/customer/developer, and recorded• Change reported to the configuration control board• CCB discusses problem: determines nature of

change, who should pay• CCB discusses source of problem, scope of change,

time to fix; they assign severity/priority and analyst to fix

• Analyst makes change on test copy• Analyst works with librarian to control installation

of change• Analyst files change report

Page 41: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.41© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and ToolsChange Control Issues• Synchronization: When was the change made?• Identification: Who made the change?• Naming: What components of the system were

changed?• Authentication: Was the change made correctly?• Authorization: Who authorized that the change be

made?• Routing: Who was notified of the change?• Cancellation: Who can cancel the request for

change?• Delegation: Who is responsible for the change?• Valuation: What is the priority of the change?

Page 42: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.42© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and Tools Impact Analysis

• The evaluation of many risks associated with the change, including estimates of effects on resources, effort, and schedule

• Helps control maintenance cost

Page 43: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.43© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and Tools Software Maintenance Activities

• Graph illustrates the activities performed when a change is requested

Page 44: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.44© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and Tools Measuring Impact of Change

• Workproduct: any development artifact whose change is significant

• Horizontal traceability: relationships of components across collections of workproducts

• Vertical traceability: relationships among parts of a workproduct

Page 45: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.45© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and Tools Horizontal Traceability

• Graph illustrates how the graphical relationships and traceability links among related workproducts are determined

Page 46: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.46© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and ToolsUnderlying Graph for Maintenance

Page 47: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.47© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and ToolsSidebar 11.6 Applying Traceability to Real-World System• Five kinds of traceability

– object-to-object– association-to-association– use case-to-use case– use case-to-object– two-dimensional object-to-object

• How tracing is performed– Using explicit links– Using textual references to different documents– Using names and concepts that are the same and similar– Using knowledge and domain knowledge

Page 48: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.48© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and ToolsAutomated Maintenance Tools

• Text editors• File comparators• Compilers and linkers• Debugging tools• Cross-reference generators• Static code analyzers• Configuration management repositories

Page 49: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.49© 2006 Pearson/Prentice Hall

11.5 Maintenance Techniques and ToolsSidebar 11.7 Panvalet

• Incorporates the source code, object code, control language, and data files needed to run a system

• Controls more than one version of a system– A single version is designated as the production

version, and no one is allowed to alter it

• Places the version number and date of last change on the compiler listing and object module automatically when a file is compiled

• Has reporting, backup, and recovery features, plus three levels of security access

Page 50: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.50© 2006 Pearson/Prentice Hall

11.6 Software Rejuvenation

• Redocumentation: static analysis adds more information

• Restructuring: transform to improve code structure

• Reverse engineering: recreate design and specification information from the code

• Reengineering: reverse engineer and then make changes to specification and design to complete the logical model; then generate new system from revised specification and design

Page 51: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.51© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationTaxonomy

• Graph illustrates the relationship among the four types of rejuvenation

Page 52: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.52© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationRedocumentation

• Begins by submitting the code to an analysis tool

• Output may include:– component calling relationships– data-interface tables– data-dictionary information– data flow tables or diagrams– control flow tables or diagrams– pseudocode– test paths– component and variable cross-references

Page 53: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.53© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationRedocumentation Process

• Graph illustrates redocumentation process

Page 54: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.54© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationRestructuring Activities

• Interpreting the source code and representing it internally

• Simplifying the internal representation• Regenerating structured code

Page 55: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.55© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationRestructuring Activities (continued)

• Graph illustrates the three major activities involved in restructuring

Page 56: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.56© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationReverse Engineering

• Attempting to recover engineering information based on software specification and design methods

• Obstacles remain before reverse engineering can be used universally– Real time system problem– Extremely complex system

Page 57: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.57© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationReverse Engineering Process

• Graph depicts the reverse-engineering process

Page 58: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.58© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationReengineering

• An extension of reverse engineering– produces new software code without changing

the overall system function

• Reengineering steps– The system is reverse-engineered– The software system is corrected or completed– The new system is generated

Page 59: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.59© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationReengineering Process

• Graph illustrates the steps in reengineering process

Page 60: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.60© 2006 Pearson/Prentice Hall

11.6 Software RejuvenationSidebar 11.8 Reengineering Effort

• The U.S National Institute of Standard and Technology (NIST) studied the results of reengineering 13,131 lines of COBOL source statements using automatic translation– Entire reengineering effort took 35 person-month

• Boehm point out that original COCOMO model estimated 152 person months for reengineering the same type of system, clearly unacceptable level of accuracy– COCOMO II has been revised to include a factor

for automatic translation

Page 61: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.61© 2006 Pearson/Prentice Hall

11.7 Information System ExamplePiccadilly System

• The software can not be an S-system – the problem may change dramatically

• The software can not be a P-system– P-system requires a stable abstraction, while

Piccadilly changes constantly

• The software must be E-system– The system is an integral part of the world it

models

Page 62: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.62© 2006 Pearson/Prentice Hall

11.8 Real-Time ExampleAriane-5

• Developers focused on mitigating random failure– The inertial reference system failed because of

a design fault, not a result of a random failure

• Needs to change the failure strategy and implement a series of preventive enhancements

• Invokes change control and configuration management

Page 63: ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 11 Maintaining the System Copyright 2006 Pearson/Prentice Hall. All rights reserved

Pfleeger and Atlee, Software Engineering: Theory and Practice

Page 11.63© 2006 Pearson/Prentice Hall

11.9 What this Chapter Means for You

• The more a system is linked to the real world, the more likely it will change and the more difficult it will be to maintain

• Maintainers have many jobs in addition to software developers

• Measuring maintainability is difficult• Impact analysis builds and tracks links among the

requirements, design, code, and test cases• Software rejuvenation involves redocumenting,

restructuring, reverse engineering, and reengineering