Reverse Engineering

The Reverse Engineering module of Okapi aims in helping mainly with extracting the application model from the source code for cases where the application lacks technical documentation, especially in the area of application modernization and transformation. Please note that Okapi ABL code parser use an ‘incomplete’ grammar by only considering elements that represent the application API – mainly external procedures, internal entries for procedural code and classes and interfaces for object oriented code; data structures like temp-table and dataset definitions are also extracted.

Current implementation offers support for both object oriented and procedural syntax constructs for the following elements:

  • Interface
    • Method mapped to UML Operation
    • Properties and Variables mapped to UML Attributes
  • Class
    • Method mapped to UML Operation
    • Properties and Variables mapped to UML Attributes
    • Inheritance mapped to UML Generalization
    • Interface implementation mapped to UML Realization
  • External Procedure
    • Main block mapped to UML Operation having the same name as the procedure itself
    • Variables defined at procedure level mapped to UML Attributes
  • Structured Procedure
    • Internal entries (functions, procedures) mapped to UML Operation
    • Variables defined at procedure level mapped to UML Attributes
  • Temp-Table
    • loaded as a “inner” class of the object in which it was defined
    • the class “inherits” the “TEMP-TABLE” primitive type
    • fields are represented as attributes
    • indexes are represented as operations
  • Dataset
    • loaded as a “inner” class of the object in which it was defined
    • the class “inherits” the “DATASET” primitive type
    • dependency links are created between the dataset and all temp-table objects partĀ of the dataset

The following reverse engineering rules and conventions applies:

  • primitive and object data types for attributes and operation’s parameters
  • default (initial) value for attributes and operation’s parameters
  • comments for classes, interfaces, operations and attributes (the comment block right before the element definition is considered)
  • included files translates to dependency links

Comments are closed.