LEGO-Compiler: Enhancing Neural Compilation Through Translation Composability
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.
Code (0)
등록된 구현이 없습니다.
Tasks
Code TranslationTranslationSimilar Papers 제목 키워드 기반
Boosting Neural Networks to Decompile Optimized Binaries
Decompilation aims to transform a low-level program language (LPL) (eg., binary file) into its functionally-equivalent high-level program language (HPL) (e.g., C/C++). It is a core technology in software security, especi…
Graph Neural NetworkMachine TranslationMalware AnalysisNMT+1Towards Neural Decompilation
We address the problem of automatic decompilation, converting a program in low-level representation back to a higher-level human-readable programming language. The problem of decompilation is extremely important for secu…
C++ codeMachine TranslationTranslationBeyond the C: Retargetable Decompilation using Neural Machine Translation
The problem of reversing the compilation process, decompilation, is an important tool in reverse engineering of computer software. Recently, researchers have proposed using techniques from neural machine translation to a…
C++ codeMachine TranslationTranslationQiMeng-NeuComBack: Self-Evolving Translation from IR to Assembly Code
Compilers, while essential, are notoriously complex systems that demand prohibitively expensive human expertise to develop and maintain. The recent advancements in Large Language Models (LLMs) offer a compelling new para…
Compiler Optimization for Quantum Computing Using Reinforcement Learning
Any quantum computing application, once encoded as a quantum circuit, must be compiled before being executable on a quantum computer. Similar to classical compilation, quantum compilation is a sequential process with man…
Compiler Optimizationreinforcement-learningReinforcement LearningReinforcement Learning (RL)