【24h】

Discriminative Sum Types Locate the Source of Type Errors

机译:判别和类型确定类型错误的来源

获取原文
获取原文并翻译 | 示例

摘要

We propose type system for locating the source of type errors in an applied lambda calculus with ML-style polymorphism. The system is based on discriminative sum types-known from work on soft typing-with annotation subtyping and recursive types. This way, type clashes can be registered in the type for later reporting. The annotations track the potential producers and consumers for each value so that clashes can be traced to their cause. Every term is typeable in our system and type inference is decidable. A type derivation in our system describes all type errors present in the program, so that a principal derivation yields a pricipal description of all type errors present. Error messages are derived from completed type derivations. Thus, error messages are independent of the particular algorithm used for type inference, provided it constructs such a derivation.
机译:我们提出一种类型系统,用于在具有ML样式多态性的应用lambda演算中定位类型错误的来源。该系统基于可区分的和类型,该类型可从软类型的工作中了解到-带注释子类型和递归类型。这样,可以在类型中注册类型冲突,以供以后报告。注释会跟踪每个值的潜在生产者和消费者,以便可以将冲突追溯到其原因。每个术语在我们的系统中都是可键入的,并且类型推断是可确定的。我们系统中的类型派生描述了程序中存在的所有类型错误,因此主体派生产生了所有存在的所有类型错误的主要描述。错误消息来自完成的类型派生。因此,错误消息独立于用于类型推断的特定算法,前提是它构造了这种推导。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利