ιDOT: a DOT calculus with object initialization
Ifaz Kabir, Yufeng Li, Ondrej Lhoták
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0e26ab24-232f-48a2-b3d6-55d5a1ac64c6Cited by top-tier papers1
Ask how each one uses itRelated papers
- Undecidability of d<: and its decidable fragmentsJason Z. S. Hu, Ondrej LhotákPOPL 2020 · 9 citations
- A type-and-effect system for object initializationFengyun Liu, Ondrej Lhoták, Aggelos Biboudis, Paolo G. Giarrusso et al.OOPSLA 2020 · 8 citations
- A conceptual framework for safe object initialization: a principled and mechanized soundness proof of the Celsius modelClement Blaudeau, Fengyun LiuOOPSLA 2022 · 2 citations
- Initializing Global Objects: Time and OrderFengyun Liu, Ondrej Lhoták, David Hua, Enze XingOOPSLA 2023
- A case for DOT: theoretical foundations for objects with pattern matching and GADT-style reasoningAleksander Boruch-Gruszecki, Radoslaw Wasko, Yichen Xu, Lionel ParreauxOOPSLA 2022 · 4 citations
