The printing of variable names is customized by defining the following hook predicate.
fdbg:fdvar_portray(Name, Var, FDSet) hookfd_set/2. (Although
these two sets may be the same if the constraint didn't narrow it.)
If fdbg:fdvar_portray/3 is undefined or fails the default
representation is printed, which is Name between angle brackets.
The printing of legend lines is customized by defining the following hook predicate.
fdbg:legend_portray(Name, Var, FDSet) hookfdbg:fdvar_portray/3. Note that a prefix of four spaces and a
closing newline character is always printed by FDBG.
If fdbg:fdvar_portray/3 is undefined or fails the default
representation is printed, which is
Name = RangeNow [ -> RangeAfter ]
The arrow and RangeAfter are only printed if the constraint narrowed the domain of Var.
The following example will print a list of all possible values instead of the range for each variable in the legend:
:- multifile fdbg:legend_portray/3.
fdbg:legend_portray(Name, Var, Set) :-
fd_set(Var, Set0),
fdset_to_list(Set0, L0),
fdset_to_list(Set, L),
( L0 == L
-> format('~p = ~p', [Name, L])
; format('~p = ~p -> ~p', [Name, L0, L])
).