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
iDOT-calculus.zip
md5:7e1a7be293e258dd63cf6d68b856e34a
3.2 MB Download
LICENSE
md5:23b93828552cc55df401f8c8e87ecac0
1.1 kB Download
README.pdf
md5:0fe3f1060eebdf51c524082b82c526cd
336.9 kB Download
50
42
views
downloads
All versions This version
Views 5050
Downloads 4242
Data volume 18.6 MB18.6 MB
Unique views 3939
Unique downloads 3333

Share

Cite as