๐ค AI Summary
This work proposes the first end-to-end formally verified compiler for a sequential subset of Rust, built upon the CompCert framework, addressing the challenges of memory safety and semantic preservation in Rust compilation. By formalizing Rustโs borrow-checking mechanism and integrating it into the verified compilation pipeline, the approach guarantees that the generated assembly code adheres to memory safety while precisely preserving the semantics of the source program. This study marks the first extension of CompCertโs verification paradigm to Rust, establishing a complete, machine-checked proof of semantic equivalence from high-level source code to low-level target code. The resulting compiler lays a foundational infrastructure for developing high-assurance Rust applications with strong correctness guarantees.
๐ Abstract
We present our ongoing work on developing an end-to-end verified Rust compiler based on CompCert. It provides two guarantees: one is semantics preservation from Rust to assembly, i.e., the behaviors of source code includes the behaviors of target code, with which the properties verified at the source can be preserved down to the target; the other is memory safety ensured by the verifying compilation -- the borrow checking pass, which can simplify the verification of Rust programs, e.g., by allowing the verification tools focus on the functional correctness.