0% found this document useful (0 votes)
10 views31 pages

335e27 - Week 1

The document discusses software re-engineering as a cost-effective approach for system evolution, outlining its processes and activities. Key concepts include source code translation, reverse engineering, program structure improvement, program modularization, and data re-engineering. The aim is to enhance system structure for better understanding and maintenance, addressing issues such as outdated systems and the need for improved documentation.

Uploaded by

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

335e27 - Week 1

The document discusses software re-engineering as a cost-effective approach for system evolution, outlining its processes and activities. Key concepts include source code translation, reverse engineering, program structure improvement, program modularization, and data re-engineering. The aim is to enhance system structure for better understanding and maintenance, addressing issues such as outdated systems and the need for improved documentation.

Uploaded by

ali.zain2k23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Software Reengineering

CSC-444
CONCEPTS OF RE-ENGINEERING
WEEK 1

1
Introduction
To explain why software re-engineering is a cost-effective option for system evolution
To describe the activities involved in the software re-engineering process
To distinguish between software and data re-engineering and to explain the problems of data re-
engineering

2
What is Reengineering?

3
Software Reengineering

4
The Basic Step
Software systems constitute the backbone of many businesses, governments, and
social institutions.
These organizations cannot properly perform their daily operations without the
help of software systems.
Nowadays, such businesses and institutions need to serve a large number of users
who have a diverse and dynamic list of requirements (both functional and non-
functional),
All of these factors put tremendous pressure on businesses and organizations to
improve their quality of service to keep their customers satisfied
Software change becomes inevitable, as per Lehman’s first law of software evolution

5
The Basic Step(Cont.…)
To perform a software change, we need to fully understand the software system, and
know the impact of such changes on the system.
Software documentation is the first means to describe and understand software systems.
To make this documentation useful for a long time, it must be changed along with any
alterations made to the program during software maintenance.
Software changes should be made via well-defined and well-controlled maintenance and
evolution processes to ensure high-quality products and high-quality documentation.
The process of updating the software documentation may not catch up with the changes,
and in some extreme cases the rules are completely ignored, leading to inconsistent
system documentation.

6
The Basic Step(Cont.…)
This issue is a fundamental and significant problem, since the
designers and programmers (or developers) of these systems may
not be accessible for consultation in the long term.
As a result, the software system cannot evolve to meet business
requirements.
When a software system cannot be updated and fails to evolve, it
eventually has to be retired, and replaced by a new system.
However, sometimes the costs of replacing a retired software system
with a new one are very high in terms of money and time.

7
System Reengineering
l Re-structuring or re-writing part or all of a legacy system
without changing its functionality.
l Applicable where some but not all sub-systems of a larger
system require frequent maintenance.
l Re-engineering involves adding effort to make them easier to
maintain. The system may be re-structured and re-
documented.

8
When to Reengineer?
l When system changes are mostly confined to part of the
system then re-engineer that part.
l When hardware or software support becomes obsolete.
l When new ways of accessing are needed, but its functionality
remains.
l When tool support is not available

9
Advantages
l Reduced risk
• There is a high risk in new software development.
There may be development problems, staffing
problems, and specification problems
l Reduced cost
• The cost of re-engineering is often significantly
less than the costs of developing new software

10
The Reengineering Process
l Source code translation
l Reverse engineering
l Program structure improvement
l Program modularisation
l Data re-engineering

11
Program Modularised Original data
Original
documentation program
program

Reverse
engineering
Data
Source code Program reengineering
translation modularisation

Program
structure
improvement
Structured Reengineered
program data

12
SOURCE CODE TRANSLATION
Involves converting the code from one language (or language
version) to another e.g. FORTRAN to C
May be necessary because of:
◦ Hardware platform update
◦ Staff skill shortages
◦ Organizational policy changes

Only realistic if an automatic translator is available

13
System to be System to be Re-engineered
re-engineered re-engineered system

Identify source Design translator Automatically Manually


code differences instructions transla te code transla te code

14
REVERSE ENGINEERING
Analyzing software with a view to understanding its design and specification
May be part of a re-engineering process but may also be used to re-specify a system for re-
implementation
Builds a program database and generates information from this

“Reverse engineering is the process of analyzing a subject system with two goals in mind:
(1) to identify the system's components and their interrelationships; and,

(2) to create representations of the system in another form or at a higher level of


abstraction."
[ElliotChikofsky and JamesCross, Reverse Engineering and Design Recovery: A Taxonomy, IEEE Software
7(1):13-17, 1990.]

