10.33.1 Introduction

Constraint Handling Rules (CHR) is a committed-choice rule-based language embedded in Prolog. It is designed for writing constraint solvers and is particularly useful for providing application-specific constraints. It has been used in many kinds of applications, like scheduling, model checking, abduction, type checking among many others.

CHR has previously been implemented in other Prolog systems (SICStus, Eclipse, Yap), Haskell and Java. This CHR system is based on the compilation scheme and runtime environment of CHR in SICStus.

In this documentation we restrict ourselves to giving a short overview of CHR in general and mainly focus on elements specific to this implementation. For a more thorough review of CHR we refer the reader to [Fruehwirth 98].

In CHR Syntax and Semantics we present the syntax of CHR in Prolog and explain informally its operational semantics. Next, CHR in Prolog Programs deals with practical issues of writing and compiling Prolog programs containing CHR. CHR Debugging explains the currently primitive CHR debugging facilities. CHR Debugging Predicates provides a few useful predicates to inspect the constraint store and CHR Examples illustrates CHR with two example programs. Finally, CHR Guidelines concludes with a few practical guidelines for using CHR.


Send feedback on this subject.