A Core Calculus for Scala Type Checking

  • Vincent Cremet
  • François Garillot
  • Sergueï Lenglet
  • Martin Odersky
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4162)


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.


Type Signature Recursive Call Type Assignment Type Check Abstract Type 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 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. 2.
    Altherr, P., Cremet, V.: Inner Classes and Virtual Types. EPFL Technical Report IC/2005/013 (March 2005)Google Scholar
  3. 3.
    Ancona, D., Zucca, E.: A primitive calculus for module systems. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  4. 4.
    Ancona, D., Zucca, E.: A calculus of module systems. Journal of Functional Programming (2002)Google Scholar
  5. 5.
    Bracha, G.: The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. PhD thesis, University of Utah (1992)Google Scholar
  6. 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)CrossRefGoogle Scholar
  7. 7.
    Bruce, K.: Some challenging typing issues in object-oriented languages. Electronic notes in Theoretical Computer Science 82(8) (2003)Google Scholar
  8. 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. 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. 10.
    Cremet, V.: Foundations for Scala: Semantics and Proof of Virtual Types. PhD thesis, EPFL, No. 3556 (May 2006)Google Scholar
  11. 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. 12.
    Ernst, E.: Family polymorphism. In: Proceedings of the European Conference on Object-Oriented Programming, Budapest, Hungary, pp. 303–326 (2001)Google Scholar
  13. 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. 14.
    Garrigue, J.: Code reuse through polymorphic variants. In: Workshop on Foundations of Software Engineering, Sasaguri, Japan (November 2000)Google Scholar
  15. 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. 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. 17.
    Igarashi, A., Pierce, B.C.: Foundations for virtual types. Information and Computation 175(1), 34–49 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  18. 18.
    Igarashi, A., Pierce, B.C.: On inner classes. Inf. Comput. 177(1), 56–89 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  19. 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. 20.
    Jolly, P., Drossopoulou, S., Anderson, C., Ostermann, K.: Simple dependent types: Concord. In: Proc. FTfJP (2004)Google Scholar
  21. 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. 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. 23.
    Nakata, K., Ito, A., Garrigue, J.: Recursive object-oriented modules. In: Proc. FOOL 12 (January 2005)Google Scholar
  24. 24.
    Nystrom, N., Chong, S., Myers, A.: Scalable extensibility via nested inheritance. In: Proc. OOPSLA, pp. 99–115 (2005)Google Scholar
  25. 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)CrossRefGoogle Scholar
  26. 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. 27.
    Odersky, M., Zenger, M.: Independently extensible solutions to the expression problem. In: Proc. FOOL 12 (January 2005),
  28. 28.
    Odersky, M., Zenger, M.: Scalable component abstractions. In: Proc. OOPSLA (2005)Google Scholar
  29. 29.
    Pierce, B.C.: Bounded quantification is undecidable. Information and Computation 112(1), 131–165 (1994)zbMATHCrossRefMathSciNetGoogle Scholar
  30. 30.
    Pierce, B.C., Turner, D.N.: Local type inference. In: Proc. POPL (1998)Google Scholar
  31. 31.
    Rémy, D., Vuillon, J.: On the (un)reality of virtual types (March 2000), available from
  32. 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. 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)CrossRefGoogle Scholar
  34. 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. 35.
    Zdancewic, S.: Type inference for Java 5: Wildcards, F-bounds, and undecidability (2006),

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Vincent Cremet
    • 1
  • François Garillot
    • 2
  • Sergueï Lenglet
    • 3
  • Martin Odersky
    • 1
  1. 1.École Polytechnique Fédérale de Lausanne, INR EcublensLausanneSwitzerland
  2. 2.École Normale SupérieureParisFrance
  3. 3.École Normale Supérieure de LyonLyonFrance

Personalised recommendations