Initializing Global Objects: Time and Order (Video, OOPSLA2 2023)
Fengyun Liu, Ondřej Lhoták, David Hua, and Enze Xing
(Oracle Labs, Switzerland; University of Waterloo, Canada; University of Waterloo, Canada; University of Waterloo, Canada)
Abstract: Object-oriented programming has been bothered by an awkward feature for a long time: static members. Static members not only compromise the conceptual integrity of object-oriented programming, but also give rise to subtle initialization errors, such as reading non-initialized fields and deadlocks. The Scala programming language eliminated static members from the language, replacing them with global objects that present a unified object-oriented programming model. However, the problem of global object initialization remains open, and programmers still suffer from initialization errors. We propose partial ordering and initialization-time irrelevance as two fundamental principles for initializing global objects. Based on these principles, we put forward an effective static analysis to ensure safe initialization of global objects, which eliminates initialization errors at compile time. The analysis also enables static scheduling of global object initialization to avoid runtime overhead. The analysis is modular at the granularity of objects and it avoids whole-program analysis. To make the analysis explainable and tunable, we introduce the concept of regions to make context-sensitivity understandable and customizable by programmers.
Article: https://doi.org/10.1145/3622844
Supplementary archive: https://doi.org/10.5281/zenodo.8329922 (Badges: Artifacts Available, Artifacts Evaluated — Reusable)
ORCID: https://orcid.org/0000-0001-7949-4303, https://orcid.org/0000-0001-9066-1889, https://orcid.org/0009-0004-1753-2975, https://orcid.org/0009-0008-1265-5254
Video Tags: initialization safety, initialization-time irrelevance, region context, oopslab23main-p374-p, doi:10.1145/3622844, doi:10.5281/zenodo.8329922, orcid:0000-0001-7949-4303, orcid:0000-0001-9066-1889, orcid:0009-0004-1753-2975, orcid:0009-0008-1265-5254, Artifacts Available, Artifacts Evaluated — Reusable
Presentation at the OOPSLA2 2023 conference, October 22–27, 2023, https://2023.splashcon.org/track/spla...
Sponsored by ACM SIGPLAN,
Информация по комментариям в разработке