mlsanityData to 14 Oct 2026

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

arXiv 2510.10956 ↗First posted 13 Oct 2025cs.SE cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

Translating C code into safe Rust is an effective way to ensure memory safety. Compared to rule-based approaches, which often produce largely unsafe Rust code, LLM-based methods generate more idiomatic and safer Rust by leveraging extensive training on human-written code. Despite their promise, existing LLM-based approaches still struggle with project-level C-to-Rust translation. They typically partition a C project into smaller units (e.g., functions) based on call graphs and translate them in a bottom-up manner to resolve dependencies. However, this unit-by-unit paradigm often fails to handle pointers due to the lack of a global view of their usage. To address this limitation, we propose a novel C-to-Rust Pointer Knowledge Graph (KG) that augments code dependency graphs with two types of pointer semantics: (i) pointer usage information, which captures global behaviors such as points-to flows and lifts low-level struct interactions to higher-level abstractions; and (ii) Rust-oriented annotations, which encode ownership, mutability, nullability, and lifetime. Building on this KG, we further propose PtrTrans, a project-level C-to-Rust translation approach. In PtrTrans, the KG provides LLMs with comprehensive global pointer semantics, guiding them to generate safe and idiomatic Rust code. Experimental results show that PtrTrans reduces unsafe usages in translated Rust by 99.9% compared to both rule-based and conventional LLM-based methods, while achieving 29.3% higher functional correctness than fuzzing-enhanced LLM approaches.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 21 of its 72 references that are in the map. First posted on arXiv 13 Oct 2025.

Builds on

21 of 72 references.

References · 21

  1. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
  2. 2020Unsupervised Translation of Programming Languagescited by 263
  3. 2023Self-collaboration Code Generation via ChatGPTcited by 258
  4. 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 232
  5. 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 57
  6. 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
  7. 2023Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generationcited by 50
  8. 2024Towards Translating Real-World Code with LLMs: A Study of Translating to Rustcited by 35
  9. 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
  10. 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilationcited by 19
  11. 2025C2SaferRust: Transforming C Projects into Safer Rust with NeuroSymbolic Techniquescited by 18
  12. 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
9 more
  1. 2023Ownership guided C to Rust translationcited by 13
  2. 2024Scalable, Validated Code Translation of Entire Projects using Large Language Modelscited by 12
  3. 2025RustMap: Towards Project-Scale C-to-Rust Migration via Program Analysis and LLMcited by 10
  4. 2024To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unionscited by 8
  5. 2024Translating C To Rust: Lessons from a User Studycited by 8
  6. 2025SafeTrans: LLM-assisted Transpilation from C to Rustcited by 8
  7. 2023A Closer Look at the Security Risks in the Rust Ecosystemcited by 5
  8. 2025RepoTransAgent: Multi-Agent LLM Framework for Repository-Aware Code Translationcited by 3
  9. 2022How ISO C became unusable for operating systems developmentcited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.