current_advice/3 developmentcurrent_advice(*Goal, *Port, *Action)
Provides a means for checking what advice is present.
[call,exit,done,redo,fail]
Unifies Goal with the goal term, Port with the port, and Action with the action term of currently existing user-defined advice. None of the three arguments need to be instantiated.
This predicate is not supported in runtime systems.
To backtrack through all the advice that exists for
a predicate mypred/2, you can use the goal
| ?- current_advice(mypred(_,_), Port, Action).
If you are only interested in the advice for mypred/2 on the call
port, use
| ?- current_advice(mypred(_,_), call, Action).
To determine what predicates you told to call format/2, use
| ?- current_advice(Goal, Port, format(_,_)).
add_advice/3, remove_advice/3,
check_advice/[0,1], nocheck_advice/[0,1]