A theory of overloading

  • Authors:
  • Peter J. Stuckey;Martin Sulzmann

  • Affiliations:
  • NICTA Victoria Laboratory, University of Melbourne, Melbourne, Australia;National University of Singapore, Singapore

  • Venue:
  • ACM Transactions on Programming Languages and Systems (TOPLAS)
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

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.