Skip to main content

A Core Calculus for Scala Type Checking

  • Conference paper
Mathematical Foundations of Computer Science 2006 (MFCS 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4162))

Abstract

We present a minimal core calculus that captures interesting constructs of the Scala programming language: nested classes, abstract types, mixin composition, and path dependent types. We show that the problems of type assignment and subtyping in this calculus are decidable.

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. Altherr, P.: A Typed Intermediate Language and Algorithms for Compiling Scala by Successive Rewritings. PhD thesis, EPFL, No. 3509 (March 2006)

    Google Scholar 

  2. Altherr, P., Cremet, V.: Inner Classes and Virtual Types. EPFL Technical Report IC/2005/013 (March 2005)

    Google Scholar 

  3. Ancona, D., Zucca, E.: A primitive calculus for module systems. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  4. Ancona, D., Zucca, E.: A calculus of module systems. Journal of Functional Programming (2002)

    Google Scholar 

  5. Bracha, G.: The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. PhD thesis, University of Utah (1992)

    Google Scholar 

  6. Bracha, G., Lindstrom, G.: Modularity meets inheritance. In: Proceedings of the IEEE Computer Society International Conference on Computer Languages, Washington, DC, pp. 282–290. IEEE Computer Society Press, Los Alamitos (1992)

    Chapter  Google Scholar 

  7. Bruce, K.: Some challenging typing issues in object-oriented languages. Electronic notes in Theoretical Computer Science 82(8) (2003)

    Google Scholar 

  8. Bruce, K.B., Odersky, M., Wadler, P.: A statical safe alternative to virtual types. In: Proceedings of the 5th International Workshop on Foundations of Object-Oriented Languages, San Diego, USA (1998)

    Google Scholar 

  9. Crary, K., Harper, R., Puri, S.: What is a recursive module? In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 50–63 (1999)

    Google Scholar 

  10. Cremet, V.: Foundations for Scala: Semantics and Proof of Virtual Types. PhD thesis, EPFL, No. 3556 (May 2006)

    Google Scholar 

  11. Ernst, E.: gBeta: A language with virtual attributes, block structure and propagating, dynamic inheritance. PhD thesis, Department of Computer Science, University of Aarhus, Denmark (1999)

    Google Scholar 

  12. Ernst, E.: Family polymorphism. In: Proceedings of the European Conference on Object-Oriented Programming, Budapest, Hungary, pp. 303–326 (2001)

    Google Scholar 

  13. Ernst, E., Ostermann, K., Cook, W.: A virtual class calculus. In: ACM Symposium on Principles of Programming Languages (POPL 2006) (January 2006)

    Google Scholar 

  14. Garrigue, J.: Code reuse through polymorphic variants. In: Workshop on Foundations of Software Engineering, Sasaguri, Japan (November 2000)

    Google Scholar 

  15. Harper, R., Lillibridge, M.: A type-theoretic approach to higher-order modules with sharing. In: Proceedings of the 21st ACM Symposium on Principles of Programming Languages (January 1994)

    Google Scholar 

  16. Hirschowitz, T., Leroy, X.: Mixin modules in a call-by-value setting. In: European Symposium on Programming, pp. 6–20 (2002)

    Google Scholar 

  17. Igarashi, A., Pierce, B.C.: Foundations for virtual types. Information and Computation 175(1), 34–49 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  18. Igarashi, A., Pierce, B.C.: On inner classes. Inf. Comput. 177(1), 56–89 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  19. Igarishi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. In: Proc. OOPSLA (November 1999)

    Google Scholar 

  20. Jolly, P., Drossopoulou, S., Anderson, C., Ostermann, K.: Simple dependent types: Concord. In: Proc. FTfJP (2004)

    Google Scholar 

  21. Leroy, X.: A syntactic theory of type generativity and sharing. In: ACM Symposium on Principles of Programming Languages (POPL), Portland, Oregon (1994)

    Google Scholar 

  22. Madsen, O.L., Møller-Pedersen, B., Nygaard, K.: Object-Oriented Programming in the BETA Programming Language. Addison-Wesley, Reading (1993)

    Google Scholar 

  23. Nakata, K., Ito, A., Garrigue, J.: Recursive object-oriented modules. In: Proc. FOOL 12 (January 2005)

    Google Scholar 

  24. Nystrom, N., Chong, S., Myers, A.: Scalable extensibility via nested inheritance. In: Proc. OOPSLA, pp. 99–115 (2005)

    Google Scholar 

  25. 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. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  26. Odersky, M., Zenger, C., Zenger, M.: Colored local type inference. In: Proceedings of the 28th ACM Symposium on Principles of Programming Languages, January 2001, pp. 41–53 (2001)

    Google Scholar 

  27. Odersky, M., Zenger, M.: Independently extensible solutions to the expression problem. In: Proc. FOOL 12 (January 2005), http://homepages.inf.ed.ac.uk/wadler/fool

  28. Odersky, M., Zenger, M.: Scalable component abstractions. In: Proc. OOPSLA (2005)

    Google Scholar 

  29. Pierce, B.C.: Bounded quantification is undecidable. Information and Computation 112(1), 131–165 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  30. Pierce, B.C., Turner, D.N.: Local type inference. In: Proc. POPL (1998)

    Google Scholar 

  31. Rémy, D., Vuillon, J.: On the (un)reality of virtual types (March 2000), available from http://pauillac.inria.fr/remy/work/virtual

  32. Torgersen, M.: Virtual types are statically safe. In: 5th Workshop on Foundations of Object-Oriented Languages, San Diego, CA, USA (January 1998)

    Google Scholar 

  33. Torgersen, M.: The expression problem revisited: Four new solutions using generics. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 123–146. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  34. Torgersen, M., Hansen, C.P., Ernst, E., von der Ahé, P., Bracha, G., Gafter, N.: Adding wildcards to the Java programming language. In: Proceedings SAC 2004, Nicosia, Cyprus, pp. 1289–1296. ACM Press, New York (2004)

    Google Scholar 

  35. Zdancewic, S.: Type inference for Java 5: Wildcards, F-bounds, and undecidability (2006), http://www.cis.upenn.edu/~stevez/note.html

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Cremet, V., Garillot, F., Lenglet, S., Odersky, M. (2006). A Core Calculus for Scala Type Checking. In: Královič, R., Urzyczyn, P. (eds) Mathematical Foundations of Computer Science 2006. MFCS 2006. Lecture Notes in Computer Science, vol 4162. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11821069_1

Download citation

  • DOI: https://doi.org/10.1007/11821069_1

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-37791-7

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics