論文の概要: Code Quality Analysis of Translations from C to Rust
- arxiv url: http://arxiv.org/abs/2602.00840v1
- Date: Sat, 31 Jan 2026 18:12:03 GMT
- ステータス: 情報取得中
- システム内更新日: 2026-02-03 14:05:03.746666
- Title: Code Quality Analysis of Translations from C to Rust
- Title(参考訳): CからRustへの翻訳のコード品質解析
- Authors: Biruk Tadesse, Vikram Nitin, Mazin Salah, Baishakhi Ray, Marcelo d'Amorim, Wesley Assunção,
- Abstract要約: C/C++は一般的なプログラミング言語である。しかしながら、メモリとスレッドセーフティの問題に悩まされている。
最近の研究で、Rustのようなより安全な言語へのC/C++の自動翻訳が検討されている。
本研究では、C2Rust(トランスパイラ)、C2SaferRust(LSM誘導トランスパイラ)、TranslationGymの3つのC-to-Rustトランスパイラの強度と弱点について検討する。
- 参考スコア(独自算出の注目度): 10.42011095909225
- License:
- Abstract: C/C++ is a prevalent programming language. Yet, it suffers from significant memory and thread-safety issues. Recent studies have explored automated translation of C/C++ to safer languages, such as Rust. However, these studies focused mostly on the correctness and safety of the translated code, which are indeed critical, but they left other important quality concerns (e.g., performance, robustness, and maintainability) largely unexplored. This work investigates strengths and weaknesses of three C-to-Rust translators, namely C2Rust (a transpiler), C2SaferRust (an LLM-guided transpiler), and TranslationGym (an LLM-based direct translation). We perform an in-depth quantitative and qualitative analysis of several important quality attributes for the translated Rust code of the popular GNU coreutils, using human-based translation as a baseline. To assess the internal and external quality of the Rust code, we: (i) apply Clippy, a rule-based state-of-the-practice Rust static analysis tool; (ii) investigate the capability of an LLM (GPT-4o) to identify issues potentially overlooked by Clippy; and (iii) perform a manual analysis of the issues reported by Clippy and GPT-4o. Our results show that while newer techniques reduce some unsafe and non-idiomatic patterns, they frequently introduce new issues, revealing systematic trade-offs that are not visible under existing evaluation practices. Notably, none of the automated techniques consistently match or exceed human-written translations across all quality dimensions, yet even human-written Rust code exhibits persistent internal quality issues such as readability and non-idiomatic patterns. Together, these findings show that translation quality remains a multi-dimensional challenge, requiring systematic evaluation and targeted tool support beyond both naive automation and manual rewriting.
- Abstract(参考訳): C/C++は一般的なプログラミング言語である。
しかし、大きなメモリとスレッドセーフティの問題に悩まされている。
最近の研究で、Rustのようなより安全な言語へのC/C++の自動翻訳が検討されている。
しかし、これらの研究は主に翻訳されたコードの正確さと安全性に焦点を合わせており、これは確かに重要であるが、他の重要な品質上の懸念(例えば、性能、堅牢性、保守性)は、ほとんど探索されていない。
本研究は、C2Rust(トランスパイラ)、C2SaferRust(LSM誘導トランスパイラ)、TranslationGym(LSMをベースとした直接翻訳)の3つのC-to-Rustトランスパイラの強度と弱点について検討する。
我々は、GNUコアユーティリティの翻訳されたRustコードに対して、人間による翻訳をベースラインとして、いくつかの重要な品質特性について、詳細な定量的、定性的な分析を行う。
Rustコードの内部品質と外部品質を評価するには、以下のとおりです。
(i)ルールベースのRust静的解析ツールであるClippyを適用する。
2) Clippy が見落としている可能性のある問題を識別する LLM (GPT-4o) の能力について検討すること。
3) Clippy と GPT-4o が報告した問題を手動で分析する。
以上の結果から,新しい手法は安全でない,非慣用的なパターンを少なくするが,新しい問題を頻繁に導入し,既存の評価手法では見えない体系的なトレードオフを明らかにしている。
注目すべきなのは、自動化されたテクニックはすべて、すべての品質次元にわたる人による翻訳と一貫して一致したり、超えたりしないことだ。
これらの結果から,翻訳の質は多次元的課題であり,体系的な評価と,素早い自動化と手作業による書き直し以上のツールサポートが必要であることが示唆された。
関連論文リスト
- Training Language Models to Generate Quality Code with Program Analysis Feedback [66.0854002147103]
大規模言語モデル(LLM)によるコード生成は、ますます本番環境で採用されているが、コード品質の保証には失敗している。
実運用品質のコードを生成するためにLLMにインセンティブを与える強化学習フレームワークであるREALを提案する。
論文 参考訳(メタデータ) (2025-05-28T17:57:47Z) - CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilation [51.18863297461463]
CRUST-Benchは100のCリポジトリのデータセットで、それぞれが安全なRustとテストケースで手書きのインターフェースとペアリングされている。
我々は、このタスクで最先端の大規模言語モデル(LLM)を評価し、安全で慣用的なRust生成が依然として難しい問題であることを確認した。
最高のパフォーマンスモデルであるOpenAI o1は、ワンショット設定で15タスクしか解決できない。
論文 参考訳(メタデータ) (2025-04-21T17:33:33Z) - Do LLMs Understand Your Translations? Evaluating Paragraph-level MT with Question Answering [68.3400058037817]
本稿では,TREQA(Translation Evaluation via Question-Answering)について紹介する。
我々は,TREQAが最先端のニューラルネットワークとLLMベースのメトリクスより優れていることを示し,代用段落レベルの翻訳をランク付けする。
論文 参考訳(メタデータ) (2025-04-10T09:24:54Z) - RustMap: Towards Project-Scale C-to-Rust Migration via Program Analysis and LLM [13.584956125542396]
Rustは、Cのパフォーマンスを維持しながら、優れたメモリ安全性を提供する。
C2Rustのような既存の自動翻訳ツールは、構文的、テンプレートベースの翻訳に依存しすぎている可能性がある。
本稿では,新しい依存誘導型大規模言語モデル (LLM) をベースとしたC-to-Rust変換手法であるRustMapを提案する。
論文 参考訳(メタデータ) (2025-03-22T11:57:45Z) - LLM-Driven Multi-step Translation from C to Rust using Static Analysis [27.122409727034192]
レガシー言語で書かれたソフトウェアをCからRustなどのモダン言語に翻訳することは、メモリ安全性を改善する上で大きなメリットがある。
LLM駆動型C-to-Rustゼロショット変換ツールであるSACTORを2段階の翻訳手法を用いて提案する。
SACTORは、既存の方法と比較して、より自然でRustに準拠した翻訳を生成する。
論文 参考訳(メタデータ) (2025-03-16T14:05:26Z) - Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis [8.361424157571468]
Syzygyは、C言語を安全なRustに変換する自動化アプローチである。
これは、Rustのコード翻訳を安全にする上で、これまでで最大の自動化およびテスト検証済みのCである。
論文 参考訳(メタデータ) (2024-12-18T18:55:46Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。