AkiraRust: Re-thinking LLM-aided Rust Repair Using a Feedback-guided Thinking Switch

📅 2026-02-25
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing approaches to leveraging large language models (LLMs) for repairing undefined behavior (UB) in Rust are hindered by rigid templates or the absence of executable semantics, making it difficult to simultaneously achieve context awareness and semantic correctness. This work proposes AkiraRust, a novel framework that integrates finite state machines with a multi-agent dual-mode reasoning mechanism. Guided by a waveform-driven controller, AkiraRust dynamically switches between fast and slow thinking modes at runtime to enable adaptive repair. The framework supports state rollback and semantic checkpoints, substantially enhancing both accuracy and robustness. Experimental results demonstrate that AkiraRust achieves a 92% semantic correctness rate while improving average repair speed by 2.2× over the current state-of-the-art method.

Technology Category

Application Category

📝 Abstract
Eliminating undefined behaviors (UBs) in Rust programs requires a deep semantic understanding to enable accurate and reliable repair. While existing studies have demonstrated the potential of LLMs to support Rust code analysis and repair, most frameworks remain constrained by inflexible templates or lack grounding in executable semantics, resulting in limited contextual awareness and semantic incorrectness. Here, we present AkiraRust, an LLM-driven repair and verification framework that incorporates a finite-state machine to dynamically adapt its detection and repair flow to runtime semantic conditions. AkiraRust introduces a dual-mode reasoning strategy that coordinates fast and slow thinking across multiple agents. Each agent is mapped to an FSM state, and a waveform-driven transition controller manages state switching, rollback decisions, and semantic check pointing, enabling context-aware and runtime-adaptive repair. Experimental results show that AkiraRust achieves about 92% semantic correctness and delivers a 2.2x average speedup compared to SOTA.
Problem

Research questions and friction points this paper is trying to address.

undefined behaviors
Rust repair
semantic correctness
LLM-aided
context-awareness
Innovation

Methods, ideas, or system contributions that make the work stand out.

LLM-driven repair
finite-state machine
dual-mode reasoning
runtime-adaptive
semantic correctness
🔎 Similar Papers
No similar papers found.
Renshuang Jiang
Renshuang Jiang
National University of Defense Technology
Y
Yichong Wang
National University of Defense Technology, China
P
Pan Dong
National University of Defense Technology, China
X
Xiaoxiang Fang
National University of Defense Technology, China
Z
Zhenling Duan
National University of Defense Technology, China
T
Tinglue Wang
Southeast University, China
Y
Yuchen Hu
Southeast University, China
J
Jie Yu
National University of Defense Technology, China
Zhe Jiang
Zhe Jiang
Southeast University, People's Republic of China.
(Micro-)ArchitectureEmbedded SystemDesign AutomationSafetyReal-time