The CHRrp System

The CHRrp system is an implementation of CHRrp: CHR extended with rule priorities, and is available for SWI-Prolog.

Download and Usage

An experimental version of the CHRrp system can be downloaded here. It runs on SWI-Prolog and requires that the K.U.Leuven CHR system is installed. CHRrp programs should be stored with an .chr file extension. To compile a CHRrp program, load the module called c, and call the main predicate with as argument the filename of the file to be compiled, without file extension. A corresponding .pl file is then generated. To execute a compiled program, load the generated .pl file and append a call to "check_activation" to your goal. Example programs can be found here.

Example of Compilation

As an example of the compilation process, below is a CHRrp program and the corresponding optimised and unoptimised Prolog code.

Related Publications

  1. Theory and practice of Constraint Handling Rules with rule priorities (submitted to TPLP) with Peter J. Stuckey and Gregory J. Duck
  2. Optimizing compilation of CHR with rule priorities (FLOPS'08) with Peter J. Stuckey and Gregory J. Duck
  3. User-definable rule priorities for CHR (PPDP'07) with Tom Schrijvers and Bart Demoen
See also Execution control for Constraint Handling Rules (PhD thesis).