9 CHR: Constraint Handling Rules
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Introduction
      • Overview
      • Initialising and Managing a Prolog Project
      • Built-in Predicates
      • SWI-Prolog extensions
      • Modules
      • Tabled execution (SLG resolution)
      • Constraint Logic Programming
      • CHR: Constraint Handling Rules
        • Introduction
        • Syntax and Semantics
        • CHR in SWI-Prolog Programs
        • Debugging
        • Examples
        • Backwards Compatibility
        • Programming Tips and Tricks
        • Compiler Errors and Warnings
      • Multithreaded applications
      • Coroutining using Prolog engines
      • Foreign Language Interface
      • Deploying applications
      • The SWI-Prolog library
      • Hackers corner
      • Compatibility with other Prolog dialects
      • Glossary of Terms
      • SWI-Prolog License Conditions and Tools
      • Summary
      • Bibliography
    • Packages

9 CHR: 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:

  • T. Schrijvers, and B. Demoen, The K.U.Leuven CHR System: Implementation and Application, First Workshop on Constraint Handling Rules: Selected Contributions (Frühwirth, T. and Meister, M., eds.), pp. 1--5, 2004.

On the K.U.Leuven CHR website (http://dtai.cs.kuleuven.be/CHR/) you can find more related papers, references and example programs.


Section Index


9.1 Introduction
9.2 Syntax and Semantics
9.2.1 Syntax of CHR rules
9.2.2 Semantics
9.3 CHR in SWI-Prolog Programs
9.3.1 Embedding in Prolog Programs
9.3.2 Constraint declaration
9.3.3 Compilation
9.4 Debugging
9.4.1 Ports
9.4.2 Tracing
9.4.3 CHR Debugging Predicates
9.5 Examples
9.6 Backwards Compatibility
9.6.1 The Old SICStus CHR implemenation
9.6.2 The Old ECLiPSe CHR implemenation
9.7 Programming Tips and Tricks
9.8 Compiler Errors and Warnings
9.8.1 CHR Compiler Errors