Software evolution To explain why change is inevitable if software systems are to remain useful To discuss software maintenance and maintenance cost factors To describe the processes involved in software evolution To discuss an approach to
Trang 1©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 1
Software evolution
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 2
Objectives
To explain why change is inevitable if software systems are to remain useful
To discuss software maintenance and maintenance cost factors
To describe the processes involved in software evolution
To discuss an approach to assessing evolution strategies for legacy systems
Topics covered
Program evolution dynamics
Evolution processes
Legacy system evolution
Trang 2©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 4
Software change
• New requirements emerge when the software is used;
• The business environment changes;
• Errors must be repaired;
• New computers and equipment is added to the system;
• The performance or reliability of the system may have to
be improved.
managing change to their existing software systems
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 5
Importance of evolution
Organisations have huge investments in their software systems - they are critical business assets
To maintain the value of these assets to the business, they must be changed and updated
The majority of the software budget in large companies is devoted to evolving existing software rather than developing new software
Spiral model of evolution
Specification Implemention
Validation Operation
Star t Release 1
Release 2 Release 3
Trang 3©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 7
Program evolution dynamics is the study of the processes of system change
After major empirical studies, Lehman and Belady proposed that there were a number
of ‘laws’ which applied to all systems as they evolved
There are sensible observations rather than laws They are applicable to large systems developed by large organisations Perhaps less applicable in other cases
Program evolution dynamics
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 8
Lehman’s laws
Continuing change A p rogram that is used in a real-world environment necessarily
environment.
Increasing complexity As an evolving program changes, its structure tends to become
and simplifying the structure.
Large program evolution Program evolution is a self-regulating process System
attributes such as size , time between relea ses and the number of
rele ase.
Organisational stability Over a programÕs lifetime, its rate of development is
approximately constant and independent of the resources
devoted to system development.
Conservation of
familiarity
Over the lifetime of a system, the incremental change in each
rele ase is approximately co nstant.
Continuing growth The functionality offered by systems has to continually increase
to maintain user satisfaction.
Declining quality The quality of systems will appear to be declining unless they
are adapted to changes in their operational environment.
Feedback system Evolution processes incorporate multi-agent, multi-loop
feedback systems and you have to treat them as feedback
systems to achieve significant product improvement.
Applicability of Lehman’s laws
large, tailored systems developed by large organisations
• Confirmed in more recent work by Lehman on the FEAST project (see further reading on book website).
• Shrink-wrapped software products;
• Systems that incorporate a significant number of COTS components;
• Small organisations;
• Medium sized systems.
Trang 4©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 10
Modifying a program after it has been put into use
Maintenance does not normally involve major changes to the system’s architecture
Changes are implemented by modifying existing components and adding new components to the system
Software maintenance
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 11
while the system is being developed because the environment is changing Therefore a delivered system won't meet its requirements!
When a system is installed in an
environment it changes that environment and therefore changes the system requirements
are to remain useful in an environment
Maintenance is inevitable
• Changing a system to correct deficiencies in the way meets its requirements.
operating environment
• Changing a system so that it operates in a different environment (computer, OS, etc.) from its initial implementation.
functionality
• Modifying the system to satisfy new requirements.
Types of maintenance
Trang 5©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 13
Distribution of maintenance effort
Functionality addition or modification (65%)
Fault repair
(17%)
Software
adaptation
(18%)
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 14
100* depending on the application)
factors
Maintenance corrupts the software structure so makes further maintenance more difficult
(e.g old languages, compilers etc.)
Maintenance costs
Development/maintenance costs
0 5 0 1 00 15 0 200 2 50 3 00 35 0 400 45 0 500
System 1
System 2
De velopment costs Maintenance costs
$
Trang 6©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 16
• Maintenance costs are reduced if the same staff are involved with them for some time.
• The developers of a system may have no contractual responsibility for maintenance so there is no incentive to design for future change.
• Maintenance staff are often inexperienced and have limited domain knowledge.
• As programs age, their structure is degraded and they become harder to understand and change.
Maintenance cost factors
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 17
Maintenance prediction
which parts of the system may cause problems and have high maintenance costs
• Change acceptance depends on the maintainability of the components affected by the change;
• Implementing changes degrades the system and reduces its maintainability;
• Maintenance costs depend on the number of changes and costs of change depend on maintainability.
Maintenance prediction
Predicting maintainability
Predicting system
changes Predicting maintenance costs
What will be the lifetime system?
What will be the costs of maintaining this system over the next year?
What par ts of the system willbethemostexpensive
to maintain?
How many change
requests can be
expected?
Whatpar tsofthesystemare
mostlikelytobeaffectedby
change requests?
Trang 7©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 19
Change prediction
understanding of the relationships between a system and its environment
the environment is changed
• Number and complexity of system interfaces;
• Number of inherently volatile system requirements;
• The business processes where the system is used.
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 20
Complexity metrics
assessing the complexity of system components
spent on a relatively small number of system components
• Complexity of control structures;
• Complexity of data structures;
• Object, method (procedure) and module size.
Process metrics
assess maintainability
request;
If any or all of these is increasing, this may indicate a decline in maintainability
Trang 8©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 22
Evolution processes
Evolution processes depend on
involved
Proposals for change are the driver for system evolution Change identification and evolution continue throughout the system lifetime
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 23
Change identification and evolution
Change proposals New system
Change identification process
Software evolution process
The system evolution process
Release planning
Change implementa tion
System release Impact
anal ysis
Change
Platform adaptation
System enhancement Fault repair
Trang 9©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 25
Change implementation
Requir ements upda ting
Software
de velopment Requirements
anal ysis
Proposed
changes
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 26
Urgent change requests
implemented without going through all stages of the software engineering process
OS upgrade) have unexpected effects;
very rapid response (e.g the release of a competing product)
Emergency repair
Modify sour ce code
Deliver modified system Analys e
sour ce code
Change
Trang 10©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 28
System re-engineering
legacy system without changing its
functionality
of a larger system require frequent
maintenance
them easier to maintain The system may be re-structured and re-documented
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 29
Advantages of reengineering
development There may be development problems, staffing problems and specification problems
less than the costs of developing new software
Forward and re-engineering
Understanding and transf orma tion Existing
softw are system
Re-eng ineer ed system
Design and implementation System
specifica tion
Ne w system
Softw ar e r e-eng ineering
Forw ard eng ineering
Trang 11©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 31
The re-engineering process
Reverse
eng ineering
Prog ram documentation
Data re-eng ineering Original data
Prog ram
structure
improvement
Prog ram modularisation
Structured prog ram
Re-eng ineered data
Modularised prog ram Original
prog ram
Source code
translation
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 32
Reengineering process activities
• Convert code to a new language.
• Analyse the program to understand it;
• Restructure automatically for understandability;
• Reorganise the program structure;
• Clean-up and restructure system data.
Re-engineering approaches
Automa ted r estructuring with man ual changes Automa ted sour ce
code con version
Restructuring plus architectur al changes
Automa ted pr og ram
restructuring
Pro gram and da ta restructuring
Increased cost
Trang 12©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 34
Reengineering cost factors
The quality of the software to be
reengineered
The tool support available for reengineering
The extent of the data conversion which is required
The availability of expert staff for
reengineering
on technology that is no longer widely used
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 35
Legacy system evolution
choose a strategy for evolving these systems
• Scrap the system completely and modify business processes so that it is no longer required;
• Continue maintaining the system;
• Transform the system by re-engineering to improve its maintainability;
• Replace the system with a new system.
quality and its business value
System quality and business value
1
2
6 7 8 9
1 0
System quality
High business value
Low quality High business value
High quality
Low business value
Low quality
Low business value High quality
Trang 13©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 37
Legacy system categories
• These systems should be scrapped.
• These make an important business contribution but are expensive to maintain Should be re-engineered or replaced if a suitable system is available.
• Replace with COTS, scrap completely or maintain.
• Continue in operation using normal system maintenance.
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 38
Business value assessment
Assessment should take different viewpoints into account
Interview different stakeholders and collate results
System quality assessment
the current goals of the business?
how expensive is it to maintain?
Application assessment
system?
Trang 14©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 40
Business process assessment
answers from system stakeholders
• Is there a defined process model and is it followed?
• Do different parts of the organisation use different processes for the same function?
• How has the process been adapted?
• What are the relationships with other business processes and are these necessary?
• Is the process effectively supported by the legacy application software?
business value because of the widespread use of web-based ordering
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 41
Environment assessment 1
Factor Questions
Supplier
stability
Is the supplier is still in existence? Is the supplier financ ially stable and likely to continue in existence? If the supplier is
no longer in business, does so meone else maintain the
systems?
Failure rate Does the hardware have a high rate of reported failures? Does the support software c rash and force system restarts? Age How old is the hardw are and software? The older the
hardwa re and support software, the more obsolete it will be.
It may still function co rrectly but there cou ld be significant econo mic and business bene fits to moving to more modern systems.
Performance Is the pe rformance of the system adequa te? Do performance problems have a significant effect on system users?
Environment assessment 2
Suppor t
requ irements
What local support is required by the hardwa re and software? If ther e are high costs associated with this support,
it may be wor th cons idering system replacement.
Maintenance
costs
What are the costs of hardware maintenanc e and suppo rt software licence s? Older hardware may have higher maintenanc e costs than modern systems Suppor t software may have h igh annua l licensing costs.
Interoperability Are there problems interfacing the system to other systems?
Can compilers etc be used with current versions of the operating system? Is hardw are emulation required?
Trang 15©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 43
Application assessment 1
Factor Questions
Understandability How difficult is it to understand the source code of the
current system? How complex are the control structures
reflect their function?
Docu mentation What system docu mentation is available? Is the
docu mentation complete, consistent and up-to-date?
Data Is there an explicit data model for the system? To what
extent is data duplicated in different files? Is the data used
by the system up-to-date and consistent?
Performance Is the performance of the application adequate? Do
performance problems have a significant effect on system users?
©Ian Sommerville 2004 Software Engineering, 7th edition Chapter 21 Slide 44
Application assessment 2
Programmi ng
language
Are modern co mpilers available for the prog rammi ng language used to deve lop the system? Is the programmi ng language still used fo r new system deve lopment?
Configuration
manage ment
Are all versions of all parts of the system managed by a configuration manage ment system? Is there an explicit description of the versions of componen ts that are used in the current system?
Test data Does test data for the system exist? Is there a re cord of
regression tests carried out when new features have been added to the system?
Personne l skills Are there peop le available who hav e the skills to maintain
the application? Are there only a limited numb er of peop le who under stand the system?
System measurement
You may collect quantitative data to make an assessment of the quality of the application system
the system;