Mutable WadlerFest DOT

The Dependent Object Types (DOT) calculus aims to model the essence of Scala, with a focus on abstract type members, path-dependent types, and subtyping. Other Scala features could be defined by translation to DOT. Mutation is a fundamental feature of Scala currently missing in DOT. Mutation in DOT is needed not only to model effectful computation and mutation in Scala programs, but even to precisely specify how Scala initializes immutable variables and fields (vals). We present an extension to DOT that adds typed mutable reference cells. We have proven the extension sound with a mechanized proof in Coq. We present the key features of our extended calculus and its soundness proof, and discuss the challenges that we encountered in our search for a sound design and the alternative solutions that we considered.

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

[2]  Nada Amin,et al.  From F to DOT: Type Soundness Proofs with Definitional Interpreters , 2015, ArXiv.

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

[4]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

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

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

[7]  Nicholas Robert Cameron,et al.  Encoding Featherweight Java with assignment and immutability using the Coq proof assistant , 2012, FTfJP@ECOOP.

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

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

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

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

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

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

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

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