In this section, we discuss backward compatibility with the CHR library of Eclipse Prolog.
guard_bindingsoptions are still around, but there are CHR syntax extensions (see CHR Syntax) and pragmas (see CHR Pragmas) offering better grained control.
label_withdeclaration. Since it was not widely used and can be easily simulated, built-in labeling was dropped. The same effect can be achieved by replacing the declaration
label_with Constraint if Guardby the simplification rule
chr_labeling, Constraint <=> Guard | Constraint', chr_labelingand by renaming the head in each clause
Constraint :- Bodyinto
Constraint' :- Bodywhere
Constraint'is a new predicate. Efficiency can be improved by declaring
Constraintto be passive:
chr_labeling, Constraint#Id <=> Guard | Constraint', chr_labeling pragma passive(Id). This translation will not work if
option(already_in_heads,on). In that case use e.g.
chr_labeling(_), Constraint <=> Guard | Constraint', chr_labeling(_)to make the new call to
chr_labelingdiffer from the head occurrence.