Subject: Predicate Determining the port in which was called.

From: "Douglas Miles (Volt Computer)" <[email-masked]>
Date: Wed, 9 Aug 2000 11:13:13 -0700

I want to write but do not know how is to determine the port in which a
predicate was called over:

example:

test:- member(X,[1,2,3]),mypredicate,X=4.
mypredicate:- port(call),write('% creating side effects'),nl.
mypredicate:- port(redo),write('% undoing side effects. trying new side
effects'),nl.
mypredicate:- port(exit),write('% comitting side effects'),nl.
mypredicate:- port(fail),write('% undoing side effects'),nl.

Code above, i know is not logicaly even close to what it would look like :)

I want 'mypredicate' to react differently depending on what port you would
have seen in tracing.
(i do not know if this is possible)

I would want to create output like this

test.
% creating side effects
% undoing side effects
% creating side effects
% undoing side effects
% creating side effects
% comitting side effects

Thank you in advance,

	Douglas