Undecidability of D_<: and Its Decidable Fragments

08/14/2019
by   Jason Hu, et al.
0

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.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

08/17/2017

Towards Algorithmic Typing for DOT

The Dependent Object Types (DOT) calculus formalizes key features of Sca...
08/12/2018

Typed Closure Conversion for the Calculus of Constructions

Dependently typed languages such as Coq are used to specify and verify t...
07/12/2019

Intersection Types for the Computational lambda-Calculus

We study polymorphic type assignment systems for untyped lambda-calculi ...
04/26/2013

Introduction to Judea Pearl's Do-Calculus

This is a purely pedagogical paper with no new results. The goal of the ...
08/13/2018

A prototype-based approach to object reclassification

We investigate, in the context of functional prototype-based lan- guages...
02/12/2021

Complete Bidirectional Typing for the Calculus of Inductive Constructions

This article presents a bidirectional type system for the Calculus of In...
04/15/2019

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.