Ownership guided C to Rust translation

03/18/2023
by   Hanliang Zhang, et al.
0

Dubbed a safer C, Rust is a modern programming language that combines memory safety and low-level control. This interesting combination has made Rust very popular among developers and there is a growing trend of migrating legacy codebases (very often in C) to Rust. In this paper, we present a C to Rust translation approach centred around static ownership analysis. We design a suite of analyses that infer ownership models of C pointers and automatically translate the pointers into safe Rust equivalents. The resulting tool, Crown, scales to real-world codebases (half a million lines of code in less than 10 seconds) and achieves a high conversion rate.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/17/2020

Breaking Type-Safety in Go: An Empirical Study on the Usage of the unsafe Package

A decade after its first release, the Go programming language has become...
research
05/20/2019

Towards Neural Decompilation

We address the problem of automatic decompilation, converting a program ...
research
08/09/2023

Fixing Rust Compilation Errors using LLMs

The Rust programming language, with its safety guarantees, has establish...
research
02/05/2019

Fearless Concurrency? Understanding Concurrent Programming Safety in Real-World Rust Software

Rust is a popular programming language in building various low-level sof...
research
10/11/2021

Robust Safety for Move

A program that maintains key safety properties even when interacting wit...
research
01/26/2023

Concrat: An Automatic C-to-Rust Lock API Translator for Concurrent Programs

Concurrent programs suffer from data races. To prevent data races, progr...
research
07/05/2022

Static Deadlock Detection in Low-Level C Code

We present a novel scalable deadlock analyser L2D2 capable of handling C...

Please sign up or login with your details

Forgot password? Click here to reset