15
THE REVERSE ENGINEERING
PROCESS
Program stucture
Automated diagrams
analysis
System
System to be Document Data stucture
information
re-engineered generation diagrams
store
Manual
annotation Traceability
matrices

16
PROGRAM STRUCTURE
IMPROVEMENT
Maintenance tends to corrupt the structure of a program. It becomes harder
and harder to understand
The program may be automatically restructured to remove unconditional
branches
Conditions may be simplified to make them more readable

17
PROGRAM RESTRUCTURING
“Restructuring is a transformation from one form of
representation to another at the same relative level of
abstraction." The new representation is meant to preserve
the semantics and external behaviour of the original.

[ElliotChikofsky and JamesCross, Reverse Engineering and Design


Recovery: A Taxonomy, IEEE Software 7(1):13-17, 1990.]

18
19
SPAGHETTI LOGIC
START:
GOTO MAMMALS
DOG:
WALK THE DOG
GOTO CAT
MAMMALS:
GOTO DOG
FISH:
FEED THE FISH
COVER THE BIRD
GOTO FROG

20
SPAGHETTI LOGIC(CONT.…)
CAT:
PUT OUT THE CAT
GOTO FISH-AND-FOWL
FISH-AND-FOWL:
GOTO FISH
FROG:
SING TO THE FROG
EXIT.

21
START:
CALL FUNCTION DOG
CALL FUNCTION CAT
CALL FUNCTION FISH
CALL FUNCTION BIRD
Structured CALL
EXIT.
FUNCTION FROG

control logic DOG:


WALK THE DOG
RETURN

CAT:
PUT OUT THE CAT
RETURN

FISH:
FEED THE FISH
RETURN

BIRD:
COVER BIRD CAGE
RETURN

FROG:
SING TO THE FROG
RETURN 22
CONDITION SIMPLIFICATION
-- Complex condition
if not (A > B and (C < D or not ( E > F) ) )...

-- Simplified condition
if (A <= B and (C < D or E <= F)...

23
RESTRUCTURING PROBLEMS
Problems with re-structuring are:
◦ Loss of comments
◦ Loss of documentation
◦ Heavy computational demands

Restructuring doesn’t help with poor modularisation where related components


are dispersed throughout the code
The understand-ability of data-driven programs may not be improved by
restructuring(Slide#28 Part A)

24
PROGRAM MODULARISATION
The process of re-organizing a program so that related program parts are
collected together in a single module
Usually a manual process that is carried out by program inspection and re-
organization

25
DATA RE-ENGINEERING
Involves analyzing and reorganizing the data structures (and sometimes the data
values) in a program
May be part of the process of migrating from a file-based system to a DBMS-
based system or changing from one DBMS to another
Objective is to create a managed data environment

26
APPROACHES TO DATA RE-
ENGINEERING
Approach Description
Data cleanup The data records and values are analysed to improve their quality.
Duplicates are removed, redundant information is deleted and a consistent
format applied to all records. This should not normally require any
associated program changes.
Data extension In this case, the data and associated programs are re-engineered to remove
limits on the data processing. This may require changes to programs to
increase field lengths, modify upper limits on the tables, etc. The data itself
may then have to be rewritten and cleaned up to reflect the program
changes.
Data migration In this case, data is moved into the control of a modern database
management system. The data may be stored in separate files or may be
managed by an older type of DBMS.

27
Program 1 Program 2 Program 3

File 1 File 2 File 3 File 4 File 5 File 6

Program 4 Program 5 Program 6 Program 7

Becomes

Program 3 Program 4 Program 5 Program 6

Program 7
Program 2

Database describes
management Logical and
Program 1 physical
system
data models

28
THE DATA RE-ENGINEERING
PROCESS
Program to be re-engineered Data
analysis

Entity name Data


modification re-formatting
Data Literal Default value Data
analysis replacement conversion conversion
Data definition Validation rule
re-ordering modification

Stage 1 Stage 2 Stage 3

Change summary tables Modified


data

29
KEY POINTS
The objective of re-engineering is to improve the system structure to make it
easier to understand and maintain
The re-engineering process involves source code translation, reverse
engineering, program structure improvement, program modularisation, and
data re-engineering
Source code translation is the automatic conversion of program in one language
to another

30
KEY POINTS(CONT.…)
Reverse engineering is the process of deriving the system
design and specification from its source code
Program structure improvement replaces unstructured control
constructs with while loops and simple conditionals
Program modularisation involves reorganization to group related
items
Data re-engineering may be necessary because of inconsistent
data management

31

You might also like