Safe Object Initialization, Abstractly
Objects under initialization are fragile: some of their fields are not
yet initialized. Consequently, accessing those uninitialized fields
directly or indirectly may result in program crashes or abnormal
behaviors at runtime.
A newly created object goes through several states during its
initialization, beginning with all fields being empty until all of
them are filled. However, ensuring initialization safety statically,
without manual annotation of initialization states in the source code,
is a challenge, due to \emph{aliasing}, \emph{virtual method calls}
and \emph{typestate polymorphism}.
In this work, we introduce a novel analysis based on abstract
interpreters to ensure initialization safety. Compared to the previous
approaches, our analysis is simpler and easier to extend, and it does
not require any user annotations. The analysis is inter-procedural,
context-sensitive and flow-insensitive, yet it has good performance
thanks to \emph{local reasoning} and \emph{heap monotonicity}.
Sun 17 OctDisplayed time zone: Central Time (US & Canada) change
10:50 - 12:10 | |||
10:50 20mFull-paper | Implementing Path-Dependent GADT Reasoning for Scala 3 Scala Yichen Xu Beijing University of Posts and Telecommunications, Aleksander Boruch-Gruszecki EPFL, Lionel Parreaux Hong Kong University of Science and Technology DOI | ||
11:10 20mFull-paper | Safe Object Initialization, Abstractly Scala Fengyun Liu Oracle Labs, Ondřej Lhoták University of Waterloo, Enze Xing University of Waterloo, Cao Nguyên Pham University of Waterloo DOI |