I’m using: SWI-Prolog version 8.0.2.
Is there a function you can use from the clause body of a predicate to find out the name of the predicate the clause body belongs to?
For example:
somepred :-
get_current_predicate(CurrentPredName).
So CurrentPredName would be somepred in this example.
If there is such a function, what is its name and does it work within sandboxed code running in a PEngines instance?