CW 411

Jon Sneyers, Tom Schrijvers, and Bart Demoen
Guard reasoning for CHR optimization

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 potential misbehavior under the theoretical operational semantics. We introduce two source to source transformations: guard simplification and occurrence subsumption. By removing redundant guards and eliminating redundant generated code for subsumed occurrences, they improve performance and allow CHR programmers to write self-documented rules with a clear logical reading. Formal correctness proofs are given, implementation in the K.U.Leuven CHR compiler is presented and experimental results are discussed.

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