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

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

21 May 2025arXiv:2505.15039archive 2025-07-28

Sicheol Sung, Aditi, Dogyu kim, Yo-Sub Han, Sang-Ki Ko

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.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2505.15039")

Code

Syntology Ran 11 of 19 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 2 ran · honoured contract; 6 ran · our draft was wrong; 3 ran with no contract checked.

By repository: found in paper text by Syntology: 19 samples from 1 repository, 11 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Aditi1612/Grammar-based-test-case-generation found in paper text by Syntology report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 11 ran; 2 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
6ran · our draft was wrong
3ran
8unverified

Licence: 19 of the 19 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from Aditi1612/Grammar-based-test-case-generation. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Comparison Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran licence not identified · pointer only · 28cf845eed963801 · report
Constraint Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran licence not identified · pointer only · 5c9d21851339dda0 · report
InvalidGrammarError Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran · metamorphic tier: deterministic licence not identified · pointer only · 151e6de68310bba3 · report
_comparator_to_str Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran · our draft was wrong fingerprinted licence not identified · pointer only · 11faa5c2b71ca449 · report
_normalize_comparison Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran · our draft was wrong licence not identified · pointer only · 64878c6e6559bfbd · report
_parse_comparands Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran · our draft was wrong fingerprinted licence not identified · pointer only · e81c6113e28eaa97 · report
_parse_comparator Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran · honoured contract licence not identified · pointer only · a91035038012d48f · report
_split Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran · our draft was wrong fingerprinted licence not identified · pointer only · 4b2e246493f4b4d9 · report
_to_transitive_bound Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran · our draft was wrong licence not identified · pointer only · 7c42701d0e35d0a9 · report
normalize_variable Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran · our draft was wrong fingerprinted licence not identified · pointer only · 117c9e8b5e4ef49b · report
parse_comparand Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology ran · honoured contract fingerprinted licence not identified · pointer only · 974eb395003a3911 · report
Comparator Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology unverified licence not identified · pointer only · 7a2093db64b50596 · report
CountingContextFreeGrammar Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology unverified licence not identified · pointer only · efdedce16aee6681 · report
InvalidConstraintError Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology unverified licence not identified · pointer only · 9e38841c5db26e61 · report
InvalidProductionError Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology unverified licence not identified · pointer only · a5706e1f3b741877 · report
SubscriptType Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology unverified licence not identified · pointer only · ef73f3e6b207c8f6 · report
TokenType Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology unverified licence not identified · pointer only · a726defcf0dea380 · report
_update_constraints_and_comparisons Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology unverified licence not identified · pointer only · 9dbded1261c13d89 · report
parse Aditi1612/Grammar-based-test-case-generation/src/counting_context_free_grammar/counting_context_free_grammar.py found in paper text by Syntology unverified licence not identified · pointer only · 7ecc2b0e46187127 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdafactorAttentionAttention DropoutBPECodeT5Dense ConnectionsDropoutGated Linear UnitInverse Square Root ScheduleLayer NormalizationLinear LayerMulti-Head AttentionResidual ConnectionSentencePieceSoftmaxT5

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections