Software Open Access

ιDOT: A DOT Calculus with Object Initialization (Coq Formalization)

Kabir, Ifaz; Li, Yufeng; Lhoták, Ondřej

This is the artifact for our OOPSLA'20 paper that presents ιDOT, a Dependent Object Types calculus with a type and effect system to ensure safe initialization of objects. This artifact contains the proof of type safety for the ιDOT calculus, formalized in the Coq proof assistant.

Paper abstract:

The Dependent Object Types (DOT) calculus serves as a foundation of the Scala programming language, with a machine-verified soundness proof. However, Scala's type system has been shown to be unsound due to null references, which are used as default values of fields of objects before they have been initialized. This paper proposes ιDOT, an extension of DOT for ensuring safe initialization of objects. DOT was previously extended to κDOT with the addition of mutable fields and constructors. To κDOT, ιDOT adds an initialization effect system that statically prevents the possibility of reading a null reference from an uninitialized object. To design ιDOT, we have reformulated the Freedom Before Commitment object initialization scheme in terms of disjoint subheaps to make it easier to formalize in an effect system and prove sound. Soundness of ιDOT depends on the interplay of three systems of rules: a type system close to that of DOT, an effect system to ensure definite assignment of fields in each constructor, and an initialization system that tracks the initialization status of objects in a stack of subheaps. We have proven the overall system sound and verified the soundness proof using the Coq proof assistant.

Files (3.6 MB)
Name Size
3.2 MB Download
1.1 kB Download
336.9 kB Download
All versions This version
Views 5050
Downloads 4242
Data volume 18.6 MB18.6 MB
Unique views 3939
Unique downloads 3333


Cite as