A theory of overloading

Peter J. Stuckey, Martin Sulzmann

Research output: Contribution to journalArticleResearchpeer-review

37 Citations (Scopus)

Abstract

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.

Original languageEnglish
Pages (from-to)1216-1269
Number of pages54
JournalACM Transactions on Programming Languages and Systems
Volume27
Issue number6
DOIs
Publication statusPublished - 1 Dec 2005
Externally publishedYes

Keywords

  • Coherence
  • Constraints
  • Evidence translation
  • Overloading
  • Type classes
  • Type inference

Cite this