7CHR: Constraint Handling Rules

This chapter is written by Tom Schrijvers, K.U. Leuven, and adjustments by Jan Wielemaker.

The CHR system of SWI-Prolog is the K.U.Leuven CHR system. The runtime environment is written by Christian Holzbaur and Tom Schrijvers while the compiler is written by Tom Schrijvers. Both are integrated with SWI-Prolog and licensed under compatible conditions with permission from the authors.

The main reference for the K.U.Leuven CHR system is:

On the K.U.Leuven CHR website (http://www.cs.kuleuven.be/\~{}toms/CHR/) you can find more related papers, references and example programs.


Section Index


7.1Introduction
7.2Syntax and Semantics
7.2.1Syntax
7.2.2Semantics
7.3CHR in SWI-Prolog Programs
7.3.1Embedding in Prolog Programs
7.3.2Constraint declaration
7.3.3Compilation
7.4Debugging
7.4.1Ports
7.4.2Tracing
7.4.3CHR Debugging Predicates
7.5Examples
7.6Backwards Compatibility
7.7Programming Tips and Tricks
7.8Compiler Errors and Warnings
7.8.1CHR Compiler Errors