ACM Home Page
Please provide us with feedback. Feedback
A theory of overloading
Full text PdfPdf (485 KB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 27 ,  Issue 6  (November 2005) table of contents
Pages: 1216 - 1269  
Year of Publication: 2005
ISSN:0164-0925
Authors
Peter J. Stuckey  NICTA Victoria Laboratory, University of Melbourne, Melbourne, Australia
Martin Sulzmann  National University of Singapore, Singapore
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 8,   Downloads (12 Months): 78,   Citation Count: 15
Additional Information:

abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1108970.1108974
What is a DOI?

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.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Abdennadher, S. 1997. Operational semantics and confluence of constraint propagation rules. In Proceedings of the 3rd International Conference on Principles and Practice of Constraint Programming, CP'97. Lecture Notes in Computer Science, Springer-Verlag, New York, 252--266.
 
2
 
3
4
5
 
6
7
 
8
 
9
 
10
 
11
 
12
Frühwirth, T. 1995. Constraint handling rules. In Constraint Programming: Basics and Trends. Lecture Notes in Computer Science, vol. 910. Springer-Verlag, NewYork.
 
13
Frühwirth, T. 1998a. A declarative language for constraint systems: Habilitation. Institut für Informatik, Ludwig-Maximilians-University Munich, Germany, July.
 
14
Frühwirth, T. 1998b. Theory and practice of constraint handling rules. J. Logic Prog. 37, 1--3, 95--138.
15
 
16
GHC 2003. Glasgow Haskell Compiler Home Page. http://www.haskell.org/ghc/.
 
17
Glynn, K., Stuckey, P., and Sulzmann, M. 2000. Type classes and constraint handling rules. In Proceedings of the 1st Workshop on Rule-Based Constraint Reasoning and Programming.
 
18
Hanus, M. 1994. The integration of functions into logic programming: From theory to practice. J. Logic Prog. 19&20, 583--628.
19
 
20
Jeffery, D., Henderson, F., and Somogyi, Z. 2000. Type classes in Mercury. In Proceedings of the 23rd Australasian Computer Science Conference. Australian Computer Science Communications, vol. 22. IEEE Computer Society Press, Los Alamitos, CA, 128--135.
 
21
 
22
Jones, M. P. 1993a. Coherence for qualified types. Research Report YALEU/DCS/RR-989, Yale University, Department of Computer Science. September.
23
 
24
 
25
Jones, S. P., Jones, M. P., and Meijer, E. 1997. Type classes: An exploration of the design space. In Haskell Workshop.
 
26
27
 
28
Milner, R. 1978. A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17, 348--375.
 
29
Nipkow, T. and Prehofer, C. 1995. Type reconstruction for type classes. J. Funct. Prog. 5, 2, 201--224.
 
30
31
 
32
Peyton Jones, S. 2003. Haskell 98 Language and Libraries: the Revised Report. Cambridge University Press. (Also see http://www.haskell.org/definition/.)
 
33
Plasmeijer, M. and van Eekelen, M. 1998. Language report Concurrent Clean. Tech. Rep. CSI-R9816, Computing Science Institute, University of Nijmegen, Nijmegen, The Netherlands. June. ftp://ftp.cs.kun.nl/pub/Clean/Clean13/doc/refman13.ps.gz.
 
34
Shields, M. and Jones, S. P. 2001. Object-oriented overloading for Haskell. In Proceedings of the Workshop on Multi-Language Infrastructure and Interoperability.
 
35
Shoenfield, J. 1967. Mathematical Logic. Addison-Wesley, Reading, MA.
 
36
Somogyi, Z., Henderson, F., and Conway, T. 1996. The execution algorithms of Mercury: An efficient purely declarativelogic programming language. J. Logic Prog. 29, 1--3, 17--64.
37
 
38
 
39
Sulzmann, M. and Wazny, J. 2003. The Chameleon system. http://www.comp.nus.edu.sg/~sulzmann/chameleon.
40
41

CITED BY  15


REVIEW

"Dachuan Yu : Reviewer"

Overloading, also know as ad hoc polymorphism, is a powerful programming feature that allows one named function to be dispatched to different implementations based on the argument types. For instance, a "+" operator could be overloaded to work not  more...

Collaborative Colleagues:
Peter J. Stuckey: colleagues
Martin Sulzmann: colleagues