Skip to main content

Safe Cross-Language Inheritance

  • Conference paper
Book cover ECOOP 2008 – Object-Oriented Programming (ECOOP 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5142))

Included in the following conference series:

Abstract

Inheritance is a standard means for reuse and for interfacing with external libraries. In a multi-language software product, extending a class written in a statically-typed language with a dynamically-typed class can require a significant number of manual indirections and other error-prone complications. Building on our previous interoperability work, we introduce a technique that allows safe, easy inheritance across languages. We demonstrate our technique for cross-language inheritance with a statically-typed object calculus and a dynamically-typed object calculus, where a statically-typed class can extend a dynamically-typed one and vice versa. We provide a proof sketch of soundness, as well as a guarantee that dynamic type errors do not arise due to statically-typed expressions.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. Flatt, M., Findler, R.B.: PLT MrEd: Graphical Toolbox Manual. Technical Report PLT-TR-2007-2-v370, PLT Scheme (2007)

    Google Scholar 

  2. Koenig, D., Glover, A., King, P., Laforge, G., Skeet, J.: Groovy in Action. Manning Publications (2007)

    Google Scholar 

  3. Gray, K.E., Findler, R.B., Flatt, M.: Fine-grained interoperability through mirrors and contracts. In: Proc. ACM Conf. on OOPSLA (2005)

    Google Scholar 

  4. Tobin-Hochstadt, S., Felleisen, M.: Interlanguage migration: From scripts to programs. In: Proc. of ACM Dynamic Languages Symposium (2006)

    Google Scholar 

  5. Wadler, P., Findler, R.B.: Well-typed programs can’t be blamed. In: Proc. ACM Workshop on Scheme and Functional Programming (2007)

    Google Scholar 

  6. Gray, K.E.: A model of Java/Scheme interoperability. In: Findler, R.B., Flatt, M., Felleisen, M. (eds.) Designing, Developing, and Debugging Programming Language Models. MIT Press, Cambridge (to appear, 2008)

    Google Scholar 

  7. Matthews, J., Findler, R.B., Flatt, M., Felleisen, M.: A visual environment for developing context-sensitive term rewriting systems. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091. Springer, Heidelberg (2004)

    Google Scholar 

  8. Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A Minimal Core Calculus for Java and GJ. In: Proc. ACM Conf. on OOPSLA (1999)

    Google Scholar 

  9. Flatt, M., Krishnamurthi, S., Felleisen, M.: A Programmer’s Reduction Semantics for Classes and Mixins. In: Alves-Foss, J. (ed.) Formal Syntax and Semantics of Java. LNCS, vol. 1523. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  10. Flatt, M.: PLT MzLib: Libraries manual. Technical Report PLT-TR-2007-n-v370, PLT Scheme (2007)

    Google Scholar 

  11. Siek, J.G., Taha, W.: Gradual typing for objects. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  12. Siek, J.G., Taha, W.: Gradual typing for functional languages. In: Proc. ACM Workshop on Scheme and Functional Programming (2006)

    Google Scholar 

  13. Matthews, J., Findler, R.B.: Operational semantics for multi-language programs. In: Proc. ACM Conf. on Principles of Programming Languages (2007)

    Google Scholar 

  14. Abadi, M., Cardelli, L., Pierce, B., Plotkin, G.: Dynamic Typing in a Statically Typed Language. ACM J. Tran. on Prog. Languages and Systems 13 (1991)

    Google Scholar 

  15. Duggan, D.: Dynamic Typing for Distributed Programming in Polymorphic Languages. ACM J. Tran. on Prog. Languages and Systems 21, 11–45 (1999)

    Article  Google Scholar 

  16. Bracha, G., Griswold, D.: Strongtalk: Typechecking Smalltalk in a Production Environment. In: Proc. ACM Conf. on OOPSLA (1993)

    Google Scholar 

  17. Goldberg, A., Robson, D.: Smalltalk-80: The Language and its Implementation. Addison-Wesley, Reading (1983)

    MATH  Google Scholar 

  18. Cardelli, L.: Amber. In: Cousineau, G., Curien, P.-L., Robinet, B. (eds.) LITP 1985. LNCS, vol. 242. Springer, Heidelberg (1986)

    Google Scholar 

  19. Benton, N.: Embedded Interpreters. Journal of Functional Programming 15 (2005)

    Google Scholar 

  20. Ramsey, N.: Embedding an Interpreted Language Using Higher-Order Functions and Types. Journal of Functional Programming (to appear) Initial version in ACM Workshop on Interpreters, Virtual Machines and Emulators (June 2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan Vitek

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gray, K.E. (2008). Safe Cross-Language Inheritance. In: Vitek, J. (eds) ECOOP 2008 – Object-Oriented Programming. ECOOP 2008. Lecture Notes in Computer Science, vol 5142. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-70592-5_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-70592-5_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-70591-8

  • Online ISBN: 978-3-540-70592-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics