arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.02491cs.HC
收藏

Ivie:对刚生成代码的轻量级锚定解释

Ivie: Lightweight Anchored Explanations of Just-Generated Code

Litao Yan, Alyssa Hwang, Zhiyuan Wu, Andrew Head

AI总结:

本文提出 Ivie,通过在 VS Code 中紧邻刚生成代码即时显示轻量锚定解释,并利用 LLM 分段与解释代码,实验表明其能提升代码理解且低干扰。

摘要:

编程助手已经重塑了编程体验,使程序员把更少时间用于编写代码,而把更多时间用于批判性地检查代码。本文探讨如何扩展编程助手,以加快对生成代码的检视。我们提出对编程助手的一项扩展,名为 Ivie,即可即时可见的就地解释(instantly visible in-situ explanations)。使用 Ivie 时,程序员生成的代码会立即配有解释,并放置在紧邻代码的位置。我们的设计针对极低成本的调用与关闭进行了优化。解释简洁且信息丰富,描述从单个变量到整个代码块的有意义表达式。我们介绍了 Ivie 的实现:它派生(fork)VS Code,并应用现代 LLM 对生成代码进行及时分段和解释。在一项实验室研究中,我们将 Ivie 与用于代码理解的当代基线工具进行比较。Ivie 提升了对生成代码的理解,并被程序员认为是对编程助手高度有用、低干扰且令人期待的补充。

英文摘要:

Programming assistants have reshaped the experience of programming into one where programmers spend less time writing and more time critically examining code. In this paper, we explore how programming assistants can be extended to accelerate the inspection of generated code. We introduce an extension to the programming assistant called Ivie, or instantly visible in-situ explanations. When using Ivie, a programmer's generated code is instantly accompanied by explanations positioned just adjacent to the code. Our design was optimized for extremely low-cost invocation and dismissal. Explanations are compact and informative. They describe meaningful expressions, from individual variables to entire blocks of code. We present an implementation of Ivie that forks VS Code, applying a modern LLM for timely segmentation and explanation of generated code. In a lab study, we compared Ivie to a contemporary baseline tool for code understanding. Ivie improved understanding of generated code, and was received by programmers as a highly useful, low distraction, desirable complement to the programming assistant.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