LogiCase: Effective Test Case Generation from Logical Description in Competitive Programming

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Sung, Sicheol, Aditi, kim, Dogyu, Han, Yo-Sub, Ko, Sang-Ki
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913849948504064
author Sung, Sicheol
Aditi
kim, Dogyu
Han, Yo-Sub
Ko, Sang-Ki
author_facet Sung, Sicheol
Aditi
kim, Dogyu
Han, Yo-Sub
Ko, Sang-Ki
contents Automated Test Case Generation (ATCG) is crucial for evaluating software reliability, particularly in competitive programming where robust algorithm assessments depend on diverse and accurate test cases. However, existing ATCG methods often fail to meet complex specifications or generate effective corner cases, limiting their utility. In this work, we introduce Context-Free Grammars with Counters (CCFGs), a formalism that captures both syntactic and semantic structures in input specifications. Using a fine-tuned CodeT5 model, we translate natural language input specifications into CCFGs, enabling the systematic generation of high-quality test cases. Experiments on the CodeContests dataset demonstrate that CCFG-based test cases outperform baseline methods in identifying incorrect algorithms, achieving significant gains in validity and effectiveness. Our approach provides a scalable and reliable grammar-driven framework for enhancing automated competitive programming evaluations.
format Preprint
id arxiv_https___arxiv_org_abs_2505_15039
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle LogiCase: Effective Test Case Generation from Logical Description in Competitive Programming
Sung, Sicheol
Aditi
kim, Dogyu
Han, Yo-Sub
Ko, Sang-Ki
Software Engineering
Artificial Intelligence
Automated Test Case Generation (ATCG) is crucial for evaluating software reliability, particularly in competitive programming where robust algorithm assessments depend on diverse and accurate test cases. However, existing ATCG methods often fail to meet complex specifications or generate effective corner cases, limiting their utility. In this work, we introduce Context-Free Grammars with Counters (CCFGs), a formalism that captures both syntactic and semantic structures in input specifications. Using a fine-tuned CodeT5 model, we translate natural language input specifications into CCFGs, enabling the systematic generation of high-quality test cases. Experiments on the CodeContests dataset demonstrate that CCFG-based test cases outperform baseline methods in identifying incorrect algorithms, achieving significant gains in validity and effectiveness. Our approach provides a scalable and reliable grammar-driven framework for enhancing automated competitive programming evaluations.
title LogiCase: Effective Test Case Generation from Logical Description in Competitive Programming
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2505.15039