Advertisement

A Framework for Modular Linking in OO Languages

  • Sean McDirmid
  • Wilson C. Hsieh
  • Matthew Flatt
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4228)

Abstract

The successful assembly of large programs out of software components depends on modular reasoning. When the linking of component code is modular, components can be compiled and type checked separately, deployed in binary form, and are easier to reuse. Unfortunately, linking is not modular in many mainstream OO languages such as Java. In this paper we propose an intuitive and formal framework for enhancing a language with modular linking, which is applied to the specific problem of making linking in Java modular. In our proposed framework, the degree to which components can be reasoned about modularly is adversely affected by language features that limit abstraction. We show that most of Java’s core language features, such as inheritance, permit a high degree of modular linking even in the presence of cyclic dependencies.

Keywords

Typing Environment Type Check Java Language Component Code Cyclic Dependency 
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.
    Ancona, D., Lagorio, G., Zucca, E.: A Formal Framework for Java Separate Compilation. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 609–636. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  2. 2.
    Ancona, D., Lagorio, G., Zucca, E.: Smart modules for Java-like languages (December 2005) (submitted for publication)Google Scholar
  3. 3.
    Ancona, D., Zucca, E.: True modules for Java classes. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 354–380. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  4. 4.
    Bracha, G., Cook, W.: Mixin-based inheritance. In: Proc. of OOPSLA, pp. 303–311 (October 1990)Google Scholar
  5. 5.
    Cardelli, L.: Program fragments, linking and modularization. In: Proc. of POPL, pp. 266–277 (January 1997)Google Scholar
  6. 6.
    Clifton, C., Leavens, G., Chambers, C., Millstein, T.: MultiJava: Modular open classes and symmetric multiple dispatch for Java. In: Proc. of OOPSLA, pp. 130–146 (October 2000)Google Scholar
  7. 7.
    Clifton, C., Millstein, T., Leavens, G.T., Chambers, C.: MultiJava: Design rationale, compiler implementation, and applications. Technical Report 04-01b, Iowa State University, Dept. of Computer Science (December 2004) (accepted for publication, pending revision)Google Scholar
  8. 8.
    Drossopoulou, S., Eisenbach, S., Wragg, D.: A fragment calculus: Torwards a model of separate compilation, linking and binary compatibility. In: Proc. of Logic in Computer Science (July 1999)Google Scholar
  9. 9.
    Drossopoulou, S., Wragg, D., Eisenbach, S.: What is Java binary compatibility? In: Proc. of OOPLSA, pp. 341–361 (October 1998)Google Scholar
  10. 10.
    Findler, R., Flatt, M.: Modular object-oriented programming with units and mixins. In: Proc. of ICFP, pp. 98–104 (September 1998)Google Scholar
  11. 11.
    Fisher, K., Reppy, J.: The design of a class mechanism for Moby. In: Proc. of PLDI, pp. 37–49 (May 1999)Google Scholar
  12. 12.
    Fisher, K., Reppy, J.: Extending Moby with Inheritance-Based Subtyping. In: Bertino, E. (ed.) ECOOP 2000. LNCS, vol. 1850, pp. 83–107. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  13. 13.
    Flatt, M., Felleisen, M.: Units: Cool modules for HOT languages. In: Proc. of PLDI, pp. 236–248 (May 1998)Google Scholar
  14. 14.
    Flatt, M., Krishnamurthi, S., Felleisen, M.: Classes and mixins. In: Proc. of POPL, pp. 171–183 (January 1999)Google Scholar
  15. 15.
    Glew, N., Morrisett, G.: Type-safe linking and modular assembly language. In: Proc. of POPL (January 1999)Google Scholar
  16. 16.
    Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. In: Proc. of OOPSLA, pp. 132–146 (October 1999)Google Scholar
  17. 17.
    Leroy, X., Doligez, D., Garrigue, J., R’emy, D., Vouillon, J.: The Objective CAML system, documentation and user’s manual (2000), http://caml.inria.fr/ocaml/htmlman/
  18. 18.
    Liang, S., Bracha, G.: Dynamic class loading in the Java Virtual Machine. In: Proc. of OOPSLA (October 1998)Google Scholar
  19. 19.
    McDirmid, S., Flatt, M., Hsieh, W.C.: Jiazzi: New-age components for old-fashioned Java. In: Proc. of OOPSLA, pp. 211–222 (October 2001)Google Scholar
  20. 20.
    Millstein, T., Bleckner, C., Chambers, C.: Modular typechecking for hierarchically extensible datatypes and functions. In: Proc. of ICFP (October 2002)Google Scholar
  21. 21.
    Millstein, T., Chambers, C.: Modular Statically Typed Multimethods. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 279–303. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  22. 22.
    Riecke, J.G., Stone, C.A.: Privacy via subsumption. In: Theory and Practice of Object Systems (1999)Google Scholar
  23. 23.
    Stone, C.: Extensible objects without labels. In: Proc. of FOOL (January 2002)Google Scholar
  24. 24.
    Szyperski, C.: Component Software: Beyond Object-Oriented Programming. ACM Press and Addison-Wesley (1998)Google Scholar
  25. 25.
    Vouillon, J.: Combining subsumption and binary methods: An object calculus with views. In: Proc. of POPL, pp. 290–303 (January 2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Sean McDirmid
    • 1
  • Wilson C. Hsieh
    • 2
  • Matthew Flatt
    • 2
  1. 1.École Polytechnique Fédérale de Lausanne (EPFL)LausanneSwitzerland
  2. 2.University of UtahSalt Lake CityUSA

Personalised recommendations