Copper:统一代码生成中的正确性和性能规范
Copper: Unifying Correctness and Performance Specification in Code Generation
AI总结:
研究如何在代码生成中兼顾正确性与性能,核心方法是结合形式验证与性能感知规范,主要贡献是生成的代码可证明正确且高效执行,缩小了AI辅助编程中可信度和性能的差距。
摘要:
生成式人工智能在生成功能正确的代码方面取得了显著进展,但确保正确性和性能仍然是一个开放的挑战。我们提出了Copper,一个将形式验证与性能感知规范相结合的框架,以生成可证明正确且高效可执行的代码。我们的方法将人工智能驱动的代码合成与形式验证工具和自动性能分析循环相结合。在各种算法和实际编程任务上进行评估,Copper生成的解决方案满足严格的正确性保证,同时与基线人工智能生成的代码相比,在运行时和内存效率方面有显著提高。这项工作表明,在人工智能辅助编程中弥合可信度和性能之间的差距是可行的,为可靠、高性能的代码生成提供了一条实用途径。
英文摘要:
Generative AI has made remarkable progress in producing functionally correct code, yet ensuring both correctness and performance remains an open challenge. We present Copper, a framework that combines formal verification with performance-aware specification to generate code that is provably correct and efficiently executable. Our approach integrates AI-driven code synthesis with formal verification tools, and automated performance profiling loops. Evaluated on a diverse set of algorithmic and real-world programming tasks, Copper produces solutions that satisfy strict correctness guarantees while delivering significant improvements in runtime and memory efficiency compared to baseline AI-generated code. This work demonstrates that it is feasible to bridge the gap between trustworthiness and performance in AI-assisted programming, offering a practical pathway toward reliable, high-performance code generation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。