Back to the 2025 paper

Module 5: Software Maintenance

20257m

Explain reverse engineering and software re-engineering. How do they relate to legacy systems?

Worked SolutionAI Assisted

Reverse Engineering and Software Re-engineering

Reverse Engineering

Reverse engineering is the process of analyzing an existing software system (or hardware) to identify its components and their interrelationships and to create representations of the system at a higher level of abstraction — deriving design information from the code. The system itself is not changed; it is a recovery/'understanding' activity.

  • Typical outputs: design models recovered from code — e.g., structure charts, UML class/sequence diagrams, dataflow diagrams, pseudo-code or architecture-level descriptions.
  • Activities: extracting program structures, identifying modules, building call graphs, regenerating documentation.
  • Purpose:
    • Understanding legacy systems whose documentation is lost/outdated,
    • Re-documentation (create/update documentation),
    • Design recovery (reconstruct design decisions),
    • Preparing for future changes, migration, or re-implementation;
    • also used in security (e.g., malware analysis) and interoperability research.
Legacy code ──[reverse engineering]──▶ High-level design / documentation (no code change)

Re-engineering (Software Re-engineering)

Re-engineering is the examination and alteration of a subject system to reconstitute it in a new form with the goal of improving quality, maintainability, and evolvability — it is a forward-engineering-like reconstruction of the existing system. It changes the system.

  • Typical re-engineering process (the "re-engineering model"):
    1. Inventory analysis — catalogue existing system/quality.
    2. Reverse engineering — understand the existing system (recover design).
    3. Restructuring — reorganize code/data without changing functionality (improve structure, remove dead code, convert to structured forms).
    4. Forward engineering — introduce new functionality/changes applying modern techniques, generate a new improved system.
Legacy system ──reverse──▶ understand ──restructure/forward──▶ Re-engineered system (improved)

How they relate to legacy systems

  • Legacy systems are old, often critical systems built with outdated technology, poorly documented, and hard to maintain; yet they embody valuable business logic.
  • Reverse engineering is the first step — it recovers the true structure/behaviour of the legacy system so that its logic is understood (essential when documentation is inadequate or the original developers are gone).
  • Re-engineering then uses that understanding to renovate the legacy system — improving maintainability, moving to modern platforms/languages, fixing architectural weaknesses — while preserving the system's functional value, rather than rewriting from scratch (which is riskier and slower).

Key difference table

Aspect Reverse Engineering Re-engineering
Goal Understand/analyze the system Improve/reconstruct the system
Changes code? No Yes
Direction Code → design (backwards) Design → new code (forwards, after reverse)
Output Models/documentation An improved, modernized system
Input Existing (often legacy) system Existing system (understood via reverse eng.)
Typical use Documentation recovery, legacy analysis Modernization/restructuring of legacy software

Summary: reverse engineering extracts knowledge from a legacy system without changing it; re-engineering uses that knowledge to rebuild/restructure the legacy system into a higher-quality, more maintainable one.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.