Hasty Briefsbeta

Bilingual

Code Quality Analysis of Translations from C to Rust

3 months ago
  • #Rust
  • #Software Quality
  • #Code Translation
  • The study analyzes the quality of automated translations from C/C++ to Rust, focusing on performance, robustness, and maintainability.
  • Three C-to-Rust translators are evaluated: C2Rust, C2SaferRust, and TranslationGym, with human-based translation as a baseline.
  • Quality assessment involves Clippy (Rust static analysis tool), GPT-4o for identifying overlooked issues, and manual analysis.
  • Findings reveal that automated techniques reduce unsafe patterns but introduce new issues, with none matching human translations across all quality dimensions.
  • Human-written Rust code also exhibits internal quality issues like readability and non-idiomatic patterns.
  • The study highlights the multi-dimensional challenge of translation quality, requiring systematic evaluation and targeted tool support.