Code2graph: Automatic Generation of Static Call Graphs for Python']Python Source Code

被引:23
|
作者
Gharibi, Gharib [1 ]
Tripathi, Rashmi [1 ]
Lee, Yugyung [1 ]
机构
[1] Univ Missouri, Sch Comp & Engn, Kansas City, MO 64110 USA
关键词
Static code analysis; call graph construction; !text type='Python']Python[!/text] Static code analysis; !text type='Python']Python[!/text;
D O I
10.1145/3238147.3240484
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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).
引用
收藏
页码:880 / 883
页数:4
相关论文
共 50 条
  • [1] GAP-Gen: Guided Automatic Python']Python Code Generation
    Zhao, Junchen
    Song, Yurun
    Wang, Junlin
    Harris, Ian G.
    [J]. 17TH CONFERENCE OF THE EUROPEAN CHAPTER OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, EACL 2023, 2023, : 37 - 51
  • [2] Source templates for the automatic generation of adjoint code through static call graph reversal
    Naumann, U
    Utke, J
    [J]. COMPUTATIONAL SCIENCE - ICCS 2005, PT 1, PROCEEDINGS, 2005, 3514 : 338 - 346
  • [3] Making Python']Python Code Idiomatic by Automatic Refactoring Non-idiomatic Python']Python Code with Python']Pythonic Idioms
    Zhang, Zejun
    Xing, Zhenchang
    Xia, Xin
    Xu, Xiwei
    Zhu, Liming
    [J]. PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 696 - 708
  • [4] Seq2Code: Transformer-Based Encoder-Decoder Model for Python']Python Source Code Generation
    Laskari, Naveen Kumar
    Reddy, K. Adi Narayana
    Reddy, M. Indrasena
    [J]. THIRD CONGRESS ON INTELLIGENT SYSTEMS, CIS 2022, VOL 1, 2023, 608 : 301 - 309
  • [5] PyCG: Practical Call Graph Generation in Python']Python
    Salis, Vitalis
    Sotiropoulos, Thodoris
    Louridas, Panos
    Spinellis, Diomidis
    Mitropoulos, Dimitris
    [J]. 2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2021), 2021, : 1646 - 1657
  • [6] Python']Python Code Generation for Explicit MPC in MPT
    Takacs, Balint
    Stevek, Juraj
    Valo, Richard
    Kvasnica, Michal
    [J]. 2016 EUROPEAN CONTROL CONFERENCE (ECC), 2016, : 1328 - 1333
  • [7] Python']Python Code Generation by Asking Clarification Questions
    Li, Haau-Sing
    Mesgar, Mohsen
    Martins, Andre F. T.
    Gurevych, Iryna
    [J]. PROCEEDINGS OF THE 61ST ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2023): LONG PAPERS, VOL 1, 2023, : 14287 - 14306
  • [8] Cnerator: A Python']Python application for the controlled stochastic generation of standard C source code
    Ortin, Francisco
    Escalada, Javier
    [J]. SOFTWAREX, 2021, 15
  • [9] Code Analysis with Static Application Security Testing for Python']Python Program
    Ma, Li
    Yang, Huihong
    Xu, Jianxiong
    Yang, Zexian
    Lao, Qidi
    Yuan, Dong
    [J]. JOURNAL OF SIGNAL PROCESSING SYSTEMS FOR SIGNAL IMAGE AND VIDEO TECHNOLOGY, 2022, 94 (11): : 1169 - 1182
  • [10] DockerizeMe: Automatic Inference of Environment Dependencies for Python']Python Code Snippets
    Horton, Eric
    Parnin, Chris
    [J]. 2019 IEEE/ACM 41ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2019), 2019, : 328 - 338