Subject: [SWIPL] The use of 'spy' in SWI-Prolog

From: David Yang <[email-masked]>
Date: Mon, 29 Jan 2001 11:23:06 -0800 (PST)

Hi,

I have prolems in tracing predicates in SWI-Prolog. I
spy on one predicate but all other predicates get
spied on too. Here is an example:

father(X, Y):- parent(X, Y), male(X).
parent(a,b).
male(a).

?-spy(father).

?- father(a,b).
(1) call: father(a, b)?
(2) call: parent(a,b)?
(2) exit: parent(a,b)?
(2) call: male(a)?
(2) exit: male(a)?
(1) exit: father(a,b)?

yes

But I didn't want to trace 'parent' and 'male'!!! I
can't remove the spy on these two predicates even by:
?- nospy(parent), nospy(male).

Can anybody please help with me on how to spy only
some specific predicates but not all the predicates in
a program?

Thanks!

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/