Advertisement

Mixin Modules for Dynamic Rebinding

  • Davide Ancona
  • Sonia Fagorzi
  • Elena Zucca
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3705)

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 CMS l,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.

Keywords

Module Operator Basic Module Program Execution Module Component Reduction Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abadi, M., Cardelli, L.: A Theory of Objects. Monographs in Computer Science. Springer, Heidelberg (1996)zbMATHGoogle Scholar
  2. 2.
    Abadi, M., Gonthier, G., Werner, B.: Choice in dynamic linking. In: Walukiewicz, I. (ed.) FOSSACS 2004. LNCS, vol. 2987, pp. 12–26. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  3. 3.
    Ancona, D., Anderson, C., Damiani, F., Drossopoulou, S., Giannini, P., Zucca, E.: A type preserving translation of Fickle into Java. Electonical Notes in Theoretical Computer Science, vol. 62 (2002)Google Scholar
  4. 4.
    Ancona, D., Fagorzi, S., Zucca, E.: A calculus for dynamic linking. In: Blundo, C., Laneve, C. (eds.) ICTCS 2003. LNCS, vol. 2841, pp. 284–301. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  5. 5.
    Ancona, D., Fagorzi, S., Zucca, E.: A calculus for dynamic reconfiguration with low priority linking. In: WOOD 2004: Workshop on Object-Oriented Developments. Electonical Notes in Theoretical Computer Science (2004) (to appear)Google Scholar
  6. 6.
    Ancona, D., Fagorzi, S., Zucca, E.: A calculus with lazy module operators. In: Levy, J.-J., Mayr, E.W., Mitchell, J.C. (eds.) TCS 2004 (IFIP Int. Conf. on Theoretical Computer Science), pp. 423–436. Kluwer Academic Publishers, Dordrecht (2004)Google Scholar
  7. 7.
    Ancona, D., Zucca, E.: A calculus of module systems. Journ. of Functional Programming 12(2), 91–132 (2002)zbMATHMathSciNetGoogle Scholar
  8. 8.
    Ariola, Z.M., Felleisen, M.: The call-by-need lambda calculus. Journ. of Functional Programming 7(3), 265–301 (1997)CrossRefzbMATHMathSciNetGoogle Scholar
  9. 9.
    Bierman, G., Hicks, M., Sewell, P., Stoyle, G.: Formalizing dynamic software updating (Extended Abstract). In: USE 2003 - the Second International Workshop on Unanticipated Software Evolution (2003)Google Scholar
  10. 10.
    Bierman, G., Hicks, M., Sewell, P., Stoyle, G., Wansbrough, K.: Dynamic rebinding for marshalling and update, with destruct-time λ. In: Runciman, C., Shivers, O. (eds.) Intl. Conf. on Functional Programming 2003, pp. 99–110. ACM Press, New York (2004)Google Scholar
  11. 11.
    Bracha, G.: The Programming Language JIGSAW: Mixins, Modularity and Multiple Inheritance. PhD thesis, Department of Comp. Sci., Univ. of Utah (1992)Google Scholar
  12. 12.
    Cardelli, L.: Program fragments, linking, and modularization. In: ACM Symp. on Principles of Programming Languages 1997, pp. 266–277. ACM Press, New York (1997)Google Scholar
  13. 13.
    Cardelli, L., Leroy, X.: Abstract types and the dot notation. Technical Report 56, DEC SRC (1990)Google Scholar
  14. 14.
    Drossopoulou, S.: Towards an abstract model of Java dynamic linking and verfication. In: Harper, R. (ed.) TIC 2000 - Third Workshop on Types in Compilation (Selected Papers). LNCS, vol. 2071, pp. 53–84. Springer, Heidelberg (2001)Google Scholar
  15. 15.
    Drossopoulou, S., Lagorio, G., Eisenbach, S.: Flexible models for dynamic linking. In: Degano, P. (ed.) ESOP 2003. LNCS, vol. 2618, pp. 38–53. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  16. 16.
    Fagorzi, S.: Module Calculi for Dynamic Reconfiguration. PhD thesis, Dipartimento di Informatica e Scienze dell’Informazione, Università di Genova (2005)Google Scholar
  17. 17.
    Fagorzi, S., Zucca, E.: A calculus for reconfiguration. In: DCM 2005 - International Workshop on Developments in Computational Models, (To appear) (July 2005)Google Scholar
  18. 18.
    Felleisen, M., Friedman, D.P.: Control operators, the SECD-machine, and the lambda-calculus. In: 3rd Working Conference on the Formal Description of Programming Concepts, Ebberup, Denmark, August 1986, pp. 193–219 (1986)Google Scholar
  19. 19.
    Hirschowitz, T., Leroy, X.: Mixin modules in a call-by-value setting. In: Le Métayer, D. (ed.) ESOP 2002. LNCS, vol. 2305, pp. 6–20. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  20. 20.
    Liu, Y.D., Smith, S.F.: Modules with interfaces for dynamic linking and communication. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 414–439. Springer, Heidelberg (2004)Google Scholar
  21. 21.
    Machkasova, E., Turbak, F.A.: A calculus for link-time compilation. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, pp. 260–274. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  22. 22.
    Mens, T., Kniesel, G.: Workshop on foundations of unanticipated software evolution. ETAPS 2004 (2004), http://joint.org/fuse2004/
  23. 23.
    Wells, J.B., Vestergaard, R.: Confluent equational reasoning for linking with first-class primitive modules. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, pp. 412–428. Springer, Heidelberg (2000)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Davide Ancona
    • 1
  • Sonia Fagorzi
    • 1
  • Elena Zucca
    • 1
  1. 1.DISI – Università di GenovaGenovaItaly

Personalised recommendations