Software Open Access

# A Path to DOT: Formalizing Fully Path-Dependent Types (Artifact)

Rapoport, Marianna; Lhoták, Ondřej

### Citation Style Language JSON Export

{
"publisher": "Zenodo",
"DOI": "10.5281/zenodo.3366234",
"title": "A Path to DOT: Formalizing Fully Path-Dependent Types (Artifact)",
"issued": {
"date-parts": [
[
2019,
7,
5
]
]
},
"abstract": "<p>This is the artifact for our OOPSLA&#39;19 paper that presents <em>pDOT</em>, a&nbsp;generalization of the Dependent Object Types calculus with support for paths of arbitrary length. This artifact contains the type soundness proof of&nbsp;<em>pDOT</em> mechanized in Coq.</p>\n\n<p><em>Paper abstract:</em></p>\n\n<p>The Dependent Object Types (DOT) calculus aims to formalize the Scala programming language with a focus on&nbsp;<em>path-dependent types</em>&nbsp;&mdash; types such as&nbsp;<span class=\"math-tex\">\$$x.a_1\\dots a_n.T\$$</span> that depend on the runtime value of a&nbsp;<em>path</em>&nbsp;<span class=\"math-tex\">\$$x.a_1 \\dots a_n\$$</span>&nbsp;to an object. Unfortunately, existing formulations of DOT can model only types of the form <span class=\"math-tex\">\$$x.A\$$</span>&nbsp;which depend on&nbsp;<em>variables</em>&nbsp;rather than general paths. This restriction makes it impossible to model nested module dependencies. Nesting small components inside larger ones is a necessary ingredient of a modular, scalable language. DOT&#39;s variable restriction thus undermines its ability to fully formalize a variety of programming-language features including Scala&#39;s module system, family polymorphism, and covariant specialization.</p>\n\n<p>This paper presents the pDOT calculus, which generalizes DOT to support types that depend on paths of arbitrary length, as well as singleton types to track path equality. We show that naive approaches to add paths to DOT make it inherently unsound, and present necessary conditions for such a calculus to be sound. We discuss the key changes necessary to adapt the techniques of the DOT soundness proofs so that they can be applied to pDOT. Our paper comes with a Coq-mechanized type-safety proof of pDOT. With support for paths of arbitrary length, pDOT can realize DOT&#39;s full potential for formalizing Scala-like calculi.</p>",
"author": [
{
"family": "Rapoport, Marianna"
},
{
"family": "Lhot\u00e1k, Ond\u0159ej"
}
],
"id": "3366234",
"event-place": "Athens, Greece",
"type": "article",
"event": "Object-oriented Programming, Systems, Languages, and Applications (Artifacts) (OOPSLA Artifacts)"
}
131
100
views