Mixin modules for dynamic rebinding

  • Authors:
  • Davide Ancona;Sonia Fagorzi;Elena Zucca

  • Affiliations:
  • DISI - Università di Genova, Genova, Italy;DISI - Università di Genova, Genova, Italy;DISI - Università di Genova, Genova, Italy

  • Venue:
  • TGC'05 Proceedings of the 1st international conference on Trustworthy global computing
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Dynamic rebinding is the ability of changing the definitions of names at execution time. While dynamic rebinding is clearly useful in practice, and increasingly needed in modern systems, most programming languages provide only limited and ad-hoc mechanisms, and no adequate semantic understanding currently exists. Here, we provide a simple and powerful mechanism for dynamic rebinding by means of a calculus CMSl,v of mixin modules (mutually recursive modules allowing redefinition of components) where, differently from the traditional approach, module operations can be performed after selecting and executing a module component: in this way, execution can refer to virtual components, which can be rebound when module operators are executed. In particular, in our calculus module operations are performed on demand, when execution would otherwise get stuck. We provide a sound type system, which ensures that execution never tries to access module components which cannot become available, and show how the calculus can be used to encode a variety of real-world dynamic rebinding mechanisms.