Automated Refactoring of Rust Programs

Algorithms and implementations of Extract Method and Box Field

Refactoring is the practice of changing code without altering its behavior. Rust is a language with an ownership model where lifetimes are statically resolved and it has macro support. In this thesis we develop algorithms and implementations for the Extract Method and Box Field refactorings for Rust. Automated refactoring tools are often not correct. Here we compose the refactorings by smaller micro refactorings which can easily be understood independently. We ran the implementation on open source projects, identified problems with lifetimes, and handled it correctly.

Tags: Rust, refactoring, programming languages By Per Ove Ringdal
Published June 16, 2020 12:40 PM - Last modified July 2, 2020 8:59 AM