paper-with-me

홈 › Papers

CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generation

2025-02-15 · Kefan Li, Hongyue Yu, Tingyu Guo, Shijie Cao, Yuan Yuan

Large Language Models (LLMs) have shown remarkable performance in automated code generation. However, existing approaches often rely heavily on pre-defined test cases, which become impractical in scenarios where such cases are unavailable. While prior works explore filtering techniques between programs and test cases, they overlook the refinement of test cases. To address this limitation, we introduce CoCoEvo, a novel LLM-based co-evolution framework that simultaneously evolves programs and test cases. CoCoEvo eliminates the dependency on pre-defined test cases by generating both programs and test cases directly from natural language problem descriptions and function headers. The framework employs specialized evolutionary operators, including LLM-based crossover and mutation operators for program evolution, along with a test case generation operator for test case evolution. Additionally, we propose optimization strategies such as a crossover rate scheduler to balance exploration and convergence, and a multi-objective optimization method for test case selection. Experimental results on multiple state-of-the-art LLMs demonstrate that CoCoEvo surpasses existing methods, achieving state-of-the-art performance in automated code generation and testing. These results underscore the potential of co-evolutionary techniques in advancing the field of automated programming.

📄 PDF Abstract BibTeX arXiv:2502.10802

Code (1)

lbaf23/llm-cocoevo

Tasks

Code Generation

Similar Papers 제목 키워드 기반

Consistency-Driven Co-Evolution for Self-Supervised Cross-Representation Learning

2026-08-05 · Xuehang Guo, Pengyuan Li, Tom Hope, Tirthankar Ghosal 외 hf

As chart images, tabular data, and visualization code play increasingly important roles across diverse domains, cross-representation understanding across these modalities poses fundamental challenges for AI systems: the …

Representation Learning

MTGP: Combining Metamorphic Testing and Genetic Programming

2023-01-20 · Dominik Sobania, Martin Briesch, Philipp Röchner, Franz Rothlauf

Genetic programming is an evolutionary approach known for its performance in program synthesis. However, it is not yet mature enough for a practical use in real-world software development, since usually many training cas…

Program Synthesis

Many-Objective Neuroevolution for Testing Games

2025-01-14 · Patric Feldmeier, Katrin Schmelz, Gordon Fraser

Generating tests for games is challenging due to the high degree of randomisation inherent to games and hard-to-reach program states that require sophisticated gameplay. The test generator NEATEST tackles these challenge…

software testing

The Composability of Intermediate Values in Composable Inductive Programming

2021-07-04 · Edward McDaid, Sarah McDaid

It is believed that mechanisms including intermediate values enable composable inductive programming (CIP) to be used to produce software of any size. We present the results of a study that investigated the relationships…

Understanding Evolutionary Potential in Virtual CPU Instruction Set Architectures

2013-09-03 · David M. Bryson, Charles Ofria

We investigate fundamental decisions in the design of instruction set architectures for linear genetic programs that are used as both model systems in evolutionary biology and underlying solution representations in evolu…

CPU