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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Jiang, Renshuang, Wang, Yichong, Dong, Pan, Fang, Xiaoxiang, Duan, Zhenling, Wang, Tinglue, Hu, Yuchen, Yu, Jie, Jiang, Zhe
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908852135395328
author Jiang, Renshuang
Wang, Yichong
Dong, Pan
Fang, Xiaoxiang
Duan, Zhenling
Wang, Tinglue
Hu, Yuchen
Yu, Jie
Jiang, Zhe
author_facet Jiang, Renshuang
Wang, Yichong
Dong, Pan
Fang, Xiaoxiang
Duan, Zhenling
Wang, Tinglue
Hu, Yuchen
Yu, Jie
Jiang, Zhe
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2602_21681
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle AkiraRust: Re-thinking LLM-aided Rust Repair Using a Feedback-guided Thinking Switch
Jiang, Renshuang
Wang, Yichong
Dong, Pan
Fang, Xiaoxiang
Duan, Zhenling
Wang, Tinglue
Hu, Yuchen
Yu, Jie
Jiang, Zhe
Software Engineering
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.
title AkiraRust: Re-thinking LLM-aided Rust Repair Using a Feedback-guided Thinking Switch
topic Software Engineering
url https://arxiv.org/abs/2602.21681