paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SCLA: Automated Smart Contract Summarization via LLMs and Control Flow Prompt

SCLA:基于 LLM 与控制流提示的自动化智能合约摘要
ICSE Proceedings of the IEEE/ACM 48th International Conference on Software Engineering2026匹配度 4/10 · 论文属于程序分析与 LLM 的交叉,利用 AST、函数调用图和控制流语义事实增强提示以改进智能合约摘要,与“LLM/程序分析”有关;但其目标是代码摘要,而非静态分析/形式化验证或 Agentic 程序分析,方法核心更接近提示工程,未深入用户关注的分析技术与理论。引用 0 inbox
Xiaoqi Li, Yingjie Mao, Zexin Lu, Wenkai Li, Zongwei Li
crossref: 2026-09-12

AI 速览

一句话:提出 SCLA,用函数调用图与控制流语义事实增强提示,使通用 LLM 在智能合约摘要上显著超越微调基线。

智能合约代码摘要有助于维护与漏洞检测,但通用大语言模型在该任务上往往逊于 CodeT5+、CodeBERT 等微调模型;现有基于数据流的方法忽略层次化与控制结构,造成信息损失并降低摘要质量。本文提出 SCLA,一种多模态 LLM 方法:从抽象语法树中提取函数调用图(FCG)与控制流语义事实,构造语义增强的提示,以保留显式与隐式行为的结构和上下文依赖。作者在 4 万个真实智能合约上评估,SCLA 相对最优基线在 BLEU-4、METEOR、ROUGE-L、BLEURT 上分别提升 26.7%、23.2%、16.7%、14.7%,表明控制流增强提示能有效弥合通用 LLM 与领域特定代码理解之间的差距。

问题
通用 LLM 在智能合约代码摘要任务上表现不及领域微调模型,而现有基于数据流的方法容易丢失代码的层次与控制结构信息。
方法
从 AST 中抽取函数调用图(FCG)与控制流语义事实,将其融入语义增强的提示中,驱动多模态 LLM 完成代码摘要。
评估
在 40,000 个真实智能合约上与最先进基线对比,采用 BLEU-4、METEOR、ROUGE-L、BLEURT 四项指标,均取得显著提升。
原文摘要(Abstract)

Smart contract code summarization facilitates maintenance and vulnerability detection. Although large language models (LLMs) are widely adopted, they underperform fine-tuned models such as CodeT5+ and CodeBERT. Existing data-flow-based methods often miss hierarchical and control structures, leading to information loss and lower summarization quality. We propose SCLA, a multimodal LLM approach that enhances code understanding via semantically enriched prompts. SCLA integrates Function Call Graphs (FCGs) and control-flow semantic facts extracted from the Abstract Syntax Tree (AST) to preserve structural and contextual dependencies, including both explicit and implicit behaviors. Evaluated on 40,000 real-world smart contracts, SCLA achieves substantial gains over state-of-the-art baselines: 26.7% (BLEU-4), 23.2% (METEOR), 16.7% (ROUGE-L), and 14.7% (BLEURT), demonstrating that control flow–enhanced prompting effectively bridges the gap between general-purpose LLMs and domain-specific code understanding.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot12046,
  title = {SCLA: Automated Smart Contract Summarization via LLMs and Control Flow Prompt},
  author = {Xiaoqi Li and Yingjie Mao and Zexin Lu and Wenkai Li and Zongwei Li},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3786582.3786812}
}