A.27.1 Extending the library
The library provides hooks for extending the rules it uses for finding predicates called by some programming construct.
- prolog:called_by(+Goal, -Called)
- Goal is a non-var subgoal appearing in the called object
(typically a clause body). If it succeeds it must return a list of goals
called by Goal. As a special construct, if a term Callable+N
is returned, N variable arguments are added to Callable
before further processing. For simple meta-calls a single fact suffices.
Complex rules as used in the
library(html_write)
library provided by the HTTP package examine the arguments and create a list of called objects.The current system cannot deal with the same name/arity in different modules that behave differently with respect to called arguments.