arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2608.26359cs.PLcs.HC

直接操作与自然语言编程,终于能结合了?

Direct Manipulation and Natural Language Programming, Together at Last?

Parker Ziegler, David Minh-Duy Cao, Justin Lubin, Sarah E. Chasins

首次发表
浏览论文内容

中文总结 AI 辅助

该研究提出了支持直接操作与自然语言编程结合的编辑框架,通过被试内研究发现用户更倾向直接操作,为混合编辑模态的编程系统研究提供了方向。

中文摘要 AI 辅助

数十年的编程语言研究已开发出超越文本修改的程序编辑新方法,包括直接操作编程、结构编辑和自动重构工具。然而,自然语言编程的快速发展在很大程度上强化了“程序即文本、程序编辑即(非结构化)文本转换”的观点。如何开发统一的编程系统以弥合这些方法之间的差距,同时支持多种编辑范式协同工作?我们通过引入一个支持直接操作和自然语言两种方式进行程序编辑的框架,迈出了回答这些问题的第一步,并将该框架实例化为$\texttt{cartokit}$直接操作编程系统的变体。我们的核心见解是将程序视为结构化编辑的序列,并使用编辑语言作为直接操作和自然语言交互的共享接口,同时利用约束解码来支持后者。基于我们的实例,我们开展了一项被试内研究($N$=18),以了解与单独使用每种编辑方式相比,直接操作与自然语言结合作为编辑模态如何改变编程过程。令人惊讶的是,我们发现当两种模态都可用时,研究参与者绝大多数选择通过直接操作进行编辑,仅6.14%的编辑通过自然语言完成。我们对研究会话的主题分析显示,直接操作有助于任务分解,鼓励增量编辑,并帮助缓解自然语言编程中与理解模型能力和模型生成代码相关的已知挑战。我们基于编辑的框架和研究结果为未来结合自然语言与替代编辑模态的编程系统研究提供了可能的途径。

英文摘要

Decades of programming languages research has contributed novel approaches to program editing that go beyond modifying text, including direct manipulation programming, structure editing, and automated refactoring tools. However, the rapid growth of natural language programming largely reinforces a view of programs as text and program editing as (unstructured) text transformation. How can we develop unified programming systems that bridge the gap between these approaches, supporting multiple editing paradigms in concert? We take a first step toward answering these questions by introducing a framework that enables program editing via both direct manipulation and natural language, and instantiate this framework in a variant of the $\texttt{cartokit}$ direct manipulation programming system. Our key insight is to treat programs as sequences of structured edits and to use an edit language as a shared interface for both direct manipulation and natural language interactions, leveraging constrained decoding to support the latter. Using our instantiation, we conducted a within-subjects study ($N$=18) to understand how the combination of direct manipulation and natural language as editing modalities changes the programming process compared to each modality alone. Perhaps surprisingly, we found that study participants overwhelmingly chose to edit via direct manipulation when both modalities were available, performing just 6.14% of edits via natural language. Our thematic analysis of study sessions revealed that direct manipulation aided task decomposition, encouraged incremental editing, and helped mitigate known challenges in natural language programming related to understanding model capabilities and model-generated code. Our edit-based framework and study findings lay out a possible pathway for future research on programming systems that blend natural language with alternative editing modalities.

补充信息

↑