Bibliographic Details
| Title: |
AI Chain-Driven Control Flow Graph Generation for Multiple Programming Language. |
| Alternate Title: |
面向多种编程语言的人工智能链驱动的控制流图生成. (Chinese) |
| Authors: |
ZOU Zhou, ZUO Zhengkang, HUANG Qing |
| Source: |
Wuhan University Journal of Natural Sciences; Jun2025, Vol. 30 Issue 3, p222-230, 9p |
| Abstract (English): |
Control Flow Graphs (CFGs) are essential for understanding the execution and data flow within software, serving as foundational structures in program analysis. Traditional CFG construction methods, such as bytecode analysis and Abstract Syntax Trees (ASTs), often face challenges due to the complex syntax of programming languages like Java and Python. This paper introduces a novel approach that leverages Large Language Models (LLMs) to generate CFGs through a methodical Chain of Thought (CoT) process. By employing CoT, the proposed approach systematically interprets code semantics directly from natural language, enhancing the adaptability across various programming languages and simplifying the CFG construction process. By implementing a modular AI chain strategy that adheres to the single responsibility principle, our approach breaks down CFG generation into distinct, manageable steps handled by separate AI and non-AI units, which can significantly improve the precision and coverage of CFG nodes and edges. The experiments with 245 Java and 281 Python code snippets from Stack Overflow demonstrate that our method achieves efficient performance on different programming languages and exhibits strong robustness. [ABSTRACT FROM AUTHOR] |
| Abstract (Chinese): |
控制流图是程序分析的基本结构, 是理解软件内部执行和数据流的基础。由于Java和Python等编程语 言的复杂语法, 传统的CFG构建方法, 如基于字节码分析和基于抽象语法树(AST) 的方法, 往往面临着泛 化能力低和学习成本高等局限性。为了解决这些问题, 本文提出了一种基于大型语言模型(LLM) 和系统化 思维链(CoT) 的CFG生成方法。该方法直接从自然语言中解释代码语义, 通过遵循单一职责原则的模块化人 工智能链策略, 将CFG的生成分解为多个独立的、可管理的步骤, 不同的步骤对应由单独的人工智能或非人 工智能单元进行处理。该方法简化了CFG的构造过程, 并增强了方法的泛化性。在Stack Overflow 上爬取的 245 段Java 代码和281 段Python 代码上进行的实验结果表明, 该方法在不同的编程语言上均取得了高效的性能, 且具有良好的鲁棒性. [ABSTRACT FROM AUTHOR] |
|
Copyright of Wuhan University Journal of Natural Sciences is the property of Wuhan University and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.) |
| Database: |
Complementary Index |