User-Defined Constraints

## 7.3 User-Defined Constraints

- Generalised Propagation: propia
- Constraint Handling Rules: ech

### 7.3.1 Generalised Propagation: propia

The predicate infers takes as one argument any user-defined predicate, and as a second argument a form of propagation to be applied to that predicate.
This functionality enables the user to turn any predicate into a constraint [14]. The forms of propagation include finite domains and intervals. For more details see chapter 15.

### 7.3.2 Constraint Handling Rules: ech

The user can also specify predicates using rules with guards [9]. They delay until the guard is entailed or disentailed, and then execute or terminate accordingly.
This functionality enables the user to implement constraints in a way that is clearer than directly using the underlying suspend library. For more details see chapter 15.