Professional Documents
Culture Documents
● Reorganising and modifying
existing software systems to
make them more maintainable
y
sngitem
ringt
af
o
r
ma
t
o s
y
tm
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 8
O
rpoignam l enR
g e
i
The reengineering process
v r
sie
ng P
d
o
c
uro
m g
e a
nm
t io
nM
o
d
u
p
rl
a
r
i
s
e
g
md
Da t Or
i
g
n
al
d
a
t
S
o u
rtancslea tiod
enimP
rsptouvgctam P
m
d
rentS r
uol g a
i
s m
to
n r
en
gi e ri
ng
tproucgtarm
ed Rendgaiterd
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 9
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
a P ro g
a
m
a
e
s
t
r
u
c
tn
d
a
r
i
gt
tih edn uraelstrhuacntgreisngarR
ecIhnsitcrruecatsradiln
g
ccohp
lastnugse
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 11
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
• Organisational policy changes
● Only realistic if an automatic translator is
available
e
s
i
g
n
t
ra
n
s
l
at
o
r A
u
t
o
m
co dens ucio ransle odetrslte codea
t
i
c
al
y M
a
n
u
al
y
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 13
Reverse engineering
● Analysing software with a view to understanding
its design and specification
● May be part of a reengineering process but may
also be used to respecify a system for re
implementation
● Builds a program data base and generates
information from this
● Program understanding tools (browsers, cross
reference generators, etc.) may be used in this
process
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 14
S y
sretnegm A u
t
o
a
n
iteorbedanM lmya
s t
iedS
ys
t
e
m D
o
c
u
me
n
t P
r
o
g
d
D
aa
i
tm
g
s
rs
a
ut
m
cu tc r
e
r
e
The reverse engineering process
i
n
f
o
ra
i
o
aotnuaioln Tng
e
n
r
ai
o di
rm g ram s
acetrbcielsty
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 15
Reverse engineering
● Reverse engineering often precedes re
engineering but is sometimes worthwhile in its
own right
• The design and specification of a system may be reverse
engineered so that they can be an input to the requirements
specification process for the system’s replacement
• The design and specification may be reverse engineered to
support program maintenance
Complex condition
if not (A > B and (C < D or not ( E > F) ) )...
Simplified condition
if (A <= B and (C>= D or E > F)...
P
r
g
eo
g
a
m
n
t
o
rRe
s
t
r
u
c
t
p
o
g
ar
e
d
m
rseanpthion
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 21
Restructuring problems
● Problems with restructuring 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 understandability of datadriven programs
may not be improved by restructuring
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 reengineered 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.
C t
a
g
e
2
hange sum Vmal
oid
a
t
i
n
r
f
c S
t
a
g
e
3
rytables Modaitfed
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 34
Key points
● The objective of reengineering is to improve the
system structure to make it easier to understand
and maintain
● The reengineering process involves source code
translation, reverse engineering, program
structure improvement, program modularisation
and data reengineering
● Source code translation is the automatic
conversion of of program in one language to
another
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 35
Key points
● 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 reorganisation
to group related items
● Data reengineering may be necessary because of
inconsistent data management
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28 Slide 36