PLAISEMay 26, 2025

LEGO-Compiler: Enhancing Neural Compilation Through Translation Composability

arXiv:2505.20356v11 citationsh-index: 14
Originality Incremental advance
AI Analysis

This addresses the challenge of applying LLMs to system-level tasks like compiler design, offering a novel approach that complements traditional methods, though it appears incremental in enhancing existing neural compilation techniques.

The paper tackles the problem of LLMs struggling with long and complex programs in neural compilation by introducing LEGO-Compiler, which decomposes programs into blocks and uses verifiable steps, achieving over 99% accuracy on ExeBench and 97.9% on AnsiBench with near one order-of-magnitude improvement in scalability.

Large language models (LLMs) have the potential to revolutionize how we design and implement compilers and code translation tools. However, existing LLMs struggle to handle long and complex programs. We introduce LEGO-Compiler, a novel neural compilation system that leverages LLMs to translate high-level languages into assembly code. Our approach centers on three key innovations: LEGO translation, which decomposes the input program into manageable blocks; breaking down the complex compilation process into smaller, simpler verifiable steps by organizing it as a verifiable LLM workflow by external tests; and a feedback mechanism for self-correction. Supported by formal proofs of translation composability, LEGO-Compiler demonstrates high accuracy on multiple datasets, including over 99% on ExeBench and 97.9% on industrial-grade AnsiBench. Additionally, LEGO-Compiler has also acheived near one order-of-magnitude improvement on compilable code size scalability. This work opens new avenues for applying LLMs to system-level tasks, complementing traditional compiler technologies.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes