Skip to main content
QUICK REVIEW

[论文解读] Automatic Programming: Large Language Models and Beyond

Michael R. Lyu, Baishakhi Ray|arXiv (Cornell University)|May 3, 2024
Topic Modeling被引用 4
一句话总结

本文研究了大型语言模型(LLMs)在自动编程中的挑战与未来,提出通过自动化程序修复与程序分析可提升LLM生成代码的可信度与正确性。文章主张采用具备验证与修复能力的LLM代理,以生成更高保障性的代码,推动程序员角色在2030年前向确保软件开发中的可信度与自主性转变。

ABSTRACT

Automatic programming has seen increasing popularity due to the emergence of tools like GitHub Copilot which rely on Large Language Models (LLMs). At the same time, automatically generated code faces challenges during deployment due to concerns around quality and trust. In this article, we study automated coding in a general sense and study the concerns around code quality, security and related issues of programmer responsibility. These are key issues for organizations while deciding on the usage of automatically generated code. We discuss how advances in software engineering such as program repair and analysis can enable automatic programming. We conclude with a forward looking view, focusing on the programming environment of the near future, where programmers may need to switch to different roles to fully utilize the power of automatic programming. Automated repair of automatically generated programs from LLMs, can help produce higher assurance code from LLMs, along with evidence of assurance

研究动机与目标

  • 考察LLM生成代码在真实世界软件项目中所面临的可信度、正确性与安全性挑战。
  • 研究程序修复与分析如何提升自动生成功能代码的可靠性和质量。
  • 探索在LLM自动化大量编码流程的未来中,软件工程师角色的演变。
  • 提出一种结合形式化验证与测试的自主、自改进代码生成愿景。
  • 考察将自动化修复扩展至概率程序及其他非传统代码类型的可行性。

提出的方法

  • 提出使用自动化程序修复技术修复LLM生成的代码,由精心整理的测试套件引导。
  • 引入从自然语言描述生成额外测试输入 $T'$ 的概念,作为修复后代码正确性的证据。
  • 构想具备程序分析与修复能力的LLM代理,可自主提升代码质量并生成可验证的提交。
  • 建议通过沙箱代码或隔离机制集成LLM生成的代码,以限制在遗留系统中的潜在危害。
  • 提出从自然语言规范同时生成代码与形式化证明,利用代码到规范映射与证明生成的最新进展。
  • 探索利用符号执行与语义感知修复技术,将自动化修复扩展至概率程序。
Figure 2. Inferring Specifications for Program Repair (ack. unpublished article ( Gao et al . , 2023a ) )
Figure 2. Inferring Specifications for Program Repair (ack. unpublished article ( Gao et al . , 2023a ) )

实验结果

研究问题

  • RQ1应以何种标准判定LLM生成代码在生产软件系统中的可接受性?
  • RQ2自动化程序修复在多大程度上可提升LLM生成代码的正确性与可信度?
  • RQ3具备程序分析能力的LLM代理在哪些方面可实现生成代码的自主改进?
  • RQ4如何将形式化验证与测试生成集成到LLM代码生成流程中,以确保更高保障性?
  • RQ5将LLM生成代码与人工编写的代码集成会产生何种影响,特别是关于可信边界与组件兼容性方面?

主要发现

  • 利用精心整理的测试套件对LLM生成代码进行自动化修复,可作为正确性的具体证据,增强集成信心。
  • 具备程序分析与修复能力的LLM代理可自主提升代码质量,推动实现自改进的软件生成。
  • 将LLM生成代码集成到现有系统中,需通过沙箱或隔离机制等防护措施,以限制潜在故障传播。
  • 从自然语言描述生成形式化验证与证明,正成为实现更高保障性AI生成代码的可行路径。
  • 利用符号执行修复概率程序的可行性,为机器学习工作负载的自动化改进开辟了新途径。
  • 未来软件工程师的角色预计将从大规模编码转向确保AI生成成果的可信度、正确性与自主性。
Figure 5. Evolution of programmer roles captured by DALL-E; programmer role (a) as code composer and designer instead of code writer, (b) as quality assurance specialist instead of code writer.
Figure 5. Evolution of programmer roles captured by DALL-E; programmer role (a) as code composer and designer instead of code writer, (b) as quality assurance specialist instead of code writer.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。