|
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
|
Kung Chen , Paul Hudak , Martin Odersky, Parametric type classes, Proceedings of the 1992 ACM conference on LISP and functional programming, p.170-181, June 22-24, 1992, San Francisco, California, United States
|
| |
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
|
Matthias Neubauer , Peter Thiemann , Martin Gasbichler , Michael Sperber, Functional logic overloading, Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.233-244, January 16-18, 2002, Portland, Oregon
|
| |
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
|
Jeffrey R. Lewis , John Launchbury , Erik Meijer , Mark B. Shields, Implicit parameters: dynamic scoping with static types, Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.108-118, January 19-21, 2000, Boston, MA, USA
[doi> 10.1145/325694.325708]
|
| |
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
|
Martin Odersky , Philip Wadler , Martin Wehr, A second look at overloading, Proceedings of the seventh international conference on Functional programming languages and computer architecture, p.135-146, June 26-28, 1995, La Jolla, California, United States
[doi> 10.1145/224164.224195]
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Julien Brunel , Damien Doligez , René Rydhof Hansen , Julia L. Lawall , Gilles Muller, A foundation for flow-based program matching: using temporal logic and model checking, Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, January 21-23, 2009, Savannah, GA, USA
|
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...
|