Undecidability of D_<: and Its Decidable Fragments

by   Jason Hu, et al.

Dependent Object Types (DOT) is a calculus with path dependent types, intersection types, and object self-references, which serves as the core calculus of Scala 3. Although the calculus has been proven sound, it remains open whether type checking in DOT is decidable. In this paper, we establish undecidability proofs of type checking and subtyping of D_<:, a syntactic subset of DOT. It turns out that even for D_<:, undecidability is surprisingly difficult to show, as evidenced by counterexamples for past attempts. To prove undecidability, we discover an equivalent definition of the D_<: subtyping rules in normal form. Besides being easier to reason about, this definition makes the phenomenon of bad bounds explicit as a single inference rule. After removing this rule, we discover two decidable fragments of D_<: subtyping and identify algorithms to decide them. We prove soundness and completeness of the algorithms with respect to the fragments, and we prove that the algorithms terminate. Our proofs are mechanized in a combination of Coq and Agda.



There are no comments yet.


page 1

page 2

page 3

page 4


Towards Algorithmic Typing for DOT

The Dependent Object Types (DOT) calculus formalizes key features of Sca...

Typed Closure Conversion for the Calculus of Constructions

Dependently typed languages such as Coq are used to specify and verify t...

Intersection Types for the Computational lambda-Calculus

We study polymorphic type assignment systems for untyped lambda-calculi ...

Introduction to Judea Pearl's Do-Calculus

This is a purely pedagogical paper with no new results. The goal of the ...

A prototype-based approach to object reclassification

We investigate, in the context of functional prototype-based lan- guages...

Complete Bidirectional Typing for the Calculus of Inductive Constructions

This article presents a bidirectional type system for the Calculus of In...

A Path To DOT: Formalizing Fully-Path-Dependent Types

The Dependent Object Types (DOT) calculus aims to formalize the Scala pr...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.