Reverse engineering

Recovering a software's design from its code: reverse engineering, redocumentation, restructuring, reengineering, call graph and class diagram.

  • 25 cards
  • 4 topics
  • Free

The outline, topic by topic

Each topic is weighted the way the exam weighs it.

  1. Concepts
  2. Questions
  3. Sort and link
  4. Scenarios

A few cards from the deck

  • Reverse engineering: what is it?

    Show the answer

    Analysis of existing software to recover its design (structure, components, relations), without changing anything.

    It starts from the code, often the only survivor, and climbs to a higher level of abstraction: a diagram, a graph, a description.

  • From this Java code, which relation does a class diagram show from Commande to Ligne?

    ```java
    class Commande {
    private Client client;
    private List<Ligne> lignes = new ArrayList<>();
    }
    `

    • An association with multiplicity 0..* to Ligne
    • An inheritance: Commande is a kind of Ligne
    • A realization: Commande implements the Ligne interface
    • An association with multiplicity 1 (only one line per order)
    Show the answer

    An association with multiplicity 0..* to Ligne

    A field of type List<Ligne> translates into an association to many. The code alone does not say whether it is a composition: only the lines' life cycle, tied to the order or not, can decide.

  • Reverse engineering … the software it analyses; reengineering … in a new form.

    Show the answer

    Reverse engineering does not change the software it analyses; reengineering rebuilds it in a new form.

    Understand first, rebuild afterwards: reverse engineering is the analysis step that reengineering builds on.

  • Redocumentation: what is it?

    Show the answer

    Producing or updating a software's documentation from an analysis of its code, without changing the code.

    It is the lightest form of reverse engineering: the code stays intact, only what it does is made readable.

  • A company wants to migrate software written twenty years ago, with no documentation, to a web architecture. Which approach follows the logical order?

    • Write the new version from the team's memories, then compare with the old one
    • Recover the design by reverse engineering, then rebuild on the new platform
    • Translate the code line by line into the new language, without trying to understand it
    • Take the original specification and start over, without reading the old code
    Show the answer

    Recover the design by reverse engineering, then rebuild on the new platform

    The old code holds rules nobody remembers. Reverse engineering brings them up before the rebuild, which is the second half of reengineering.