We extend the simply-typed lambda-calculus with a mechanism for dynamic rebinding of code based on parametric nominal interfaces. That is, we introduce values which represent single fragments, or families of named fragments, of open code, where free variables are associated with names which do not obey \alpha-equivalence. In this way, code fragments can be passed as function arguments and manipulated, through their nominal interface, by operators such as rebinding, overriding and renaming. Moreover, by using name variables, it is possible to write terms which are parametric in their nominal interface and/or in the way it is adapted, greatly enhancing expressivity. However, in order to prevent conflicts when instantiating name variables, the name-polymorphic types of such terms need to be equipped with simple {inequality} constraints. We show soundness of the type system.
@InProceedings{ancona_et_al:LIPIcs.TYPES.2015.4, author = {Ancona, Davide and Giannini, Paola and Zucca, Elena}, title = {{Constrained Polymorphic Types for a Calculus with Name Variables}}, booktitle = {21st International Conference on Types for Proofs and Programs (TYPES 2015)}, pages = {4:1--4:29}, series = {Leibniz International Proceedings in Informatics (LIPIcs)}, ISBN = {978-3-95977-030-9}, ISSN = {1868-8969}, year = {2018}, volume = {69}, editor = {Uustalu, Tarmo}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.TYPES.2015.4}, URN = {urn:nbn:de:0030-drops-84744}, doi = {10.4230/LIPIcs.TYPES.2015.4}, annote = {Keywords: open code, incremental rebinding, name polymorphism, metaprogramming} }
Feedback for Dagstuhl Publishing