Search Results

Documents authored by Pu, Justin


Document
Artifact
Scala with Explicit Nulls (Artifact)

Authors: Abel Nieto, Yaoyu Zhao, Ondřej Lhoták, Angela Chang, and Justin Pu

Published in: DARTS, Volume 6, Issue 2, Special Issue of the 34th European Conference on Object-Oriented Programming (ECOOP 2020)


Abstract
This artifact is a companion to the paper "Scala with Explicit Nulls", where we present a modification to the Scala type system that makes nullability explicit in the types. Specifically, we make reference types non-nullable by default, while still allowing for nullable types via union types. The artifact contains an implementation of this new type system design as a fork of the Dotty (Scala 3) compiler. Additionally, the artifact contains the source code of multiple Scala libraries that we used to evaluate our design.

Cite as

Abel Nieto, Yaoyu Zhao, Ondřej Lhoták, Angela Chang, and Justin Pu. Scala with Explicit Nulls (Artifact). In Special Issue of the 34th European Conference on Object-Oriented Programming (ECOOP 2020). Dagstuhl Artifacts Series (DARTS), Volume 6, Issue 2, pp. 14:1-14:2, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2020)


Copy BibTex To Clipboard

@Article{nieto_et_al:DARTS.6.2.14,
  author =	{Nieto, Abel and Zhao, Yaoyu and Lhot\'{a}k, Ond\v{r}ej and Chang, Angela and Pu, Justin},
  title =	{{Scala with Explicit Nulls (Artifact)}},
  pages =	{14:1--14:2},
  journal =	{Dagstuhl Artifacts Series},
  ISSN =	{2509-8195},
  year =	{2020},
  volume =	{6},
  number =	{2},
  editor =	{Nieto, Abel and Zhao, Yaoyu and Lhot\'{a}k, Ond\v{r}ej and Chang, Angela and Pu, Justin},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/DARTS.6.2.14},
  URN =		{urn:nbn:de:0030-drops-132117},
  doi =		{10.4230/DARTS.6.2.14},
  annote =	{Keywords: Scala, Java, nullability, language interoperability, type systems}
}
Document
Scala with Explicit Nulls

Authors: Abel Nieto, Yaoyu Zhao, Ondřej Lhoták, Angela Chang, and Justin Pu

Published in: LIPIcs, Volume 166, 34th European Conference on Object-Oriented Programming (ECOOP 2020)


Abstract
The Scala programming language makes all reference types implicitly nullable. This is a problem, because null references do not support most operations that do make sense on regular objects, leading to runtime errors. In this paper, we present a modification to the Scala type system that makes nullability explicit in the types. Specifically, we make reference types non-nullable by default, while still allowing for nullable types via union types. We have implemented this design for explicit nulls as a fork of the Dotty (Scala 3) compiler. We evaluate our scheme by migrating a number of Scala libraries to use explicit nulls. Finally, we give a denotational semantics of type nullification, the interoperability layer between Java and Scala with explicit nulls. We show a soundness theorem stating that, for variants of System F_ω that model Java and Scala, nullification preserves values of types.

Cite as

Abel Nieto, Yaoyu Zhao, Ondřej Lhoták, Angela Chang, and Justin Pu. Scala with Explicit Nulls. In 34th European Conference on Object-Oriented Programming (ECOOP 2020). Leibniz International Proceedings in Informatics (LIPIcs), Volume 166, pp. 25:1-25:26, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2020)


Copy BibTex To Clipboard

@InProceedings{nieto_et_al:LIPIcs.ECOOP.2020.25,
  author =	{Nieto, Abel and Zhao, Yaoyu and Lhot\'{a}k, Ond\v{r}ej and Chang, Angela and Pu, Justin},
  title =	{{Scala with Explicit Nulls}},
  booktitle =	{34th European Conference on Object-Oriented Programming (ECOOP 2020)},
  pages =	{25:1--25:26},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-154-2},
  ISSN =	{1868-8969},
  year =	{2020},
  volume =	{166},
  editor =	{Hirschfeld, Robert and Pape, Tobias},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2020.25},
  URN =		{urn:nbn:de:0030-drops-131821},
  doi =		{10.4230/LIPIcs.ECOOP.2020.25},
  annote =	{Keywords: Scala, Java, nullability, language interoperability, type systems}
}
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail