首页> 美国政府科技报告 >Singleton Kinds and Singleton Types
【24h】

Singleton Kinds and Singleton Types

机译:单身种类和单身类型

获取原文

摘要

In this dissertation I study the properties of singleton kinds and singleton types. These are extremely precise classifiers for types and values, respectively: the kind of all types equal to (a given type), and the type of all values equal to (a given value). Singletons are interesting because they provide a very general and modular form of definition, allow fine-grained control of type computations, and allow many equational constraints to be expressed within the type system. This is useful, for example, when modeling the type sharing and type definition constraints appearing in module signatures in the Standard ML language; singletons are used for this purpose in the TILT compiler for Standard ML. However, the decidability of typechecking in the presence of singletons is not obvious. In order to typecheck a term, one 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 dissertation I present MIL0, a lambda calculus with singletons that is based upon the representation used by the TILT compiler. I prove important properties of this language, including type soundness and decidability of typechecking. The main technical result is decidability of equivalence for well-formed type constructors. Inspired by Coquand's result for type theory, I prove decidability of constructor equivalence for MIL0 by exhibiting a novel though slightly inefficient type-directed comparison algorithm. The correctness of this algorithm is proved using an interesting variant of Kripke-style logical relations: many relations are indexed by a single possible world (in our case, a typing context), but binary relations are indexed by two worlds. Using this result I can then show the correctness of a natural, practical algorithm used by the TILT compiler.

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号