Search papers, labs, and topics across Lattice.
This paper introduces DuET, a dual-execution framework for test output prediction that combines direct execution of generated code with LLM-based pseudocode execution. By using functional majority voting between these two complementary approaches, DuET mitigates the limitations of code execution errors and pseudocode hallucination. Experiments on LiveCodeBench demonstrate that DuET achieves state-of-the-art performance, improving Pass@1 by 13.6 percentage points.
LLMs predict test outputs far more reliably when they can vote between running buggy code and "reasoning" over pseudocode.
This work addresses test output prediction, a key challenge in test case generation. To improve the reliability of predicted outputs by LLMs, prior approaches generate code first to ground predictions. One grounding strategy is direct execution of generated code, but even minor errors can cause failures. To address this, we introduce LLM-based pseudocode execution, which grounds prediction on more error-resilient pseudocode and simulates execution via LLM reasoning. We further propose DuET, a dual-execution framework that combines both approaches by functional majority voting. Our analysis shows the two approaches are complementary in overcoming the limitations of direct execution suffering from code errors, and pseudocode reasoning from hallucination. On LiveCodeBench, DuET achieves the state-of-the-art performance, improving Pass@1 by 13.6 pp.