Lune

OOPSLA2020Top-tier venue

ιDOT: a DOT calculus with object initialization

Ifaz Kabir, Yufeng Li, Ondrej Lhoták

2020Year
3Citations
1Top-tier citations

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.

CCS Concepts: • Software and its engineering → Formal language definitions; Object oriented languages.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 0e26ab24-232f-48a2-b3d6-55d5a1ac64c6

Cited by top-tier papers1

Ask how each one uses it

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines