Software Open Access

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

Rapoport, Marianna; Lhoták, Ondřej

### DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<identifier identifierType="DOI">10.5281/zenodo.3366234</identifier>
<creators>
<creator>
<creatorName>Rapoport, Marianna</creatorName>
<givenName>Marianna</givenName>
<familyName>Rapoport</familyName>
<affiliation>University of Waterloo</affiliation>
</creator>
<creator>
<creatorName>Lhoták, Ondřej</creatorName>
<givenName>Ondřej</givenName>
<familyName>Lhoták</familyName>
<affiliation>University of Waterloo</affiliation>
</creator>
</creators>
<titles>
<title>A Path to DOT: Formalizing Fully Path-Dependent Types (Artifact)</title>
</titles>
<publisher>Zenodo</publisher>
<publicationYear>2019</publicationYear>
<subjects>
<subject>Scala, DOT, type systems, type safety, Coq</subject>
</subjects>
<contributors>
<contributor contributorType="Other">
<contributorName>Wang, Lu</contributorName>
<givenName>Lu</givenName>
<familyName>Wang</familyName>
<affiliation>University of Waterloo</affiliation>
</contributor>
<contributor contributorType="Other">
<contributorName>Zhao, Yaoyu</contributorName>
<givenName>Yaoyu</givenName>
<familyName>Zhao</familyName>
<affiliation>University of Waterloo</affiliation>
</contributor>
</contributors>
<dates>
<date dateType="Issued">2019-07-05</date>
</dates>
<resourceType resourceTypeGeneral="Software"/>
<alternateIdentifiers>
<alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/3366234</alternateIdentifier>
</alternateIdentifiers>
<relatedIdentifiers>
<relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.3366233</relatedIdentifier>
</relatedIdentifiers>
<rightsList>
<rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
</rightsList>
<descriptions>
<description descriptionType="Abstract">&lt;p&gt;This is the artifact for our OOPSLA&amp;#39;19 paper that presents &lt;em&gt;pDOT&lt;/em&gt;, a&amp;nbsp;generalization of the Dependent Object Types calculus with support for paths of arbitrary length. This artifact contains the type soundness proof of&amp;nbsp;&lt;em&gt;pDOT&lt;/em&gt; mechanized in Coq.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Paper abstract:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The Dependent Object Types (DOT) calculus aims to formalize the Scala programming language with a focus on&amp;nbsp;&lt;em&gt;path-dependent types&lt;/em&gt;&amp;nbsp;&amp;mdash; types such as&amp;nbsp;&lt;span class="math-tex"&gt;$$x.a_1\dots a_n.T$$&lt;/span&gt; that depend on the runtime value of a&amp;nbsp;&lt;em&gt;path&lt;/em&gt;&amp;nbsp;&lt;span class="math-tex"&gt;$$x.a_1 \dots a_n$$&lt;/span&gt;&amp;nbsp;to an object. Unfortunately, existing formulations of DOT can model only types of the form &lt;span class="math-tex"&gt;$$x.A$$&lt;/span&gt;&amp;nbsp;which depend on&amp;nbsp;&lt;em&gt;variables&lt;/em&gt;&amp;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&amp;#39;s variable restriction thus undermines its ability to fully formalize a variety of programming-language features including Scala&amp;#39;s module system, family polymorphism, and covariant specialization.&lt;/p&gt;

&lt;p&gt;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&amp;#39;s full potential for formalizing Scala-like calculi.&lt;/p&gt;</description>
</descriptions>
</resource>

131
100
views