Evidence-Driven LLM Agent for C-to-Synthesizable-C Conversion and Verification

📅 2026-06-24
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge that general-purpose C programs often fail to pass through the four-stage high-level synthesis (HLS) pipeline due to violations of constraints imposed by the synthesizable C subset (HLS-C). To overcome this, the authors propose a closed-loop generate-validate-diagnose-repair framework that enables automatic transformation from C to HLS-C. The approach leverages multi-agent collaboration tightly integrated with a four-stage verifier and introduces three key innovations: an end-to-end agent workflow operating under evidence isolation, a progressive mismatch localization chain (PMLC) based on log normalization and AST backtrace slicing, and a typed two-stage evidence retrieval-augmented generation (RAG) mechanism powered by a self-evolving repair card pool. Experimental results demonstrate that the proposed method significantly outperforms state-of-the-art approaches in terms of repair success rate, robustness, and reproducibility.
📝 Abstract
Software-compilable C programs routinely fail to complete the four-stage pipeline of a high-level synthesis (HLS) toolchain -- compilation, C simulation (CSim), synthesis, and C/RTL co-simulation (CoSim) -- because HLS accepts only a synthesizable subset of C (HLS-C). Yet most existing large language model (LLM) systems built for HLS code repair only cover the early pipeline stages and feed raw tool logs directly to the model, yielding brittle and hard-to-reproduce fixes. We formulate C-to-HLS-C conversion as a closed-loop generation-verification-diagnosis-repair problem on an HLS tool (Xilinx Vitis), contributing three components: an end-to-end workflow of cooperating agents closed by the four-stage verifier under strict evidence isolation; a Progressive Mismatch Localization Chain (PMLC) that localizes CSim/CoSim mismatches through log normalization, AST backward slicing, and dual-trace instrumentation; and a typed-query, two-stage evidence RAG backed by a self-evolving, family-routed repair-card pool. Experimental results show that the proposed workflow substantially outperforms all comparable state-of-the-art models.
Problem

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

High-Level Synthesis
Synthesizable C
LLM Agent
C-to-HLS Conversion
Verification
Innovation

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

Evidence-Driven LLM Agent
C-to-HLS-C Conversion
Progressive Mismatch Localization Chain
Typed-Query RAG
Closed-Loop Verification
🔎 Similar Papers
No similar papers found.
Zhe Zhao
Zhe Zhao
Renmin university of China
natural language processing
H
Hongbing Lang
Shenzhen Belon Technology Co., Ltd., Shenzhen 518055, China
Z
Zhihan Xiao
Shenzhen International Graduate School, Tsinghua University, Shenzhen 518055, China
L
Luke Ztz Hu
Shenzhen International Graduate School, Tsinghua University, Shenzhen 518055, China
J
John Imoleayo Adebisi
Shenzhen International Graduate School, Tsinghua University, Shenzhen 518055, China
S
Songping Mai
Shenzhen International Graduate School, Tsinghua University, Shenzhen 518055, China