Previous: , Up: CHR Debugging   [Contents][Index]


10.7.4.3 Debugging Predicates

The chr module exports several predicates that allow inspecting and printing the content of the constraint store.

chr_trace/0

Activate the CHR tracer. By default the CHR tracer is activated and deactivated automatically by the Prolog predicates trace/0 and notrace/0.

chr_notrace/0

De-activate the CHR tracer. By default the CHR tracer is activated and deactivated automatically by the Prolog predicates trace/0 and notrace/0.

chr_leash(+Spec)

Define the set of CHR ports on which the CHR tracer asks for user intervention (i.e. stops). Spec is either a list of ports as defined in CHR Ports or a predefined alias. Defined aliases are: full to stop at all ports, none or off to never stop, and default to stop at the call, exit, fail, wake and apply ports. See also leash/1.

chr_flag(+FlagName, ?OldValue, ?NewValue)

OldValue is the value of the CHR flag FlagName, and the new value of FlagName is set to NewValue. The valid CHR flag are the following:

toplevel_show_store

If on (the default), then the Prolog top level displays the constraint store at the end of each query. If off, then the top level does not display this.

generate_debug_info

Provides the default if the debug option is not given. The valid values are true and false (the default).

optimize

Provides the default if the optimize option is not given. The valid values are full and off (the default).

chr_show_store(+Mod)

Prints all suspended constraints of module Mod to the current output stream.

find_chr_constraint(-Constraint)   since release 4.3.2

Unifies Constraint with a constraint in the store.



Send feedback on this subject.