Meng Wang

Ownership and Lifetime Driven Synthesizer for Automatic C to Rust Translation

Rust is a modern programming language with growing popularity. It offers both low-level control as well as strong safety guarantees.  The latter includes memory safety (free of double-frees, memory leaks, etc) enforced by an ownership (linear) type system, which is a significant advantage to the legacy language C. Existing C to Rust translators are limited to syntactic transformations aided by information from the rust compiler. They are unable to infer the ownership-schemes that exist in the programs and therefore cannot produce high-quality Rust code that are verified safe. In this work, we propose an ownership model for unsafe pointers and an inference approach of possible ownership schemes. Based on that information, we propose rewrite steps that significantly improve the safe-ratio of the resulting Rust programs.

back to overview

Watch Recording


Dr. Meng Wang is a Reader (Associate Professor) in the Department of Computer Science at University of Bristol, and the head of the Programming Languages Research Group. The central theme of his research is to apply theoretical rigour to practical programming, with the aim of improving the correctness and robustness of software systems. This includes functional programming, embedded languages, type systems, program synthesis, program verification and testing. He has published extensively at the best conferences and journals, and his research is generously supported by EPSRC, the Royal Society, and industry. He is an Oavlönad Docent (an academic title in Sweden awarded for international research reputation) and an elected member of IFIP Working Group 2.1 on Algorithmic Languages and Calculi. He is the International Director of School of Computer Science, Electrical and Electronic Engineering, and Engineering Maths, and a member of the school senior management team and school board.