Deciding Type Equivalence in a Language with Singleton Kinds,

Abstract

Work on the TILT compiler for Standard ML led us to study a language with singleton kinds: S(A) is the kind of all types provably equivalent to the type A. Singletons are interesting because they provide a very general form of definitions for type variables and allow fine-grained control of type computations. Internally, TILT represents programs using a predicative variant of Girard's F(omega) enriched with singleton kinds, dependent product and function kinds (sigma and II), and a sub-kinding relation. An important benefit of using a typed language as the representation of programs is that typechecking can detect many common compiler implementation errors. However, the decidability of typechecking for our particular representation is not obvious. In order to typecheck a term, we must be able to determine whether two type constructors are provably equivalent. But in the presence of singleton kinds, the equivalence of type constructors depends both on the typing context in which they are compared and on the kind at which they are compared. In this paper we concentrate on the key issue for decidability of typechecking: determining the equivalence of well-formed type constructors. We show this problem decidable by presenting a sound, complete, and terminating decision algorithm. These properties are established by a novel Kripke-style logical relations argument inspired by Coquand's result for type theory.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Sep 15, 1999
Accession Number
ADA370309

Entities

People

  • Christopher A. Stone
  • Robert Harper

Organizations

  • Carnegie Mellon University

Tags

Communities of Interest

  • C4I

DTIC Thesaurus Topics

  • Algorithms
  • Artificial Intelligence
  • Calculus
  • Compilers
  • Computations
  • Computer Programming
  • Computer Science
  • Extraction
  • Identities
  • Inversion
  • Judgment
  • Language
  • Machine Learning
  • Notation
  • Programming Languages
  • Standards
  • Symmetry

Fields of Study

  • Computer science

Readers

  • Computational Linguistics