面向生成式AI时代的测试导向编程:重新思考编程方式
Test-Oriented Programming: rethinking coding for the GenAI era
AI总结:
本文提出测试导向编程 paradigm,通过自然语言生成测试代码替代传统生产代码,利用 LLM 生成程序并评估其可行性。
摘要:
大型语言模型(LLMs)展示了惊人的生成软件代码能力,已被用于支持开发者编程。现有工具依赖助手改进自动补全或多代理,不同模型实例协作完成问题。我们主张 LLMs 可实现更高抽象层次,提出测试导向编程(TOP)范式。在此范式中,开发者只需检查基于自然语言规范生成的测试代码,而非关注生产代码,后者可委托 LLMs。为评估该提案的可行性,我们开发了概念验证工具,并使用两种不同 LLMs 生成小型命令行程序。我们获得了有希望的结果,并识别了该范式在真实项目中应用的挑战。
英文摘要:
Large language models (LLMs) have shown astonishing capability of generating software code, leading to its use to support developers in programming. Proposed tools have relied either on assistants for improved auto-complete or multi-agents, in which different model instances are orchestrated to perform parts of a problem to reach a complete solution. We argue that LLMs can enable a higher-level of abstraction, a new paradigm we called Test-Oriented Programming (TOP). Within this paradigm, developers only have to check test code generated based on natural language specifications, rather than focusing on production code, which could be delegated to the LLMs. To evaluate the feasibility of this proposal, we developed a proof-of-concept tool and used it to generate a small command-line program employing two different LLMs. We obtained promising results and identified challenges for the use of this paradigm for real projects.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。