Adding Constraint Handling Rules to Curry

by Michael Hanus

Proc. of the 20th Workshop on Logic Programming (WLP 2006), INFSYS Research Report 1843-06-02 (TU Wien), pp. 81-90, 2006

This paper proposes an integration of Constraint Handling Rules (CHR), a rule-based language to specify application-oriented constraint solvers, into the declarative multi-paradigm language Curry. This integration provides a convenient way to specify and use flexible constraint systems in applications implemented in Curry. We propose to represent CHR as data objects in Curry programs so that the advantages of Curry (static typing, functional notation) can also be exploited to define CHR. In order to write CHR in a compact way, we define a set of abstractions that hide the concrete CHR data objects. We sketch an implementation of this concept in the Prolog-based Curry implementation PAKCS that compiles CHR data objects into CHR Prolog programs. A prototypical implementation is available here.

PDF (164 KB) BibTeX-Entry