PALM: Synergizing Program Analysis and LLMs to Enhance Rust Unit Test Coverage
Bei Chu, Yang Feng, Kui Liu, Hange Shi, Zifan Nan, Zhaoqiang Guo, Baowen Xu

TL;DR
PALM combines program analysis with large language models to generate high-coverage Rust unit tests, significantly improving coverage over traditional methods within a few hours.
Contribution
This work introduces PALM, a novel approach that integrates program analysis with LLMs to enhance automated unit test generation for Rust programs.
Findings
Test coverage increased by over 50% in some projects
Generated tests achieved an average coverage of 72.30%
80 out of 91 tests submitted were accepted
Abstract
Unit testing is essential for ensuring software reliability and correctness. Classic Search-Based Software Testing (SBST) methods and concolic execution-based approaches for generating unit tests often fail to achieve high coverage due to difficulties in handling complex program units, such as branching conditions and external dependencies. Recent work has increasingly utilized large language models (LLMs) to generate test cases, improving the quality of test generation by providing better context and correcting errors in the model's output. However, these methods rely on fixed prompts, resulting in relatively low compilation success rates and coverage. This paper presents PALM, an approach that leverages large language models (LLMs) to enhance the generation of high-coverage unit tests. PALM performs program analysis to identify branching conditions within functions, which are then…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
