paper-with-me

홈 › Papers

Automated C/C++ Program Repair for High-Level Synthesis via Large Language Models

2024-07-04 · Kangwei Xu, Grace Li Zhang, Xunzhao Yin, Cheng Zhuo, Ulf Schlichtmann, Bing Li

In High-Level Synthesis (HLS), converting a regular C/C++ program into its HLS-compatible counterpart (HLS-C) still requires tremendous manual effort. Various program scripts have been introduced to automate this process. But the resulting codes usually contain many issues that should be manually repaired by developers. Since Large Language Models (LLMs) have the ability to automate code generation, they can also be used for automated program repair in HLS. However, due to the limited training of LLMs considering hardware and software simultaneously, hallucinations may occur during program repair using LLMs, leading to compilation failures. Besides, using LLMs for iterative repair also incurs a high cost. To address these challenges, we propose an LLM-driven program repair framework that takes regular C/C++ code as input and automatically generates its corresponding HLS-C code for synthesis while minimizing human repair effort. To mitigate the hallucinations in LLMs and enhance the prompt quality, a Retrieval-Augmented Generation (RAG) paradigm is introduced to guide the LLMs toward correct repair. In addition, we use LLMs to create a static bit width optimization program to identify the optimized bit widths for variables. Moreover, LLM-driven HLS optimization strategies are introduced to add/tune pragmas in HLS-C programs for circuit optimization. Experimental results demonstrate that the proposed LLM-driven automated framework can achieve much higher repair pass rates in 24 real-world applications compared with the traditional scripts and the direct application of LLMs for program repair.

📄 PDF Abstract BibTeX arXiv:2407.03889

Code (0)

등록된 구현이 없습니다.

Tasks

C++ codeCode GenerationHigh-Level SynthesisProgram RepairRAGRetrieval-augmented Generation

Similar Papers 제목 키워드 기반

Peer-aided Repairer: Empowering Large Language Models to Repair Advanced Student Assignments

2024-04-02 · Qianhui Zhao, Fang Liu, Li Zhang, Yang Liu 외

Automated generation of feedback on programming assignments holds significant benefits for programming education, especially when it comes to advanced assignments. Automated Program Repair techniques, especially Large La…

Language ModellingLarge Language ModelProgram Repair

RepoRepair: Leveraging Code Documentation for Repository-Level Automated Program Repair

2026-03-01 · Zhongqiang Pan, Chuanyi Li, Wenkang Zhong, Yi Feng 외 arxiv

Automated program repair (APR) struggles to scale from isolated functions to full repositories, as it demands a global, task-aware understanding to locate necessary changes. Current methods, limited by context and relian…

Program Repair

Towards Mixed Optimization for Reinforcement Learning with Program Synthesis

2018-07-01 · Surya Bhupatiraju, Kumar Krishna Agrawal, Rishabh Singh

Deep reinforcement learning has led to several recent breakthroughs, though the learned policies are often based on black-box neural networks. This makes them difficult to interpret and to impose desired specification co…

Deep Reinforcement LearningProgram RepairProgram Synthesisreinforcement-learning+2

SpecAHD: Localize to Specialize for Automated Heuristic Design in Large-Scale Routing Problems

2026-07-26 · Kezhao Lai, Yutao Lai, Hai-Lin Liu arxiv

LLM-based automated heuristic design (AHD) typically scores executable programs on complete instances or within fixed solver components. In large-scale routing problems, localized reconstruction reduces the size of each …

Dr. Boot: Bootstrapping Program Synthesis Language Models to Perform Repairing

2025-07-20 · Noah van der Vleuten arxiv

Language models for program synthesis are usually trained and evaluated on programming competition datasets (MBPP, APPS). However, these datasets are limited in size and quality, while these language models are extremely…

Reinforcement LearningProgram Synthesis