*** Welcome to piglix ***

Constraint Handling Rules

Constraint Handling Rules
Paradigm Constraint logic programming
Designed by Thom Frühwirth
First appeared 1991
Influenced by
Prolog

Constraint Handling Rules (CHR) is a declarative, rule-based language, introduced in 1991 by Thom Frühwirth at the time in the University of Ulm. Originally intended for constraint programming, CHR finds applications in abductive reasoning, multi-agent systems, natural language processing, compilation, scheduling, spatial-temporal reasoning, testing and verification, and type systems.

A CHR program, sometimes called a constraint handler, is a set of rules that maintain a constraint store, a multi-set of logical formulas. Execution of rules may add or remove formulas from the store, thus changing the state of the program. The order in which rules "fire" on a given constraint store is non-deterministic.

Although CHR is Turing complete, it is not commonly used as a programming language in its own right. Rather, it is used to extend a host language with constraints. Prolog is by far the most popular host language and CHR is included in several Prolog implementations, including SICStus and SWI-Prolog, although CHR implementations also exist for Haskell, Java, C, and JavaScript. In contrast to Prolog, CHR rules are multi-headed and are executed in a committed-choice manner using a forward chaining algorithm.


...
Wikipedia

...