Refactoring and Equivalence in Rust: Expanding the REM Toolchain with a Novel Approach to Automated Equivalence Proofs
Matthew Britton, Sasha Pak, Alex Potanin

TL;DR
REM2.0 advances Rust refactoring by integrating low-latency extract-function tools with optional formal equivalence proofs, addressing ownership and type complexities for practical, verified code transformations.
Contribution
It introduces REM2.0, a novel Rust refactoring toolchain combining rust-analyzer-based extraction with formal verification via CHARON and AENEAS.
Findings
Achieves 100% compatibility on original REM artefact.
Reduces refactoring latency from ~1000ms to milliseconds.
Successfully constructs equivalence proofs for supported Rust features.
Abstract
Refactoring tools are central to modern development, with extract-function refactorings used heavily in day-to-day work. For Rust, however, ownership, borrowing, and advanced type features make automated extract-function refactoring challenging. Existing tools either rely on slow compiler-based analysis, support only restricted language fragments, or provide little assurance beyond "it still compiles." This paper presents REM2.0, a new extract-function and verification toolchain for Rust. REM2.0 works atop rust-analyzer as a persistent daemon, providing low-latency refactorings with a VSCode front-end. It adds a repairer that automatically adjusts lifetimes and signatures when extraction exposes borrow-checker issues, and an optional verification pipeline connecting to CHARON and AENEAS to generate Coq equivalence proofs for a supported Rust subset. The architecture is evaluated on…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Software Testing and Debugging Techniques · Logic, programming, and type systems
