Verifying Extract Method Refactoring in Rust
This program is tentative and subject to change.
Refactoring tools are only trustworthy if they preserve semantics and the original code functionality. In Rust, ownership, borrowing, and lifetimes make automated refactoring both attractive and perilous: the borrow checker ensures safety, but a transformation that merely compiles may still alter aliasing, lifetime structure, or externally visible effects — breaking semantic equivalence. We present \textbf{REM-V}, an end-to-end pipeline that \emph{extracts}, \emph{fixes}, and \emph{verifies} Extract Method refactorings in Rust. REM-V builds atop the Rusty Extraction Maestro (\textbf{REM})—a compiler-guided extraction engine that iteratively repairs ownership and lifetime errors via \texttt{cargo check} — and extends it with a lightweight \emph{equivalence checking} stage: both the original and refactored code are compiled to LLBC via CHARON and then translated with AENEAS into a purely functional language where we can reason about equivalence, \emph{without user annotations}. Early results show both feasibility and the potential for tight integration with existing IDE workflows. \noindent A VSCode extension makes the Extract,$\rightarrow$,Fix,$\rightarrow$,Verify workflow accessible to the everyday developer