Skip to content

Removing dependency to Understand #114

@m-zakeri

Description

@m-zakeri

The problem

CodART uses Understand Python API for the following task:

  • Finding the usages (ref by) of a given entity (variable, method, class, interface, and enum) in the program for some refactoring operations.
  • Computing source code metrics required for quality attribute measurements and code smell detection.

The usage of Understand must be replaced with a free implementation of Understand API in CodART.

Describe the solution you'd like

Find the required dependencies (def-use chain) between different source code entities, for refactoring operations, must be performed by developing a static analyzer with ANTLR listeners.
To this aim, the first step is to implement analysis passes to create a program Symbole Table like the Understand database.
The second step is to implement the required query on the created Symbol Table.
Some best practices and class diagrams for building the required Symbol table are discussed in [1, 2].

Describe alternatives you've considered

To find an open-source implementation of Understand Python API.

References
[1] N. Tsantalis and A. Chatzigeorgiou, “Identification of move method refactoring opportunities,” IEEE Trans. Softw. Eng., vol. 35, no. 3, pp. 347–367, May 2009, doi: 10.1109/TSE.2009.1.
[2] V. E. Zafeiris, S. H. Poulias, N. A. Diamantidis, and E. A. Giakoumakis, “Automated refactoring of super-class method invocations to the Template Method design pattern,” Inf. Softw. Technol., vol. 82, pp. 19–35, Feb. 2017, doi: 10.1016/j.infsof.2016.09.008.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions