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

代码语义缩放

Code Semantic Zooming

ETH Zurich(苏黎世联邦理工学院)

Jinsheng Ba, Sverrir Thorgeirsson, Zhendong Su

AI总结:

提出基于伪代码的CodeZoom方法,通过多层语义抽象迭代探索、理解和优化代码,在用户研究中相比Claude Code显著提升代码理解与控制感。

摘要:

大型语言模型(LLMs)的最新进展引入了一种新的软件开发范式,即从自然语言提示生成源代码。虽然这一范式显著提高了开发效率,但构建复杂的现实世界软件系统仍然具有挑战性,因为自然语言对代码生成过程的控制有限。受编程语言历史上向更高抽象级别演进的启发,我们倡导一种高级抽象语言,使开发者能够更好地控制LLM辅助的代码编写。为此,我们提出了代码语义缩放(CodeZoom),一种基于伪代码的新方法,允许开发者在多个语义抽象层次上迭代探索、理解和优化代码。在一项受试者内用户研究(n=26)中,我们的方法在可用性上与最先进的编码代理Claude Code相当,同时在代码理解方面产生了显著效果:超过90%的参与者报告说,与使用Claude Code相比,使用CodeZoom时对设计决策更有控制感。

英文摘要:

Recent advances in Large Language Models (LLMs) have introduced a new paradigm for software development, where source code is generated from natural language prompts. While this paradigm significantly boosts development productivity, building complex, real-world software systems remains challenging because natural language offers limited control over the code generation process. Inspired by the historical evolution of programming languages toward higher levels of abstraction, we advocate for a high-level abstraction language that gives developers greater control over LLM-assisted code writing. To this end, we propose Code Semantic Zooming (CodeZoom), a novel approach based on pseudocode that allows developers to iteratively explore, understand, and refine code across multiple layers of semantic abstraction. In a within-subjects user study (n=26), our method matches a state-of-the-art coding agent, Claude Code, on usability while producing a large effect on code comprehension: over 90% of participants reported feeling more in control of design decisions when using CodeZoom compared to using Claude Code.

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

↑