Lecture 3 - Re Engineering
Lecture 3 - Re Engineering
Engineering
Anuja arora
CSE / IT
JIITU,Noida
8/14/2008 1
• Forward Engineering: This term, the obvious opposite of reverse
engineering, is offered to distinguish the traditional software
engineering process from reverse engineering.
XYZ
?
Yesterday Design Today’s Product
8/14/2008 2
Re-documentation: Perhaps the weakest form of reverse engineering,
this involves merely the creation (if none existed) or revision of system
documentation at the same level of abstraction.
design
docs
Redocumentation and
Design rediscovery
produces documentation
and design ;Leave System
8/14/2008 Unchanged 3
Restructuring: Lateral transformation of the system within the same
level of abstraction. Also maintains same level of functionality and
semantics.
system
system
Reengineering changes
8/14/2008 functionality, direction of 4
system
Program Understanding: When?
• During maintenance/Evolution:
• The change
• During Development:
• When fixing bugs after testing
• Formal/Informal code review
• When new staff join a project part way through
• Software Reuse
• Code leverage
8/14/2008 5
Program Understanding: How ?
• Tools
• Software visualization
• Program analysis and transformation
• Reverse engineering
• But the most fundamental tool:
8/14/2008 6
During Maintenance
8/14/2008 7
During Development
• Redesigning 10-15%
• Reconstruction 25-30%
8/14/2008 8
• Reverse engineering has been a standard practice in the hardware
community for some time. It has only been within the last ten years that
reverse engineering, or “program comprehension,”has grown into the
current sub-discipline of software Evolution and Software Development.
8/14/2008 9
Definition Of Program Comprehension
8/14/2008 10
Program Comprehension –Motivation
9 A closely related term is reengineering. Whereas reverse
Engineering moves from program code to a higher level of
abstraction, reengineering uses the increased understanding to re-
implement the code in a new form.
8/14/2008 12
Documents prepared after program comprehension
8/14/2008 13
Why is Program Comprehension Difficult?
Program comprehension is difficult. It is difficult because it must bridge different
conceptual areas. Of particular importance are bridges over the following five
gaps.
•The gap between a problem from some application domain and a solution
to it in some programming language
•The gap between the concrete world of physical machines and computer
programs and the abstract world of higher level design descriptions
•The gap between the desired coherent and highly structured description
of a system as originally envisioned by its designer and actual system
whose structure may have disintegrated over time.
•The gap between hierarchal world of program and associational nature of
human cognition
•The gap between the bottom up analysis of the source code and top down
synthesis of the description of the application.
8/14/2008 14
Approaches to Program comprehension
Graphing methods –
There are a variety of graphing approaches for program understanding.
These include, in increasing order of complexity and richness: graphing the
control flow of the program, the data flow of the program, and program
dependence graphs . The unit of examination is a graphical representation
of the program source.
8/14/2008 15