Pith. sign in

REVIEW 12 cited by

Towards Translating Real-World Code with LLMs: A Study of Translating to Rust

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2405.11514 v3 pith:BXENLQK4 submitted 2024-05-19 cs.SE

classification cs.SE
keywords codetranslationtranslatingabilitylanguagellmsreal-worldrust
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Large language models (LLMs) show promise in code translation - the task of translating code written in one programming language to another language - due to their ability to write code in most programming languages. However, LLM's effectiveness on translating real-world code remains largely unstudied. In this work, we perform the first substantial study on LLM-based translation to Rust by assessing the ability of five state-of-the-art LLMs, GPT4, Claude 3, Claude 2.1, Gemini Pro, and Mixtral. We conduct our study on code extracted from real-world open source projects. To enable our study, we develop FLOURINE, an end-to-end code translation tool that uses differential fuzzing to check if a Rust translation is I/O equivalent to the original source program, eliminating the need for pre-existing test cases. As part of our investigation, we assess both the LLM's ability to produce an initially successful translation, as well as their capacity to fix a previously generated buggy one. If the original and the translated programs are not I/O equivalent, we apply a set of automated feedback strategies, including feedback to the LLM with counterexamples. Our results show that the most successful LLM can translate 47% of our benchmarks, and also provides insights into next steps for improvements.

Discussion (0). Sign in to comment.

Forward citations

Cited by 12 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Heimdall: Formally Verified Automated Migration of Legacy eBPF Programs to Rust

    cs.CR 2026-05 unverdicted novelty 8.0 of 10

    Heimdall automates translation of eBPF C programs to Rust with formal equivalence proofs for 94.1% of 102 tested programs using LLMs, static analysis, and Z3-based checking.

  2. LLM Translation of Compiler Intermediate Representation

    cs.PL 2026-05 unverdicted novelty 8.0 of 10

    IRIS-14B is the first LLM trained explicitly for GIMPLE-to-LLVM IR translation and outperforms much larger models by up to 44 percentage points on real-world C code.

  3. Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learning

    cs.SE 2026-07 conditional novelty 6.0 of 10

    A rule-guided MCTS plus dual-reward reinforcement learning pipeline improves LLM-based C-to-Rust translation accuracy and cuts unsafe Rust output across three benchmarks.

  4. Mostly Automatic Translation of Language Interpreters from C to Safe Rust

    cs.PL 2026-06 unverdicted novelty 6.0 of 10

    Reboot translates six C interpreters (6k-23k LOC) to safe Rust with 1-11 interventions each, passing all original tests and 62-92% on new validation tests while removing memory vulnerabilities.

  5. ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilation

    cs.SE 2026-04 unverdicted novelty 6.0 of 10

    ORBIT achieves 100% compilation success and 91.7% test success on 24 mostly large programs from CRUST-Bench by using dependency-aware orchestration and iterative verification, outperforming prior static and baseline tools.

  6. ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation

    cs.SE 2026-04 unverdicted novelty 6.0 of 10

    ENCRUST decouples C-to-Rust translation via ABI wrappers and agentic refinement to reduce unsafe constructs across 15 real programs while preserving full test correctness.

  7. His2Trans: A Knowledge-Guided Agentic Framework for Project-Level C-to-Rust Migration

    cs.SE 2026-03 conditional novelty 6.0 of 10

    Combining build-trace-derived skeletons with a knowledge base of historical translation pairs raises C-to-Rust compilation pass rates and lowers unsafe-code ratios, but on general benchmarks functional-correctness sco...

  8. Project-Level C-to-Rust Translation via Pointer Knowledge Graphs

    cs.SE 2025-10 unverdicted novelty 6.0 of 10

    PtrTrans builds a Pointer Knowledge Graph with points-to flows, struct abstractions, and Rust annotations to guide LLMs toward project-level C-to-Rust translations that cut unsafe code by 99.9% and raise functional co...

  9. Vibration-Based Energy Metric for Restoring Needle Alignment in Autonomous Robotic Ultrasound

    cs.RO 2025-08 unverdicted novelty 6.0 of 10

    A vibration-based energy metric, obtained by periodically vibrating the needle, is used as an out-of-plane feedback signal to re-align the ultrasound probe with the needle plane, reporting 0.41 mm translation and 0.51...

  10. SafeTrans: LLM-assisted Transpilation from C to Rust

    cs.CR 2025-05 accept novelty 6.0 of 10

    SafeTrans achieves up to 80% successful C-to-Rust translations via LLM iterative repair on 2653 programs and two real projects, with some C vulnerabilities carrying over to the Rust output.

  11. From C to Idiomatic Rust: A Ship-of-Theseus Agentic Translation

    cs.SE 2026-07 conditional novelty 5.0 of 10

    A C-to-Rust migration methodology that separates lossless c2rust transpilation from agentic per-function rewriting with compilation and behavioral gates is demonstrated on the 12.5 kSLOC iodine DNS tunnel.

  12. Search-Based Multi-Trajectory Refinement for Safe C-to-Rust Translation with Large Language Models

    cs.PL 2025-05 unverdicted novelty 5.0 of 10

    LAC2R uses MCTS to systematically explore multiple LLM refinement trajectories for C-to-Rust translation and reports superior safety and correctness on small-scale benchmarks.

Pith tools