Rajib Mall Lecture Notes
Rajib Mall Lecture Notes
Rajib Mall Lecture Notes
(Lecture 12)
Dr. R. Mall
Introduction
Software maintenance:
any modifications to a software product after it has been delivered to the customer.
Introduction
Maintenance is inevitable for almost any kind of product. Most products need maintenance:
due to wear and tear caused by use.
Introduction
Many people think
only bad software products need maintenance.
Introduction
Software products need maintenance for three
reasons: corrective adaptive perfective
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:
Perfective
Perfective maintenance:
to support new features required by users. to change some functionality of the system due to customer demands.
8
11
Software evolution
Every software product continues to evolve after its development:
through maintenance efforts.
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
Lehmans first Law: Software products must change continuously, or become progressively less useful.
15
Laws of Maintenance
Lehmans Second Law When software is maintained, its structure degrades,
unless active efforts are made to avoid this phenomenon.
16
All large programs will undergo significant changes during operation phase of their life cycle, regardless of apriori
intentions.
18
Insufficient knowledge
Maintenance team is usually different from development team.
even after reading all documents Also there is a limit to the rate at which a person can study documents
and extract relevant information
20
21
Maintenance Nightmares
Use of gotos Lengthy procedures Poor and inconsistent naming Poor module structure Weak cohesion and high coupling Deeply nested conditional statements Functions having side effects
22
How to do better maintenance? Program understanding Reverse engineering Design recovery Reengineering Maintenance process models
23
Maintenance activities
Two types of activities:
Productive activities:
modification of analysis, design, coding, etc.
Non-productive activities:
understanding system design, code, etc.
24
25
27
Cosmetic changes
Reformat Program Assign Meaningful Names Simplify Conditions
Simplify Processing
Replace GOTOs
28
Cosmetic Changes
Reformat the program:
use any pretty printer program layout the program neatly.
Cosmetic Changes
Replace complex and nested conditional expressions: simpler conditional statements
31
32
34
35
37
38
40
41
Software reengineering
Many aging software products belong to this category. During the reverse engineering,
the old code is analyzed (abstracted) to extract the module specifications.
42
Software reengineering
The module specifications are analyzed
to produce the design.
Software reengineering Forward engineering is carried out to produce the new code. During design, module specification, and coding:
substantial reuse is made from the reverse engineered products.
44
45
Software reengineering
Advantages of reengineering:
produces better design than the original product, produces required documents, often results in higher
efficiency.
46
Software reengineering
Efficiency improvements are brought about by better design.
However, this approach is more costly than the first approach.
47
Software reengineering
48
CASE tools help in software development and maintenance. CASE is a much talked about topic in software industries.
49
50
51
Objectives of CASE
52
CASE Environment
CASE Environment
Tools covering different stages of life cycle share information
(data): they should integrate through some central repository (store) consistent view of development information.
54
55
Programming Environment
Project Manageme nt
Central Repository
Structured Design
Coding Support
Document Generation
Configurati on Manageme nt
Structured Analysis
57
Benefits of CASE
A key benefit of using CASE environment:
cost saving through all developmental phases.
58
Benefits of CASE
Use of CASE tools leads to improvements in quality:
becomes easy to iterate through different software development phases. chances of human error is reduced. CASE tools help produce higher quality and consistent documents.
59
Benefits of CASE
Data relating to a software product are maintained in a central repository:
redundancy in the stored data is reduced. chances of inconsistent documentation is reduced.
60
Benefits of CASE
CASE tools take drudgery out from software engineers work:
engineers need not manually check balancing of the DFDs easily draw diagrams and produce documentation, etc.
61
Benefits of CASE
CASE tools lead to cost saving in software maintenance effort:
traceability and consistency
checks,
Benefits of CASE
Prototyping Support Prototyping CASE tool: often used in graphical user interface (GUI) development,
supports creating a GUI using a graphics editor.
64
Prototyping Support
The user should be allowed to define:
data entry forms, menus and controls.
65
Code Generation
As far as code generation is
concerned: expectations from a CASE tool is low. generation of module skeletons in one or more popular languages. Another reasonable requirement is traceability from source code to design.
68
Code Generation
It should automatically generate header information:
copyright messages, brief description of the module, author name and date of creation, etc.
69
Code Generation
The tool should generate data records or structures automatically: using data dictionary definitions.
It should generate database tables for relational database management systems.
70
Code Generation
The tool should generate code for user interface from the prototype:
for X window and MS window based applications.
71
Testing Support
Static and dynamic program analysis of programs. It should generate test reports in ASCII format:
which can be directly imported into the test plan document.
72
Desirable Features
The tool should work satisfactorily
when many users work simultaneously.
Documentation Support
Desirable Features
The CASE tool should integrate
with commercially available desk-top publishing packages.
75
Project Management
It should support collecting, storing, and analyzing information on the software project's progress:
such as the estimated task duration, scheduled and actual task start, completion date, dates and results of the reviews, etc.
76
External Interface
The tool should allow exchange of information for reusability of design.
The information exported by the tool should preferably be in ASCII format.
77
generating structure chart, DFD, and data dictionary from source code. should populate the data dictionary from source code.
78
79
81
Towards Next Generation CASE Tool An important feature of next generation CASE tools:
be able to support any methodology.
82
83
Customization Support
The user should be allowed to define new types of objects and connections.
This facility may be used to build some special methodologies. Ideally it should be possible to specify the rules of a methodology to a rule engine:
for carrying out the necessary consistency checks.
86
Summary
We discussed some fundamental concepts in software maintenance. Maintenance is the mostly expensive phase in software life cycle:
during development emphasize on maintainability to reduce the maintenance costs.
87
Summary
We discussed software reverse engineering:
extract design from code.
Summary
Maintenance process models:
Process model for small changes Process model for reengineering
We also discussed:
applicability of process models to maintenance projects.
89
Summary
We discussed important features of present day CASE tools:
and the emerging trends.
90
Summary
The trend is now towards:
distributed workstationbased CASE tools.