KIT | KIT-Bibliothek | Impressum | Datenschutz

Capture-Avoiding and Hygienic Program Transformations

Erdweg, Sebastian ORCID iD icon 1; Storm, Tijs van der; Dai, Yi
1 Institut für Programmstrukturen und Datenorganisation (IPD), Karlsruher Institut für Technologie (KIT)

Abstract (englisch):

Program transformations in terms of abstract syntax trees compromise referential integrity by introducing variable capture. Variable capture occurs when in the generated program a variable declaration accidentally shadows the intended target of a variable reference. Existing transformation systems either do not guarantee the avoidance of variable capture or impair the implementation of transformations. We present an algorithm called name-fix that automatically eliminates variable capture from a generated program by systematically renaming variables. name-fix is guided by a graph representation of the binding structure of a program, and requires name-resolution algorithms for the source language and the target language of a transformation. name-fix is generic and works for arbitrary transformations in any transformation system that supports origin tracking for names. We verify the correctness of name-fix and identify an interesting class of transformations for which name-fix provides hygiene. We demonstrate the applicability of name-fix for implementing capture-avoiding substitution, inlining, lambda lifting, and compilers for two domain-specific languages.


Download
Originalveröffentlichung
DOI: 10.1007/978-3-662-44202-9_20
Zugehörige Institution(en) am KIT Institut für Programmstrukturen und Datenorganisation (IPD)
Publikationstyp Proceedingsbeitrag
Publikationsjahr 2014
Sprache Englisch
Identifikator ISBN: 978-366244201-2
ISSN: 0302-9743
KITopen-ID: 1000188550
Erschienen in ECOOP 2014 -- Object-Oriented Programming; Uppsala, Schweden, 28.07.-01.08.2014
Veranstaltung 28th European Conference on Object Oriented Programming (ECOOP 2014), Uppsala, Schweden, 28.07.2014 – 01.08.2014
Verlag Springer
Seiten 489–514
Serie Lecture Notes in Computer Science (LNCS) ; 8586
Schlagwörter Object oriented programming; Problem oriented languages
Nachgewiesen in Scopus
Relationen in KITopen
KIT – Die Universität in der Helmholtz-Gemeinschaft
KITopen Landing Page