How do I hide a module or a whole package from tracing. I have this query, and I want to step through it, but I am not interested in what CLP(X) does, only at what point something fails in my query.
?- X in 0..5, X in 7..8.
fail.
?- dif(A, 1), A = 1.
fail.
If I run this query in SWI-Prolog it shows me every nifty detail of the module CLP(X), not only some inlining related to the constraints but also everything else from CLP(X):
Welcome to SWI-Prolog (threaded, 64 bits, version 8.1.2)
?- trace.
true.
[trace] ?- X in 0..5, X in 7..8.
Call: (9) clpfd:clpfd_in(_2662, 0..5) ? creep
Call: (10) clpfd:fd_variable(_2662) ? creep
Call: (11) var(_2662) ? creep
Exit: (11) var(_2662) ? creep
Call: (11) true ? creep
Exit: (11) true ? creep
[trace] ?- dif(A, 1), A=1.
Call: (9) dif:dif(_3044, 1) ? creep
Exit: (9) dif:dif(_3410{dif = ...}, 1) ? creep
Call: (9) _3410{dif = ...}=1 ? creep
Is there a way to suppress the internals of CLP(X). For example if I use another Prolog system, I don't see any internals of the CLP(X) (Preview):
Jekejeke Prolog 3, Development Environment 1.3.6
?- trace.
Yes
?- X in 0..5, X in 7..8.
0 Call X in 0..5 ?
0 Exit X in 0..5 ?
0 Call X in 7..8 ?
0 Fail X in 7..8 ?
No
?- neq(A, 1), A = 1.
0 Call neq(A, 1) ?
0 Exit neq(A, 1) ?
0 Call A = 1 ?
0 Fail A = 1 ?
No
Is there an elegant way to disable a module/package, but nevertheless see top-level calls/exits from the module/packge?
trace.and hide just clpfd. It's not like all the work is happening in clpfd. It looks like the recommended thing is to not usetrace.and instead usetrace(mypred/2, +all).- Daniel Lyonsmodule/3with a third parameter[hidden(true)]for such purpose - false