ReaComp: Compiling LLM Reasoning into Symbolic Solvers for Efficient Program Synthesis

Atharva Naik, Yash Mathur, Prakam, Carolyn Rose, David Mortensen
5/6/2026
cs.CLcs.AI

No official code found. Best implementation: cmu-llab/ReaComp (2 stars, MIT, last commit 2026-05-18).

Abstract

LLMs can solve program synthesis tasks but remain inefficient and unreliable on hard instances requiring large combinatorial search. Given a small set of reasoning traces, we use coding agents to compile them into reusable symbolic program synthesizers over constrained DSLs. The resulting solvers require no LLM calls at test time and are strong standalone systems: symbolic solver ensembles reach 91.3% accuracy on PBEBench-Lite and 84.7% on PBEBench-Hard, outperforming LLMs with test-time scaling for the latter by +16.3 percentage points at zero LLM inference cost. They also complement LLM search, improving PBEBench-Hard accuracy from 68.4% to 85.8% while reducing reported token usage by 78%, and raising SLR-Bench hard-tier accuracy from 34.4% to 58.0% in a neuro-symbolic hybrid setting. Compared to directly using coding agents as per-instance solvers, induced solvers are substantially more Pareto-efficient, amortizing a small one-time construction cost over many zero-token executions. Finally, most solvers transfer zero-shot to a real historical linguistics task - predicting sound changes in natural language data - reaching 80.1% accuracy under ensembling and recovering some plausible linguistic rules. Together, these results show that reasoning traces can be compiled into reusable symbolic solvers that solve many tasks directly, complement LLM inference on hard cases, and provide a scalable route to domain-general solver induction. We release code and data for reproducibility.

View on arXivView PDF

Code Implementations(1)

cmu-llab/ReaCompCommunity73%
MIT

Code for "ReaComp: Compiling LLM Reasoning into Symbolic Solvers for Efficient Program Synthesis"

20Mar 17, 20265 months agoMIT

Similar Papers

Cite this paper

@article{naik2026reacomp,
  title  = {ReaComp: Compiling LLM Reasoning into Symbolic Solvers for Efficient Program Synthesis},
  author = {Atharva Naik and Yash Mathur and Prakam and Carolyn Rose and David Mortensen},
  year   = {2026},
  eprint = {2605.05485},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.05485v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.05485.svg)](https://codeofpaper.com/paper/2605.05485)

Discussion