ι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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
Cited by top-tier papers1
Related 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
- 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
- Initializing Global Objects: Time and OrderFengyun Liu, Ondrej Lhoták, David Hua, Enze XingOOPSLA 2023
