Two of the most exciting developments in programming languages research over the last decade have been constraint programming on the one hand, and typeful functional programming on the other hand. Constraint programming (CP) is an emergent software technology for declarative description and effective solving of large combinatorial problems, especially in the areas of planning and scheduling. Based on a strong theoretical foundation, this technology is also attracting widespread commercial interests. One key reason for its popularity is that constraints allow end-users to directly formalize the dependencies of the physical worlds; and through sound mathematical abstractions we can have the computers to understand and solve these dependencies. Higher-level programming languages have come a long way. One of the most promising technologies is advanced functional languages with a rich set of versatile features, such as higher-order functions, type generics, and algebraic structures. These features allow high-level language to function as better modular glues for constructing larger and yet safer software, providing precision and reusability to programming. In this thesis, we discuss how a constraint-solving technology, called Constraint-Handling Rules (CHR), can be embedded as an extension of a mainstream functional programming language, known as Haskell, in a type-safe fashion. We present various techniques used in the embedding which produces an excellent tool equipped with power from both worlds.
[1]
Paul Hudak,et al.
Modular domain specific languages and tools
,
1998,
Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).
[2]
Thom W. Frühwirth,et al.
Theory and Practice of Constraint Handling Rules
,
1998,
J. Log. Program..
[3]
Slim Abdennadher,et al.
JACK: A Java Constraint Kit
,
1999,
Electron. Notes Theor. Comput. Sci..
[4]
John W. Lloyd,et al.
Declarative Programming in Escher
,
1995
.
[5]
Ralf Hinze,et al.
Prolog's Control Constructs in a Functional Setting - Axioms and Implementation
,
2001,
Int. J. Found. Comput. Sci..
[6]
Juan José Moreno-Navarro,et al.
Logic Programming with Functions and Predicates: The Language BABEL
,
1992,
J. Log. Program..
[7]
Koen Claessen,et al.
Typed Logical Variables in Haskell
,
2001,
ACM SIGPLAN Symposium/Workshop on Haskell.
[8]
Slim Abdennadher,et al.
Operational Semantics and Confluence of Constraint Propagation Rules
,
1997,
CP.
[9]
Robin Milner,et al.
A Theory of Type Polymorphism in Programming
,
1978,
J. Comput. Syst. Sci..
[10]
M. Hanus,et al.
Curry: An Integrated Functional Logic Language
,
2003
.
[11]
Michael J. Maher,et al.
Constraint Logic Programming: A Survey
,
1994,
J. Log. Program..