cd /news/ai-research/c-to-rust-translation-validation-at-… · home › topics › ai-research › article
[ARTICLE · art-172886] src=arxiv.org ↗ pub= topic=ai-research verified=true sentiment=↑ positive

C-to-Rust Translation Validation at the LLVM IR Level via AI-Assisted Proof

A paper submitted to arXiv on 13 November 2026 presents R2C2, a tool that validates C-to-Rust translations by proving in Rocq that the compiled Rust program refines the C program at the LLVM IR level, with AI agents automating proof construction that Rocq then checks. Evaluated on LLM translations of 519 C programs from a prior translation-validation benchmark, R2C2 proved 486 translations correct without bounding their executions and found three incorrect translations, producing counterexamples existing tools cannot find. The authors also ran a case study on a small real-world image compression library, showing R2C2 handles file operations.

recommendation

When trusting LLM-generated code translations, verify them with a machine-checked refinement proof at the LLVM IR level rather than testing alone; R2C2 caught 3 bad translations among 519 that bounded checks missed.

more in playbook: Verifying model output
read2 min views5 publishedNov 19, 2026
C-to-Rust Translation Validation at the LLVM IR Level via AI-Assisted Proof
Image: source
  [Submitted on 13 Nov 2026]


[View PDF](https://arxiv.org/pdf/2611.18036)

[HTML (experimental)](https://arxiv.org/html/2611.18036v1)

Abstract:Migrating C codebases to Rust is a promising approach to securing legacy software, but existing translators do not guarantee that a translated Rust program preserves the behavior of the C program. Neither rule-based nor large language model (LLM)-based translators have been formally verified, and existing approaches to checking translation correctness are limited to testing and bounded checks, which cannot reason about all possible executions. In this work, we present R2C2, which validates C-to-Rust translation by proving in Rocq that the Rust program refines the C program, i.e., every behavior on the Rust side is also a behavior on the C side. Since no formal semantics defines the behaviors of C and Rust programs in the same terms, we prove refinement between the two programs compiled to the LLVM intermediate representation (LLVM IR). In addition, to resolve the discrepancies between the data representations of C and Rust, we introduce a common abstraction that relates two corresponding representations through an abstract value, and specify the behavior of each library function over abstract values. We construct the refinement proof as a chain of refinement relations, where only one relation is program-specific and proved at validation time, while the others are proved for all programs in advance. Proof construction is automated by AI agents, and since Rocq checks the proofs, the agents need not be trusted. We evaluate R2C2 on LLM translations of 519 C programs drawn from a benchmark suite used in prior work on C-to-Rust translation validation. R2C2 proves the translations of 486 programs correct without bounding their executions and discovers three incorrect translations, providing valid counterexamples that existing translation validation tools cannot find. We also conduct a case study on a small real-world image compression library and demonstrate how R2C2 can handle file operations.

Additional Features

References & Citations

...

Bibliographic Explorer

(What is the Explorer?) Connected Papers

(What is Connected Papers?) Litmaps

(What is Litmaps?) scite Smart Citations

(What are Smart Citations?) alphaXiv

(What is alphaXiv?) CatalyzeX Code Finder for Papers

(What is CatalyzeX?) DagsHub

(What is DagsHub?) Gotit.pub

(What is GotitPub?) Hugging Face

(What is Huggingface?) ScienceCast

(What is ScienceCast?) Influence Flower

(What are Influence Flowers?) CORE Recommender

(What is CORE?) arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

── more in #ai-research 4 stories · sorted by recency
── more on @r2c2 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/c-to-rust-translatio…] indexed:0 read:2min 2026-11-19 · —