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

page 1

page 2

page 3

page 4

research
08/17/2017

Towards Algorithmic Typing for DOT

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

Typed Closure Conversion for the Calculus of Constructions

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

Intersection Types for the Computational lambda-Calculus

We study polymorphic type assignment systems for untyped lambda-calculi ...
research
06/10/2023

Formalizing Box Inference for Capture Calculus

Capture calculus has recently been proposed as a solution to effect chec...
research
10/02/2022

Relational Models for the Lambek Calculus with Intersection and Constants

We consider relational semantics (R-models) for the Lambek calculus exte...
research
08/13/2018

A prototype-based approach to object reclassification

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

Complete Bidirectional Typing for the Calculus of Inductive Constructions

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

Please sign up or login with your details

Forgot password? Click here to reset