The Constraint Handling Rules Library

# Chapter 9 The Constraint Handling Rules Library

The ech library implements constraint handling rules (CHRs), which can be mixed with normal ECLiPSecode. Several constraint handlers are provided in example files in the directory ech.

This library will replace the older chr library. In addition, there is now an experimental extended implementation of CHRs. This extended implementation is faster than the existing chr library, and contains some extensions and changes. This is described in section 9.9.

- Introduction
- Using Constraint Handling Rules
- Example Constraint Handlers
- The CHR Language
  - Constraint Handling Rules
  - How CHRs Work
- More on the CHR Language
  - Declarations
  - ECLiPSe Clauses
  - Options
  - CHR Built-In Predicates
- Labeling
- Writing Good CHR Programs
  - Choosing CHRs
  - Optimizations
- Debugging CHR Programs
  - Using the Debugger
- The Extended CHR Implementation
  - Invoking the extended CHR library
  - Syntactic Differences
  - Compiling
  - Semantics
  - Options and Built-In Predicates
  - Compiler generated predicates