English

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

Software Engineering 2026-02-26 v1

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.

Keywords

Cite

@article{arxiv.2602.21681,
  title  = {AkiraRust: Re-thinking LLM-aided Rust Repair Using a Feedback-guided Thinking Switch},
  author = {Renshuang Jiang and Yichong Wang and Pan Dong and Xiaoxiang Fang and Zhenling Duan and Tinglue Wang and Yuchen Hu and Jie Yu and Zhe Jiang},
  journal= {arXiv preprint arXiv:2602.21681},
  year   = {2026}
}

Comments

7 pages, 11 figures, accepted to DAC

R2 v1 2026-07-01T10:51:32.721Z