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

要約

ハードウェアのエコシステムは急速に進化しており、既存のコードの携帯性と寿命を強化するための迅速で柔軟で正しい方法で、異なる命令セットアーキテクチャ(ISA)にわたって低レベルのプログラムを翻訳することに関心が高まっています。
この輸送問題の特に困難なクラスは、命令の複雑さ、メモリモデル、および実行パラダイムの基本的な違いにより、複雑な(CISC)と減少(RISC)ハードウェアアーキテクチャの間で翻訳されることです。
この作業では、事前に訓練された大手言語モデル(LLMS)の翻訳能力と確立されたソフトウェアテスト構造の厳格さを組み合わせたISA中心のトランスピレーションパイプラインであるGG(保証済み推測)を導入します。
私たちの方法は、あるISAから別のISAへのLLMを使用して候補の翻訳を生成し、ソフトウェアテストフレームワークにそのような翻訳を埋め込み、翻訳に定量化可能な信頼を構築します。
GGアプローチを2つの多様なデータセットで評価し、単体テストで高いコードカバレッジ(> 98%)を実施し、Humanevalプログラムで99%、BringUpBenchプログラムでそれぞれ49%の機能/セマンティックの正しさを達成します。
さらに、Appleシリコンの最先端のRosetta 2フレームワークとのアプローチを比較し、1.73倍のランタイムパフォーマンス、1.47倍のエネルギー効率の1.47倍、容量のあるコードの2.41倍のメモリ使用量を2.41倍に紹介し、現実のCISC-recisc翻訳タスクのGGの有効性を実証します。
コード、データ、モデル、ベンチマークをオープンソーシングして、ISAレベルのコード翻訳研究の共通の基盤を確立します。

要約(オリジナル)

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.

arxiv情報

著者 Ahmed Heakl,Sarim Hashmi,Chaimaa Abi,Celine Lee,Abdulrahman Mahmoud
発行日 2025-06-17 15:06:54+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AR, cs.CL, cs.LG, cs.PL, cs.SE パーマリンク