A theory of overloading
A theory of overloading
复制标题
DOI:
10.1145/1108970.1108974
复制
发表时间:
2005-11-01
影响因子:
1.3
通讯作者:
Sulzmann, M
中科院分区:
文献类型:
--
作者:
Stuckey, PJ;Sulzmann, M
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.