CCompAIler: A CPU-Only, LLM-Driven C Compiler for Test-Guided Program Repair
CCompAIler places a CPU-only, LLM-driven repair layer between imperfect C source and a conventional compiler. Rather than requiring the author or model to produce correct code initially, it combines learned proposals with deterministic search and executable acceptance checks. The developer supplies a single-file console program, intended behavior, and input/output tests. A fixed quantized seven-billion-parameter model proposes complete functions using compiler diagnostics and dependency context. Structural checks preserve interfaces; expression search and helper/caller transactions combine alternatives after model inference ends. The implementation provides an installable compiler driver and a Docker-hosted browser correction service without GPU offloading or paid model inference. On six constructed 179–210-line programs containing 43 injected faults, plus two correct controls, final outputs passed 78 scenarios per program under both TinyCC and GCC/UBSan, totaling 1,248 successful executions. These historical searches reused 86 recorded model proposals; only the final 24 scenarios per application were generated after source selection. A completed external evaluation retained all 332 preselected IntroClass programs: 124 changed repairs (37.3%) passed both black-box and held-out white-box suites under TinyCC, and 118 also passed GCC/UBSan checks. Eleven visible-test-accepted repairs failed held-out tests. Separate package and live-service checks exercise the released software. The contribution is an inspectable compilation-oriented repair pipeline with explicit coverage, provenance, and failure reporting. Its executable release contract establishes test acceptance within the supported scope, rather than universal semantic correctness.
Authors
- Angshul Majumdar (ORCID: https://orcid.org/0000-0002-1065-3000)
Publication Details
- Journal
- Preprints.org
- Published
- 2026-12-03
- DOI
- https://doi.org/10.20944/preprints202612.0413.v1
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- preprint