CoLadder:在多级抽象中支持程序员进行分层代码生成
CoLadder: Supporting Programmers with Hierarchical Code Generation in Multi-Level Abstraction
AI总结:
CoLadder通过分层任务分解和代码段操作,帮助程序员在从目标到代码的多级抽象中灵活外化意图,提升代码评估与修改能力。
摘要:
程序员越来越依赖大型语言模型(LLMs)进行代码生成。然而,程序员的目标与生成的代码之间的不一致使代码评估过程复杂化,并要求在提示编写和代码评估之间频繁切换。目前,基于LLM的代码助手缺乏足够的脚手架来帮助程序员从总体目标中格式化意图,而这是将这些意图转化为自然语言提示之前的关键步骤。为解决这一差距,我们采用了迭代设计过程,以深入了解程序员在使用LLMs进行编程时的策略。基于我们的发现,我们创建了CoLadder,一个通过促进分层任务分解、直接代码段操作和提示编写过程中的结果评估来支持程序员的系统。一项有12名经验丰富的程序员参与的用户研究表明,CoLadder能有效帮助程序员灵活地外化他们的问题解决意图,提高他们在从目标到最终代码实现的各种抽象级别上评估和修改代码的能力。
英文摘要:
Programmers increasingly rely on Large Language Models (LLMs) for code generation. However, misalignment between programmers' goals and generated code complicates the code evaluation process and demands frequent switching between prompt authoring and code evaluation. Yet, current LLM-driven code assistants lack sufficient scaffolding to help programmers format intentions from their overarching goals, a crucial step before translating these intentions into natural language prompts. To address this gap, we adopted an iterative design process to gain insights into programmers' strategies when using LLMs for programming. Building on our findings, we created CoLadder, a system that supports programmers by facilitating hierarchical task decomposition, direct code segment manipulation, and result evaluation during prompt authoring. A user study with 12 experienced programmers showed that CoLadder is effective in helping programmers externalize their problem-solving intentions flexibly, improving their ability to evaluate and modify code across various abstraction levels, from goal to final code implementation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。