Skip to main content

Optimizing Dynamic Class Composition in a Statically Typed Language

  • Conference paper
Objects, Components, Models and Patterns (TOOLS EUROPE 2008)

Part of the book series: Lecture Notes in Business Information Processing ((LNBIP,volume 11))

Included in the following conference series:

Abstract

In statically typed languages the set of classes and similar classifiers is commonly fully determined at compile time. Complete classifier representations can then be loaded at run-time, e.g., from a an executable file or a class file. However, some typing constructs—such as virtual classes—enable a type safe treatment of classifiers and their associated types and instances, even in the case where classifiers are created dynamically. This opens the opportunity to make dynamic class computations available as an integrated part of the language semantics. The language gbeta is an example where this is achieved based on mixins and linearization. In this paper we focus on the virtual machine related challenges of supporting dynamic class composition. In particular we present some core algorithms used for creating new classes, as well as some performance enhancements in these algorithms.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Augustsson, L.: Cayenne - a language with dependent types. In: ICFP, pp. 239–250 (1998)

    Google Scholar 

  2. Barrett, K., Cassels, B., Haahr, P., Moon, D.A., Playford, K., Withington, P.T.: A monotonic superclass linearization for dylan. In: Conference on Object-Oriented, pp. 69–82 (1996)

    Google Scholar 

  3. Betarte, G.: Dependent Record Types and Algebraic Structures in Type Theory. Phd thesis, Dept. of Computing Science, Chalmers Univ. of Technology and Univ. of Göteborg (1998)

    Google Scholar 

  4. Bracha, G.: Executable grammars in newspeak. Electron. Notes Theor. Comput. Sci. 193, 3–18 (2007)

    Article  Google Scholar 

  5. Bracha, G., Cook, W.: Mixin-based inheritance. In: Proceedings OOPSLA/ECOOP 1990, ACM SIGPLAN Notices, vol. 25(10), pp. 303–311 (October 1990)

    Google Scholar 

  6. Deutsch, L.P., Schiffman, A.M.: Efficient implementation of the Smalltalk-80 system. In: Conference Record of the Eleventh Annual ACM Symposium on Principles of Programming Languages, Salt Lake City, Utah, pp. 297–302 (1984)

    Google Scholar 

  7. Ducournau, R., Habib, M., Mugnier, M.L., Huchard, M.: Proposal for a Monotonic Multiple Inheritance Linearization. In: ACM SIGPLAN Notices, Oregon, USA, vol. 29(10), pp. 164–175 (October 1994)

    Google Scholar 

  8. Ernst, E.: Higher-order hierarchies. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 303–329. Springer, Heidelberg (2003)

    Google Scholar 

  9. Ernst, E.: gbeta – a Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance. PhD thesis, Department of Computer Science, University of Aarhus, Århus, Denmark (1999)

    Google Scholar 

  10. Ernst, E.: Propagating class and method combination. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  11. Ernst, E.: Family polymorphism. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 303–326. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  12. Ernst, E.: Reconciling virtual classes with genericity. In: Lightfoot, D.E., Szyperski, C.A. (eds.) JMLC 2006. LNCS, vol. 4228, pp. 57–72. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  13. Ernst, E., Ostermann, K., Cook, W.R.: A virtual class calculus. In: POPL 2006: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 270–282. ACM Press, New York (2006)

    Chapter  Google Scholar 

  14. Goldberg, A., Robson, D.: Smalltalk–80: The Language. Addison-Wesley, Reading (1989)

    MATH  Google Scholar 

  15. Hlzle, U., Chambers, C., Ungar, D.: Optimizing dynamically-typed object-oriented languages with polymorphic inline caches (1991)

    Google Scholar 

  16. Madsen, O.L., Møller-Pedersen, B.: Virtual classes: A powerful mechanism in object-oriented programming. In: Proceedings OOPSLA 1989, ACM SIGPLAN Notices, vol. 24(10), pp. 397–406 (October 1989)

    Google Scholar 

  17. Madsen, O.L., Nygaard, K., Møller-Pedersen, B.: Object-Oriented Programming in The Beta Programming Language. Addison-Wesley (1993)

    Google Scholar 

  18. Mezini, M., Ostermann, K.: Conquering aspects with caesar. In: AOSD 2003: Proceedings of the 2nd international conference on Aspect-oriented software development, pp. 90–99. ACM Press, New York (2003)

    Chapter  Google Scholar 

  19. Mitchell, J.C., Plotkin, G.D.: Abstract types have existential types. In: Conference Record of the Twelfth Annual ACM Symposium on Principles of Programming Languages, pp. 37–51. ACM (January 1985)

    Google Scholar 

  20. Nystrom, N., Qi, X., Myers, A.C.: J&: nested intersection for scalable software composition. In: OOPSLA 2006: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pp. 21–36. ACM, New York (2006)

    Chapter  Google Scholar 

  21. Odersky, M., Cremet, V., Röckl, C., Zenger, M.: A nominal theory of objects with dependent types. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 201–224. Springer, Heidelberg (2003)

    Google Scholar 

  22. Ungar, D., Smith, R.B.: Self: The power of simplicity. In: Proceedings OOPSLA 1987, Orlando, FL, pp. 227–242 (October 1987)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Richard F. Paige Bertrand Meyer

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nielsen, A.B., Ernst, E. (2008). Optimizing Dynamic Class Composition in a Statically Typed Language. In: Paige, R.F., Meyer, B. (eds) Objects, Components, Models and Patterns. TOOLS EUROPE 2008. Lecture Notes in Business Information Processing, vol 11. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69824-1_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69824-1_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69823-4

  • Online ISBN: 978-3-540-69824-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics