Classboxes: A Minimal Module Model Supporting Local Rebinding

  • Alexandre Bergel
  • Stéphane Ducasse
  • Roel Wuyts
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2789)

Abstract

Classical module systems support well the modular development of applications but do not offer the ability to add or replace a method in a class that is not defined in that module. On the other hand, languages that support method addition and replacement do not provide a modular view of applications, and their changes have a global impact. The result is a gap between module systems for object-oriented languages on one hand, and the very desirable feature of method addition and replacement on the other hand. To solve these problems we present classboxes, a module system for object-oriented languages that provides method addition and replacement. Moreover, the changes made by a classbox are only visible to that classbox (or classboxes that import it), a feature we call local rebinding. To validate the model, we have implemented it in the Squeak Smalltalk environment, and performed experiments modularising code.

Keywords

language design method lookup modules smalltalk class extension selector namespace 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Cardelli, L., Donahue, J., Glassman, L., Jordan, M., Kalsow, B., Nelson, G.: Modula-3 language definition. ACM SIGPLAN Notices 27(8), 15–42 (1992)CrossRefGoogle Scholar
  2. 2.
    Clifton, C., Leavens, G.T., Chambers, C., Millstein, T.: MultiJava: Modular open classes and symmetric multiple dispatch for Java. In: OOPSLA 2000, pp. 130–145 (2000)Google Scholar
  3. 3.
    Ernst, E.: Propagating class and method combination. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 67–91. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  4. 4.
    Flatt, M., Felleisen, M.: Units: Cool modules for HOT languages. In: Proceedings of the PLDI 1998 Conference on Programming Language Design and Implementation, pp. 236–248 (1998)Google Scholar
  5. 5.
    Ichisugi, Y., Tanaka, A.: Difference-based modules: A class-independent module mechanism. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, p. 62. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  6. 6.
    Ingalls, D., Kaehler, T., Maloney, J., Wallace, S., Kay, A.: Back to the future: The story of Squeak, A practical Smalltalk written in itself. In: Proceedings OOPSLA 1997, November 1997, pp. 318–326 (1997)Google Scholar
  7. 7.
    Meyer, B.: Eiffel: The Language. Prentice-Hall, Englewood Cliffs (1992)MATHGoogle Scholar
  8. 8.
    Mössenböck, H.: Object-Oriented Programming in Oberon-2. Springer, Heidelberg (1993)MATHGoogle Scholar
  9. 9.
    Pelrine, J., Knight, A., Cho, A.: Mastering ENVY/Developer. Cambridge University Press, Cambridge (2001)CrossRefGoogle Scholar
  10. 10.
    Simmons, D.: Smallscript (2002), http://www.smallscript.com
  11. 11.
    Smith, R.B., Ungar, D.: A simple and unifying approach to subjective objects. TAPOS special issue on Subjectivity in Object-Oriented Systems 2(3), 161–178 (1996)Google Scholar
  12. 12.
    Szyperski, C.A.: Import Is Not Inheritance - Why We Need Both: Modules and Classes. In: Lehrmann Madsen, O. (ed.) ECOOP 1992. LNCS, vol. 615, pp. 19–32. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  13. 13.
    Taft, S.T.: Ada 9x: From abstraction-oriented to object-oriented. In: Proceedings OOPSLA 1993, October 1993, vol. 28, pp. 127–143 (1993)Google Scholar
  14. 14.
    Wills, A.: Capsules and types in fresco: Program verification in smalltalk. In: America, P. (ed.) ECOOP 1991. LNCS, vol. 512, pp. 59–76. Springer, Heidelberg (1991)CrossRefGoogle Scholar
  15. 15.
    Wirfs-Brock, A.: Subsystems – proposal. In: OOPSLA 1996 Extending Smalltalk Workshop (October 1996)Google Scholar
  16. 16.
    Wirfs-Brock, A., Wilkerson, B.: An overview of modular Smalltalk. In: Proceedings OOPSLA 1988, November 1988, pp. 123–134 (1988)Google Scholar
  17. 17.
    Wirth, N.: Programming in Modula-2. Springer, Berlin (1983)MATHGoogle Scholar
  18. 18.
    Zenger, M.: Evolving software with extensible modules. In: ECOOP 2002 International Workshop on Unanticipated Software Evolution (June 2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Alexandre Bergel
    • 1
  • Stéphane Ducasse
    • 1
  • Roel Wuyts
    • 1
  1. 1.Software Composition GroupUniversity of BernBernSwitzerland

Personalised recommendations