paperbot · PL 论文追踪

全部论文 待读 收藏

P1 RustAssistant: Using LLMs to Fix Compilation Errors in Rust Code

RustAssistant:使用LLM修复Rust代码中的编译错误
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 6/10 · 论文将LLM与编译器反馈迭代结合来修复Rust编译错误,属于LLM作为工具改进程序分析与修复的交叉方向,与“AI→PL”部分相关;但其核心是编译错误自动修复,而非静态分析或形式化验证本身,也未涉及浮点或贝叶斯程序分析,因此匹配度中等。引用 10 inbox
Pantazis Deligiannis, Akash Lal, Nikita Mehrotra, Rishi Poddar, Aseem Rastogi
crossref: 2026-09-12

AI 速览

一句话:用提示技术与LLM-编译器迭代自动修复Rust编译错误,峰值准确率约74%。

Rust 凭借基于所有权的强类型系统以及闭包、模式匹配等特性,成为系统编程中比 C/C++ 更安全的选择,但这些独特特性也给开发者带来了陡峭的学习曲线,编译错误修复困难。本文提出工具 RustAssistant,利用大语言模型(LLM)自动为 Rust 编译错误建议修复方案。该工具精心组合多种提示技术,并在 LLM 与 Rust 编译器之间进行迭代反馈,从而显著提升修复准确率。在流行开源 Rust 仓库的真实编译错误上,RustAssistant 达到约 74% 的峰值准确率。作者还贡献了一个 Rust 编译错误数据集,供后续研究使用。

问题
Rust 的所有权类型系统与独特语言特性造成较高的学习门槛,开发者常难以理解和修复编译错误。
方法
RustAssistant 结合精心设计的提示技术,并让 LLM 与 Rust 编译器迭代交互,自动生成并验证编译错误的修复建议。
评估
在流行开源 Rust 仓库中的真实编译错误上进行评估,达到约 74% 的峰值准确率,同时发布了一个 Rust 编译错误数据集。
原文摘要(Abstract)

The Rust programming language, with its safety guarantees, has established itself as a viable choice for low-level systems programming language over the traditional, unsafe alternatives like C/C++. These guarantees come from a strong ownership-based type system, as well as primitive support for features like closures, pattern matching, etc., that make the code more concise and amenable to reasoning. These unique Rust features also pose a steep learning curve for programmers. This paper presents a tool called RustAssistant that leverages the emergent capabilities of Large Language Models (LLMs) to automatically suggest fixes for Rust compilation errors. RustAssistant uses a careful combination of prompting techniques as well as iteration between an LLM and the Rust compiler to deliver high accuracy of fixes. RustAssistant is able to achieve an impressive peak accuracy of roughly 74% on real-world compilation errors in popular open-source Rust repositories. We also contribute a dataset of Rust compilation errors to enable further research.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8787,
  title = {RustAssistant: Using LLMs to Fix Compilation Errors in Rust Code},
  author = {Pantazis Deligiannis and Akash Lal and Nikita Mehrotra and Rishi Poddar and Aseem Rastogi},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00022}
}