A simple soundness proof for dependent object types

Dependent Object Types (DOT) is intended to be a core calculus for modelling Scala. Its distinguishing feature is abstract type members, fields in objects that hold types rather than values. Proving soundness of DOT has been surprisingly challenging, and existing proofs are complicated, and reason about multiple concepts at the same time (e.g. types, values, evaluation). To serve as a core calculus for Scala, DOT should be easy to experiment with and extend, and therefore its soundness proof needs to be easy to modify. This paper presents a simple and modular proof strategy for reasoning in DOT. The strategy separates reasoning about types from other concerns. It is centred around a theorem that connects the full DOT type system to a restricted variant in which the challenges and paradoxes caused by abstract type members are eliminated. Almost all reasoning in the proof is done in the intuitive world of this restricted type system. Once we have the necessary results about types, we observe that the other aspects of DOT are mostly standard and can be incorporated into a soundness proof using familiar techniques known from other calculi.

[1]  Martin Odersky,et al.  Scalable component abstractions , 2005, OOPSLA '05.

[2]  Erik Ernst gbeta - a Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance , 2000 .

[3]  Ross Tate,et al.  Java and scala's type systems are unsound: the existential crisis of null pointers , 2016, OOPSLA.

[4]  William R. Cook,et al.  A virtual class calculus , 2006, POPL '06.

[5]  Erik Ernst,et al.  Family Polymorphism , 2001, ECOOP.

[6]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[7]  Nada Amin,et al.  Type soundness for dependent object types (DOT) , 2016, OOPSLA.

[8]  Martin Odersky,et al.  A Nominal Theory of Objects with Dependent Types , 2003, ECOOP.

[9]  Martin Odersky,et al.  Foundations of path-dependent types , 2014, OOPSLA.

[10]  Tiark Rompf,et al.  Gentrification gone too far? affordable 2nd-class values for fun and (co-)effect , 2016, OOPSLA.

[11]  Nada Amin,et al.  Dependent Object Types , 2016 .

[12]  Martin Odersky,et al.  Safe type-level abstraction in Scala , 2008 .

[13]  Nobuko Yoshida,et al.  Lightweight Session Programming in Scala , 2016, ECOOP.

[14]  Ole Lehrmann Madsen,et al.  Virtual classes: a powerful mechanism in object-oriented programming , 1989, OOPSLA '89.

[15]  Ondrej Lhoták,et al.  Mutable WadlerFest DOT , 2017, FTfJP@ECOOP.

[16]  Martin Odersky,et al.  The Essence of Dependent Object Types , 2016, A List of Successes That Can Change the World.

[17]  Nada Amin,et al.  Type soundness proofs with definitional interpreters , 2017, POPL.

[18]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[19]  Sophia Drossopoulou,et al.  Tribe: a simple virtual class calculus , 2007, AOSD.

[20]  Martin Odersky,et al.  A Core Calculus for Scala Type Checking , 2006, MFCS.

[21]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..