Constrained Polymorphic Types for a Calculus with Name Variables

Davide Ancona, Paola Giannini, Elena Zucca, Marc Herbstritt
2018 Types for Proofs and Programs  
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 α-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,
more » ... 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 namepolymorphic types of such terms need to be equipped with simple inequality constraints. We show soundness of the type system.
doi:10.4230/lipics.types.2015.4 dblp:conf/types/AnconaGZ15 fatcat:d7ixygiabbfbrlodfzlqf4b7wu