paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Natural Language Outlines for Code: Literate Programming in the LLM Era

代码的自然语言大纲:LLM 时代的文学化编程
FSE Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering2025匹配度 3/10 · 论文关注用 LLM 生成自然语言大纲辅助代码理解与生成,属于 PL 与 LLM 交叉的开发者工具,但未涉及静态分析、形式化验证、浮点或贝叶斯程序分析,且核心是提示技术与交互模态,与研究画像核心问题不匹配。引用 8 inbox
Kensen Shi, Deniz Altınbüken, Saswat Anand, Mihai Christodorescu, Katja Grünwedel, Alexa Koenings, Sai Naidu, Anurag Pathak, Marc Rasi, Fredde Ribeiro, Brandon Ruffin, Siddhant Sanyam, Maxim Tabachnyk, Sara Toth, Roy Tu, Tobias Welp, Pengcheng Yin, Manzil Zaheer, Satish Chandra, Charles Sutton
crossref: 2026-09-12

AI 速览

一句话:提出自然语言大纲作为代码与 LLM 交互的新模态,可自动生成并实现代码与 NL 双向同步。

本文提出将自然语言大纲(NL outline)作为一种新的交互模态与界面,为开发者提供覆盖整个软件开发流程的 AI 辅助。一个函数的大纲由若干用简洁散文写成的语句组成,它们划分代码并以文学化编程的风格概括其主要思想。作者发现现代 LLM 能在实践中生成准确且高质量的大纲,并且大纲支持代码与自然语言之间的双向同步:开发者修改任一侧,LLM 会自动更新另一侧。文章讨论了多种用例,包括加速代码与 diff 的理解和导航、简化代码维护、增强代码搜索、引导代码生成等;随后提出并比较多种用于生成大纲的 LLM 提示技术,并邀请专业开发者评判大纲质量;最后通过代码审查和恶意软件检测两个案例研究展示应用。

问题
如何让开发者利用 LLM 贯穿软件开发流程,需要一种既贴合代码结构又便于人机交互的中间表示。
方法
提出由简洁散文语句构成的函数级自然语言大纲,比较多种 LLM 提示技术生成大纲,并实现代码与自然语言的双向自动同步。
评估
邀请专业开发者对大纲质量进行评判,并以代码审查与恶意软件检测两个案例研究验证实用性。
原文摘要(Abstract)

We propose using natural language outlines as a novel modality and interaction surface for providing AI assistance to developers throughout the software development process. An NL outline for a code function comprises multiple statements written in concise prose, which partition the code and summarize its main ideas in the style of literate programming. Crucially, we find that modern LLMs can generate accurate and high-quality NL outlines in practice. Moreover, NL outlines enable a bidirectional sync between code and NL, where a developer can change either code or NL and have the LLM automatically update the other. We discuss many use cases for NL outlines: they can accelerate understanding and navigation of code and diffs, simplify code maintenance, augment code search, steer code generation, and more. We then propose and compare multiple LLM prompting techniques for generating outlines and ask professional developers to judge outline quality. Finally, we present two case studies applying NL outlines toward code review and malware detection.

链接与引用

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

BibTeX
@inproceedings{paperbot9033,
  title = {Natural Language Outlines for Code: Literate Programming in the LLM Era},
  author = {Kensen Shi and Deniz Altınbüken and Saswat Anand and Mihai Christodorescu and Katja Grünwedel and Alexa Koenings and Sai Naidu and Anurag Pathak and Marc Rasi and Fredde Ribeiro and Brandon Ruffin and Siddhant Sanyam and Maxim Tabachnyk and Sara Toth and Roy Tu and Tobias Welp and Pengcheng Yin and Manzil Zaheer and Satish Chandra and Charles Sutton},
  booktitle = {FSE},
  year = {2025},
  doi = {10.1145/3696630.3728541}
}