Software Maintenance · Software Engineering

Reverse Engineering

Watch lectures

Reverse Engineering

Definition

Reverse Engineering is the process of analyzing an existing software system to identify its components, their relationships, and to create representations of the system at a higher level of abstraction (e.g., recovering design or requirements from source code) — essentially "working backward" from implementation to understanding.

Why Reverse Engineering Is Needed

  • Original design documentation is missing, lost, or outdated
  • Original developers are no longer available (staff turnover)
  • Need to understand a legacy system before modifying, migrating, or replacing it
  • Need to assess quality, security, or compliance of third-party/inherited code

Levels of Reverse Engineering (Abstraction Recovery)

       Requirements  ◀── (highest abstraction, hardest to recover)
            ▲
        Design
            ▲
    Implementation (source code)  ◀── (starting point of reverse engineering)

Reverse engineering moves upward — from code toward design and (ideally) requirements — the opposite direction of forward engineering (design → code).

Reverse Engineering Activities

  1. Code Analysis — understand the existing source code structure
  2. Design Recovery — reconstruct design diagrams (structure charts, class diagrams) from the code
  3. Documentation Generation — produce missing documentation
  4. Data Reverse Engineering — recover database schema/data models from existing databases

Reverse Engineering vs. Forward Engineering

Forward Engineering Reverse Engineering
Requirements → Design → Code Code → Design → (Requirements)
Building something new Understanding something existing
Standard SDLC direction Opposite direction

Tools Used

  • Code analysis tools, UML reverse-engineering tools (that generate class diagrams from code), database schema analyzers

Relationship to Reengineering

Reverse Engineering is often the first step of Software Reengineering (next topic) — you must understand the existing system (reverse engineer it) before you can systematically restructure/rebuild it (reengineer it).


Exam tip: Draw the "upward arrow" diagram (Code → Design → Requirements) to show reverse engineering moves opposite to normal forward SDLC direction — a frequently asked conceptual diagram question.

Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.

← All Software Engineering modules

Reverse Engineering — Software Engineering — PYQDeck