paper-with-me

Papers

STAB: Specification-driven Testing for Algorithmic Bottlenecks

2026-05-27 · Soohan Lim, Joonghyuk Hahn, Hyundong Jin, Yo-Sub Han arxiv

Evaluating the efficiency of algorithmic code requires test cases that expose runtime bottlenecks. Previous methods generate efficiency test cases either by increasing input size or by generating code-specific inputs that make the given implementation run slowly. Consequently, they do not address the structural input conditions that drive the algorithmic worst case. We introduce STAB, a specification-driven pipeline that generates test cases that expose algorithmic bottlenecks from a natural-language problem specification alone. STAB separates the task into constraint-bound maximization and adversarial structure injection. (i) The constraint saturator extracts constraints and resolves large admissible size assignments using rule-based saturation and CP-SAT optimization over related variables. (ii) The adversarial scenario injector retrieves implementation-level adversarial construction principles from a curated scenario catalog using keyword matching and K-nearest neighbors (KNN). STAB encodes the problem specification, resolved boundary, and retrieved construction principles into a structured generation specification, from which the LLM synthesizes a Python test case generator. On CodeContests, STAB raises the rate of generated test cases that expose algorithmic bottlenecks from 50.43% to 73.45% on average across open-source LLMs and from 57.45% to 71.85% on average across closed-source LLMs, with consistent gains across Python, Java, and C++. Our code is available at https://github.com/suhanmen/STAB.

📄 PDF Abstract BibTeX arXiv:2605.27981

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languages

2024-06-14 · Shuvendu K. Lahiri

Verification-aware programming languages such as Dafny and F* provide means to formally specify and prove properties of a program. Although the problem of checking an implementation against a specification can be defined…

Code Generationmbpp

Unit Testing in ASP Revisited: Language and Test-Driven Development Environment

2024-01-04 · Giovanni Amendola, Tobias Berei, Giuseppe Mazzotta, Francesco Ricca

Unit testing frameworks are nowadays considered a best practice, included in almost all modern software development processes, to achieve rapid development of correct specifications. Knowledge representation and reasonin…

test driven development

VeriContest: A Competitive-Programming Benchmark for Verifiable Code Generation

2026-05-08 · Zichen Xie, Mrigank Pawagi, Yuxin Liu, Aaditi Rai 외 arxiv

Large language models can generate useful code from natural language, but their outputs come without correctness guarantees. Verifiable code generation offers a path beyond testing by requiring models to produce not only…

Program SynthesisCode Generation

Braxlines: Fast and Interactive Toolkit for RL-driven Behavior Engineering beyond Reward Maximization

2021-10-10 · Shixiang Shane Gu, Manfred Diaz, Daniel C. Freeman, Hiroki Furuta 외

The goal of continuous control is to synthesize desired behaviors. In reinforcement learning (RL)-driven approaches, this is often accomplished through careful task reward engineering for efficient exploration and runnin…

continuous-controlContinuous ControlEfficient ExplorationReinforcement Learning (RL)

Mitigating Covariate Shift in Misspecified Regression with Applications to Reinforcement Learning

2024-01-22 · Philip Amortila, Tongyi Cao, Akshay Krishnamurthy

A pervasive phenomenon in machine learning applications is distribution shift, where training and deployment conditions for a machine learning model differ. As distribution shift typically results in a degradation in per…

regressionreinforcement-learning