LLM4CBI: Taming LLMs to Generate Effective Test Programs for Compiler Bug Isolation

07/02/2023
by   Haoxin Tu, et al.
0

Compiler bugs pose a significant threat to safety-critical applications, and promptly and effectively isolating these bugs is crucial for assuring the quality of compilers. However, the limited availability of debugging information on reported bugs complicates the compiler bug isolation task. Existing compiler bug isolation approaches typically convert the problem into a test program mutation problem, but they are still limited by ineffective mutation strategies or high human effort requirements. Drawing inspiration from the recent progress of pre-trained Large Language Models (LLMs), such as ChatGPT, in code generation, we propose a new approach named LLM4CBI to tame LLMs to generate effective test programs for compiler bug isolation. However, using LLMs directly for test program mutation may not yield the desired results due to the challenges associated with formulating precise prompts and selecting specialized prompts. To overcome the challenges, three new components are designed in LLM4CBI. (1) LLM4CBI utilizes a program complexity-guided prompt production component, which leverages data and control flow analysis to identify the most valuable variables and locations in programs for mutation. (2) LLM4CBI employs a memorized prompt selection component, which adopts reinforcement learning to select specialized prompts for mutating test programs continuously. (3) A test program validation component is proposed to select specialized feedback prompts to avoid repeating the same mistakes during the mutation process. Compared with the state-of-the-art approaches (DiWi and RecBi), our evaluation demonstrates the advantages of LLM4CBI: It isolates more bugs, ranging from 13.6 approaches. Additionally, we demonstrate that LLM4CBI is extensible, allowing for easy integration with other LLMs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/17/2023

Directed Test Program Generation for JIT Compiler Bug Localization

Bug localization techniques for Just-in-Time (JIT) compilers are based o...
research
02/25/2019

A Systematic Impact Study for Fuzzer-Found Compiler Bugs

Despite much recent interest in randomised testing (fuzzing) of compiler...
research
11/17/2022

Where Did My Variable Go? Poking Holes in Incomplete Debug Information

The availability of debug information for optimized executables can larg...
research
12/11/2020

Type-Centric Kotlin Compiler Fuzzing: Preserving Test Program Correctness by Preserving Types

Kotlin is a relatively new programming language from JetBrains: its deve...
research
12/27/2018

Learning How to Mutate Source Code from Bug-Fixes

Mutation testing has been widely accepted as an approach to guide test c...
research
02/02/2023

Effective Random Test Generation for Deep Learning Compilers

Deep learning compilers help address difficulties of deploying deep lear...
research
05/26/2023

Towards More Realistic Evaluation for Neural Test Oracle Generation

Effective unit tests can help guard and improve software quality but req...

Please sign up or login with your details

Forgot password? Click here to reset