Mutable WadlerFest DOT

Marianna Rapoport, Ondřej Lhoták
2017 Proceedings of the 19th Workshop on Formal Techniques for Java-like Programs - FTFJP'17  
e Dependent Object Types (DOT) calculus aims to model the essence of Scala, with a focus on abstract type members, pathdependent types, and subtyping. Other Scala features could be de ned by translation to DOT. Mutation is a fundamental feature of Scala currently missing in DOT. Mutation in DOT is needed not only to model e ectful computation and mutation in Scala programs, but even to precisely specify how Scala initializes immutable variables and elds (vals). We present an extension to DOT
more » ... t 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 e Scala type system is nominal while WadlerFest DOT is (mostly) structural. erefore, the Scala example assigns the object a name, while WadlerFest DOT does not. 2 e mechanized proof can be found in our fork of the WadlerFest DOT proof repository (see h ps://github.com/amaurremi/dot-calculus).
doi:10.1145/3103111.3104036 dblp:conf/ecoop/RapoportL17 fatcat:fyholpkg6fd2fbde2ks5euwueu