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

从需求到代码:理解LLM辅助软件工程中的开发者实践

From Requirements to Code: Understanding Developer Practices in LLM-Assisted Software Engineering

Jonathan Ullrich, Matthias Koch, Andreas Vogelsang

AI总结:

本研究通过访谈14家公司18位开发者,发现常规需求过于抽象,需手动分解为编程任务并补充设计决策和架构约束后才能用于提示LLM,强调需求工程工作仍不可或缺。

摘要:

随着生成式大语言模型(LLMs)及其先进代码生成能力的出现,一些人已经开始设想传统软件工程的终结,因为LLMs可能仅基于领域专家输入系统的需求就能生成高质量代码。这一愿景的可行性可以通过理解开发者在利用LLMs进行代码生成时当前如何整合需求来评估——而这一主题在很大程度上仍未得到探索。我们采访了来自14家公司的18位从业者,以了解他们在生成代码时如何(重新)利用需求和其他设计工件中的信息来输入LLMs。基于我们的发现,我们提出了一种理论,用以解释开发者所采用的过程及其所依赖的工件。我们的理论表明,按常规方式记录的需求对于直接输入LLMs而言过于抽象。相反,它们必须首先被手动分解为编程任务,然后在用于提示(prompts)之前,用设计决策和架构约束加以丰富。我们的研究强调,当使用LLMs生成代码时,基础的需求工程(RE)工作仍然是必要的。我们的理论对于将自动化需求中心型软件工程任务的科学方法置于具体情境中具有重要意义。

英文摘要:

With the advent of generative LLMs and their advanced code generation capabilities, some people already envision the end of traditional software engineering, as LLMs may be able to produce high-quality code based solely on the requirements a domain expert feeds into the system. The feasibility of this vision can be assessed by understanding how developers currently incorporate requirements when using LLMs for code generation-a topic that remains largely unexplored. We interviewed 18 practitioners from 14 companies to understand how they (re)use information from requirements and other design artifacts to feed LLMs when generating code. Based on our findings, we propose a theory that explains the processes developers employ and the artifacts they rely on. Our theory suggests that requirements, as typically documented, are too abstract for direct input into LLMs. Instead, they must first be manually decomposed into programming tasks, which are then enriched with design decisions and architectural constraints before being used in prompts. Our study highlights that fundamental RE work is still necessary when LLMs are used to generate code. Our theory is important for contextualizing scientific approaches to automating requirements-centric SE tasks.

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

↑