A theory of overloading

A theory of overloading
复制标题

DOI:
10.1145/1108970.1108974
复制
发表时间:
2005-11-01
影响因子:
1.3
通讯作者:
Sulzmann, M
Sulzmann, M
中科院分区:
计算机科学2区
文献类型:
--
作者:
Stuckey, PJ;Sulzmann, M

文献摘要

被引文献

相似文献

我们提出了一种新颖的方法,允许本着类型类的精神重载标识符。我们的方法依赖于 HM(X) 类型系统框架与约束处理规则 (CHR) 的组合。 CHR 是一种用于编写增量约束求解器的声明性语言,它为我们的方案提供了一种可编程类型语言的形式。 CHR 使我们能够精确地描述重载标识符之间的关系。在 CHR 上的某些充分条件下,我们实现了可判定的类型推断,并且程序的语义意义是明确的。我们的方法为许多类型类扩展(例如多参数类型类和函数依赖项)提供了通用的形式基础。
We present a novel approach to allow for overloading of identifiers in the spirit of type classes. Our approach relies on a combination of the HM(X) type system framework with Constraint Handling Rules (CHRs). CHRs are a declarative language for writing incremental constraint solvers, that provide our scheme with a form of programmable type language. CHRs allow us to precisely describe the relationships among overloaded identifiers. Under some sufficient conditions on the CHRs we achieve decidable type inference and the semantic meaning of programs is unambiguous. Our approach provides a common formal basis for many type class extensions such as multiparameter type classes and functional dependencies.