2018 · 36 citations · 4 references
ComputingComputer ScienceNatural Language ProcessingProgramming LanguagesSoftware EngineeringAbstract Syntax TreesControl-flow AnalysisData-flow AnalysisSoftware ConstructionStatic Code AnalysisCall Graph ConstructionCode Similarity AnalysisInterprocedural AnalysisSimilarity DetectionSimilarity MatricesSimilarity Matrix AnalysisSoftware Comprehension ToolsSource Code Structure
A static call graph is an imperative prerequisite used in most interprocedural analyses and software comprehension tools. However, there is a lack of software tools that can automatically analyze the Python source-code and construct its static call graph. In this paper, we introduce a prototype Python tool, named code2graph, which automates the tasks of (1) analyzing the Python source-code and extracting its structure, (2) constructing static call graphs from the source code, and (3) generating a similarity matrix of all possible execution paths in the system. Our goal is twofold: First, assist the developers in understanding the overall structure of the system. Second, provide a stepping stone for further research that can utilize the tool in software searching and similarity detection applications. For example, clustering the execution paths into a logical workflow of the system would be applied to automate specific software tasks. Code2graph has been successfully used to generate static call graphs and similarity matrices of the paths for three popular open-source Deep Learning projects (TensorFlow, Keras, PyTorch). A tool demo is available at https://youtu.be/ecctePpcAKU.
4
Emden R. Gansner · 2006 · 312 citations
Constructing the Call Graph of a Program
Barbara G. Ryder · IEEE Transactions on Software Engineering · 1979 · 300 citations
Michael Burch · 2016 · 12 citations