The leashing mode is set to Mode. It determines the CHR
ports at which you are to be prompted when you creep through
your program. At unleashed ports a tracing message is
still output, but program execution does not stop to allow user
interaction. Note that the ports of spypoints are always
leashed (and cannot be unleashed). Mode is a
list containing none, one or more of the following port
names:
call
- Prompt when a constraint is executed for the first time.
exit
- Prompt when the constraint is successfully processed, i.e. the applicable
rules have applied.
redo
- Prompt at subsequent exits generated by nondeterminate rule
bodies.
fail
- Prompt when a constraint fails.
wake
- Prompt when a constraint from the constraint store is woken and
reconsidered because one of its variables has been touched.
try
- Prompt just before the guard evaluation of a rule, after constraints
matching the heads have been found.
apply
- Prompt upon the application of a rule, after the successful guard
evaluation, when the rule commits and fires, just before evaluating the
body.
insert
- Prompt when a constraint gets inserted into the constraint store,
i.e. after all rules have been tried.
remove
- Prompt when a constraint gets removed from the constraint store, e.g.
when a simplification rule applies.
The initial value of the CHR leashing mode is
[call,exit,fail,wake,apply]
. Predefined shortcuts are:
chr_leash(none), chr_leash(off)
- To turn leashing off.
chr_leash(all)
- To prompt at every port.
chr_leash(default)
- Same as
chr_leash([call,exit,fail,wake,apply])
.
chr_leash(call)
- No need to use a list if only a singular port is to be
leashed.