five

C2SafeRust: Translating C to Safe Rust via incorporating In-context Learning and Program Structures into LLM

收藏
Zenodo2024-12-13 更新2026-05-26 收录
下载链接:
https://zenodo.org/doi/10.5281/zenodo.13756260
下载链接
链接失效反馈
官方服务:
资源简介:
This repository contains the code and dataset for the paper C2SafeRust: Translating C to Safe Rust via Incorporating In-Context Learning and Program Structures into LLM in FSE 2025. C2SafeRust is an advanced tool designed to automatically translate C code into safe, readable, and maintainable Rust code. Leveraging in-context learning (ICL), C2SafeRust generates idiomatic Rust that adheres to Rust's safety guarantees. The tool employs detailed program structures, such as Control Flow Graphs (CFG) and Data Dependency Graphs (DDG), along with intermediate variable values obtained through program instrumentation. By integrating these elements with a Large Language Model (LLM), C2SafeRust ensures high syntactic and semantic correctness in the translation process, while maintaining the readability and maintainability of the resulting Rust code.
提供机构:
Zenodo
创建时间:
2024-09-13
二维码
社区交流群
二维码
科研交流群
商业服务