Modular Capture Avoidance for Program Transformations
The application of program transformations and refactorings involves the risk of capturing variables, which may break the intended semantics of the transformed code. One way to resolve variable capture is by renaming of the involved identifiers. However, in a modular context, the renaming of exported declarations is undesirable (affecting a module's clients), and the renaming of imported declarations is impossible (requiring changes to third-party modules). We present an algorithm name-fix that detects and eliminates variable capture modularly. We extend a previous non-modular version of name-fix in order to (i) minimize renamings of exported declarations, (ii) propagate necessary renamings of exported declarations to clients, and (iii) avoid renamings of imported declarations altogether. Together with support for transitive name bindings and conflicting declarations, our extensions to name-fix enable the application to real-world languages that feature separate compilation. To demonstrate the applicability of name-fix, we use it to modularly resolve variable capture for optimizations, refactorings, and desugarings of Lightweight Java.
Mon 26 Oct
|13:30 - 14:00|
|14:00 - 14:30|
Romina EramoUniversity of L'Aquila, Italy, Alfonso PierantonioUniversity of L'Aquila, Italy, Gianni RosaUniversity of L'Aquila, ItalyDOI
|14:30 - 15:00|
|Link to publication DOI|