CW 396

Jon Sneyers, Tom Schrijvers, and Bart Demoen
Guard simplification in CHR programs

Abstract

Constraint Handling Rules (CHR) is a high-level language commonly used to write constraint solvers. Most CHR programs depend on the refined operational semantics, resulting in an obfuscated logical reading and non-termination or worse under the theoretical operational semantics. We introduce a source to source transformation called guard simplification which allows CHR programmers to write self-documented rules with a clear logical reading. It improves performance by removing guards entailed by the implicit ``no earlier (sub)rule fired'' precondition and optional type and mode declarations. A correctness proof of the transformation is given, its implementation in the K.U.Leuven CHR compiler is presented and experimental results are discussed.

report.pdf (241K) / mailto: J. Sneyers