paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Environment-Aware Code Generation: How far are We?

环境感知的代码生成:我们离目标还有多远?
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 5/10 · 该论文研究环境感知代码生成并发布多包可执行基准,与 PL+AI 交叉及 Coding Agent 所需的环境兼容性评估有间接关联;但它未涉及静态分析、形式化验证、浮点程序分析或贝叶斯程序分析,且核心目标是改进 LLM 本身,因此匹配度中等。引用 4 inbox
Tongtong Wu, Rongyi Chen, Wenjie Du, Suyu Ma, Guilin Qi, Zhenchang Xing, Shahram Khadivi, Ramesh Periyathambi, Gholamreza Haffari
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:首次系统研究环境感知代码生成,发布多包可执行基准 VersiBCB,并提出数据、参数、缓存三类适配策略。

现有大语言模型(LLM)代码生成评测多聚焦默认或未指定软件环境下的孤立小规模代码单元,难以判断其能否为特定用户环境生成可直接执行的代码。本文首次系统研究环境感知代码生成(EACG),要求生成代码在功能正确的同时,能在任意软件配置下直接执行。为支持贴近实际的评测,作者提出 VersiBCB 基准,具备多包、可执行验证与感知弃用等特点,反映复杂且持续演化的软件环境。基于该基准,作者从数据、参数和缓存三个正交方向探索适配策略并给出代表性方法。结果表明,现有 LLM 在环境特定代码生成上仍面临困难,但所提适配策略可改善环境兼容性与可执行性,揭示了 LLM 部署于实际软件工程流程中的关键挑战与机遇。

问题
现有 LLM 代码生成评测多聚焦默认或未指定环境下的孤立小规模代码单元,无法判断其能否为用户特定软件环境生成可直接执行的代码。
方法
首次系统研究环境感知代码生成(EACG),构建多包、可执行验证、感知弃用的基准 VersiBCB,并从数据、参数与缓存三个正交方向设计代表性适配策略。
评估
在 VersiBCB 上评测现有 LLM 并对比各适配策略,考察生成代码的环境兼容性与可执行性;结果显示 LLM 难以应对环境特定生成,但适配策略带来改进。
原文摘要(Abstract)

Recent progress in large language models (LLMs) has led to impressive code generation capabilities. However, existing evaluations of LLMs primarily focus on generating isolated, small-scale code units (e.g., single functions or statements) under default or unspecified software environments. As a result, it remains unclear whether LLMs can reliably generate executable code tailored to specific user environments. To fill this knowledge gap, we make the first systematic study of Environment-Aware Code Generation (EACG), which requires generating code that is both functionally correct and directly executable under arbitrary software configurations. To support realistic evaluation, we introduce VersiBCB, a benchmark featuring multi-package, executable-verified, and deprecation-aware, reflecting complex and evolving software environments that are often overlooked in prior datasets. Building on this benchmark, we explore three orthogonal adaptation axes: data, parameters, and cache, and further develop representative strategies for each. Our results reveal that existing LLMs struggle with environment-specific code generation, but our adaptation strategies yield improvements in environment compatibility and executability. These findings highlight critical challenges and opportunities for deploying LLMs in practical software engineering workflows.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2601-12262,
  title = {Environment-Aware Code Generation: How far are We?},
  author = {Tongtong Wu and Rongyi Chen and Wenjie Du and Suyu Ma and Guilin Qi and Zhenchang Xing and Shahram Khadivi and Ramesh Periyathambi and Gholamreza Haffari},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3787784}
}