Scaletta Home Page


We study the interplay between inner classes and virtual types. The combination of these two concepts can be observed in object-oriented languages like BETA or Scala. This study is based on a calculus of classes and objects composed of a very limited number of constructs. For example the calculus has neither methods nor class constructors. Instead it has a more general concept of abstract inheritance which lets a class extend an arbitrary object. Thanks to an interpretation of terms as types the calculus also unifies type fields and term fields. The main contribution of this work is to show that typing virtual types in the presence of inner classes requires some kind of alias analysis and to formalize this mechanism with a simple calculus.


Inner Classes and Virtual Types. Philippe Altherr, Vincent Cremet. Submitted to The European Conference on Object-Oriented Programming (Ecoop 2005). Last modified the 25th of December (2005).


Inductive integers with predecessor, successor and addition.
Same example without syntactic sugar.
Encoding of class constructors for two and three-dimensionnal points.
Encoding of interfaces (works also for mixins).
Encoding of generic lists with length and concatenation.
Types of functions over integers parameterized by the number of arguments.
Computation of prime numbers.
All the files are correctly type-checked by the compiler. They all contain a top-level test function main that can be called in the interpreter.


Archive containing an executable version of our compiler. It comes with a README explaining its usage and syntax.

Last modified the 27th of December (2005).