ChatPaper.aiChatPaper

Gegarandeerde Gok: Een Taalmodelbenadering voor CISC-naar-RISC Transpilatie met Testgaranties

Guaranteed Guess: A Language Modeling Approach for CISC-to-RISC Transpilation with Testing Guarantees

June 17, 2025
Auteurs: Ahmed Heakl, Sarim Hashmi, Chaimaa Abi, Celine Lee, Abdulrahman Mahmoud
cs.AI

Samenvatting

Het hardware-ecosysteem evolueert snel, met een groeiende interesse in het vertalen van low-level programma's tussen verschillende instructiesetarchitecturen (ISA's) op een snelle, flexibele en correcte manier om de draagbaarheid en levensduur van bestaande code te verbeteren. Een bijzonder uitdagende klasse van dit transpilatieprobleem is het vertalen tussen complexe (CISC) en gereduceerde (RISC) hardwarearchitecturen, vanwege fundamentele verschillen in instructiecomplexiteit, geheugenmodellen en uitvoeringsparadigma's. In dit werk introduceren we GG (Guaranteed Guess), een ISA-centraal transpilatiepijplijn die de vertaalkracht van vooraf getrainde grote taalmodellen (LLM's) combineert met de strengheid van gevestigde softwaretestconstructies. Onze methode genereert kandidaatvertalingen met behulp van een LLM van de ene naar de andere ISA, en integreert deze vertalingen binnen een softwaretestframework om een kwantificeerbaar vertrouwen in de vertaling op te bouwen. We evalueren onze GG-aanpak over twee diverse datasets, handhaven een hoge code-dekking (>98%) in unit-tests, en behalen een functionele/semantische correctheid van 99% op HumanEval-programma's en 49% op BringupBench-programma's. Verder vergelijken we onze aanpak met het state-of-the-art Rosetta 2-framework op Apple Silicon, waarbij we een 1,73x snellere runtime-prestatie, 1,47x betere energie-efficiëntie en 2,41x beter geheugengebruik voor onze getranspileerde code laten zien, wat de effectiviteit van GG voor real-world CISC-naar-RISC-vertaaltaken aantoont. We zullen onze codes, data, modellen en benchmarks openbaren om een gemeenschappelijke basis te creëren voor onderzoek naar ISA-niveau codevertaling.
English
The hardware ecosystem is rapidly evolving, with increasing interest in translating low-level programs across different instruction set architectures (ISAs) in a quick, flexible, and correct way to enhance the portability and longevity of existing code. A particularly challenging class of this transpilation problem is translating between complex- (CISC) and reduced- (RISC) hardware architectures, due to fundamental differences in instruction complexity, memory models, and execution paradigms. In this work, we introduce GG (Guaranteed Guess), an ISA-centric transpilation pipeline that combines the translation power of pre-trained large language models (LLMs) with the rigor of established software testing constructs. Our method generates candidate translations using an LLM from one ISA to another, and embeds such translations within a software-testing framework to build quantifiable confidence in the translation. We evaluate our GG approach over two diverse datasets, enforce high code coverage (>98%) across unit tests, and achieve functional/semantic correctness of 99% on HumanEval programs and 49% on BringupBench programs, respectively. Further, we compare our approach to the state-of-the-art Rosetta 2 framework on Apple Silicon, showcasing 1.73x faster runtime performance, 1.47x better energy efficiency, and 2.41x better memory usage for our transpiled code, demonstrating the effectiveness of GG for real-world CISC-to-RISC translation tasks. We will open-source our codes, data, models, and benchmarks to establish a common foundation for ISA-level code translation research.
PDF112June 18, 2025