KIT | KIT-Bibliothek | Impressum | Datenschutz

Modular Capture Avoidance for Program Transformations

Ritschel, Nico; Erdweg, Sebastian ORCID iD icon 1
1 Institut für Programmstrukturen und Datenorganisation (IPD), Karlsruher Institut für Technologie (KIT)

Abstract (englisch):

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 impobible (requiring changes to third-party modules). We present an algorithm name-fix that detects and eliminates variable capture modularly. We extend a previous nonmodular version of name-fix in order to (i) minimize renamings of exported declarations, (ii) propagate necebary 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.


Zugehörige Institution(en) am KIT Institut für Programmstrukturen und Datenorganisation (IPD)
Publikationstyp Proceedingsbeitrag
Publikationsdatum 26.10.2015
Sprache Englisch
Identifikator ISBN: 978-145033686-4
KITopen-ID: 1000188562
Erschienen in SLE 2015 - Proceedings of the 2015 ACM SIGPLAN International Conference on Software Language Engineering; Pittsburgh, PA, USA, 26.-27.10.2015
Veranstaltung 8th ACM SIGPLAN International Conference on Software Language Engineering (2015), Pittsburgh, PA, USA, 26.10.2015 – 27.10.2015
Verlag Association for Computing Machinery (ACM)
Seiten 59–70
Schlagwörter Hygienic Macros; Modules; Program Transformation; Refactorings; Variable Capture
Nachgewiesen in Scopus
KIT – Die Universität in der Helmholtz-Gemeinschaft
KITopen Landing Page