Skip to main content Accessibility help
×
Home
Hostname: page-component-768ffcd9cc-7jw6s Total loading time: 0.218 Render date: 2022-12-05T06:02:20.444Z Has data issue: true Feature Flags: { "useRatesEcommerce": false } hasContentIssue true

Type safe incremental rebinding

Published online by Cambridge University Press:  15 May 2015

DAVIDE ANCONA
Affiliation:
DIBRIS, Università di Genova, Genova, Italy
PAOLA GIANNINI
Affiliation:
CS Institute, DISIT, Università del Piemonte Orientale, Alessandria, Italy
ELENA ZUCCA
Affiliation:
DIBRIS, Università di Genova, Genova, Italy

Abstract

We extend the simply-typed lambda-calculus with a mechanism for dynamic and incremental rebinding of code. Fragments of open code which can be dynamically rebound are values. Differently from standard static binding, which is done on a positional basis, rebinding is done on a nominal basis, that is, free variables in open code are associated with names which do not obey α-equivalence. Moreover, rebinding is incremental, that is, just a subset of names can be rebound, making possible code specialization, and rebinding can even introduce new names. Finally, rebindings, which are associations between names and terms, are first-class values, and can be manipulated by operators such as overriding and renaming. We define a type system in which the type for a rebinding, in addition to specify an association between names and types (similarly to record types), is also annotated. The annotation says whether or not the domain of the rebinding having this type may contain more names than the ones that are specified in the type. We show soundness of the type system.

Type
Paper
Copyright
Copyright © Cambridge University Press 2015 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Ancona, D., Giannini, P. and Zucca, E. (2013). Reconciling positional and nominal binding. In: Graham-Lengrand, S. and Paolini, L. (eds.) ITRS'12 - Intersection types and Related Systems. Available at: http://bart.disi.unige.it/bibliography/papers/report/orders:year/author:4.Google Scholar
Ancona, D. and Moggi, E. (2004). A fresh calculus for name management. In: GPCE'04. Springer Lecture Notes in Computer Science 3286 206224.CrossRefGoogle Scholar
Ancona, D. and Zucca, E. (2002). A calculus of module systems. Journal of Functional Programming 12 (2) 91132.CrossRefGoogle Scholar
Bierman, G., Hicks, M. W., Sewell, P., Stoyle, G. and Wansbrough, K. (2003). Dynamic rebinding for marshalling and update, with destruct-time λ. In: ICFP'03, ACM Press 99110.CrossRefGoogle Scholar
Dami, L. (1997). A lambda-calculus for dynamic binding. Theoretical Computer Science 192 (2) 201231.CrossRefGoogle Scholar
Dezani-Ciancaglini, M., Giannini, P. and Zucca, E. (2010). Intersection types for unbind and rebind. In: Pimentel, E., Venneri, B. and Wells, J. (eds.) ITRS'10 - Intersection Types and Related Systems. Electronic Proceedings in Theoretical Computer Science 45 4558.CrossRefGoogle Scholar
Dezani-Ciancaglini, M., Giannini, P. and Zucca, E. (2011). Extending the lambda-calculus with unbind and rebind. RAIRO - Theoretical Informatics and Applications 45 (1) 143162.CrossRefGoogle Scholar
Felleisen, M. and Friedman, D. P. (1986). Control operators, the SECD-machine, and the lambda-calculus. In: 3rd Working Conference on the Formal Description of Programming Concepts, Ebberup, Denmark 193–219.Google Scholar
Glück, R. and Jørgensen, J. (1995). Efficient multi-level generating extensions for program specialization. In: PLILP 259–278.Google Scholar
Lagorio, G., Servetto, M. and Zucca, E. (2012). Featherweight Jigsaw - replacing inheritance by composition in Java-like languages. Information and Computation 214 86111.CrossRefGoogle Scholar
Moreau, L. (1998). A syntactic theory of dynamic binding. Higher-Order and Symbolic Computation 11 (3) 233279.CrossRefGoogle Scholar
Nanevski, A. (2003). From dynamic binding to state via modal possibility. In: PPDP'03, ACM 207–218.Google Scholar
Nanevski, A. and Pfenning, F. (2005). Staged computation with names and necessity. Journal of Functional Programming 15 (5) 893939.CrossRefGoogle Scholar
Rémy, D. (1993). Type inference for records in a natural extension of ML. In: Gunter, C. A. and Mitchell, J. C. (eds.) Theoretical Aspects of Object-Oriented Programming, MIT Press.Google Scholar
Taha, W. and Sheard, T. (2000). MetaML and multi-stage programming with explicit annotations. Theoretical Computer Science 248 (1–2) 211242.CrossRefGoogle Scholar
Tanter, E. (2009). Beyond static and dynamic scope. In: Dynamic Languages Symposium'09, ACM Press 314.CrossRefGoogle Scholar
1
Cited by

Save article to Kindle

To save this article to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Type safe incremental rebinding
Available formats
×

Save article to Dropbox

To save this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Dropbox account. Find out more about saving content to Dropbox.

Type safe incremental rebinding
Available formats
×

Save article to Google Drive

To save this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Google Drive account. Find out more about saving content to Google Drive.

Type safe incremental rebinding
Available formats
×
×

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *