predicate_property/2predicate_property(*Callable, *PredProperty)
Unifies PredProperty with a predicate property of an existing predicate, and Callable with the most general term that corresponds to that predicate.
compiled
multifile property
interpreted
dynamic or multifile property or
both
built_in
multifile
dynamic
exported
imported_from(Module)
foreign
meta_predicate(Term)
mysort(:, +, -)
See ref-mod-met for further information.
volatile
locked
-h option to qpc
has_advice
checking_advice
predicate_property/2 successively unifies PredProperty with
the various properties associated with Callable.
predicate_property/2 successively unifies Callable with the
skeletal specifications of all loaded predicates having
PredProperty.
predicate_property/2 can be
used to backtrack through all currently defined predicates and their
corresponding properties.
| ?- [user].
| :- dynamic p/1.
| p(a).
| end_of_file.
% user compiled 0.117 sec 296 bytes
yes
| ?- predicate_property(p(_), Property).
Property = (dynamic) ;
Property = interpreted ;
no
P imported into module m
from any module:
| ?- predicate_property(m:P, imported_from(_)).
P imported into module m1
from module m2:
| ?- predicate_property(m1:P, imported_from(m2)).
P exported by module m:
| ?- predicate_property(m:P, exported).
| ?- predicate_property(M:f, imported_from(m1)).
will return all modules M that import f/0 from m1.
Please note: All dynamic predicates are currently interpreted.
fileerrors/0, nofileerrors/0,
gc/0, compile/1, module/[1,2], foreign/[2,3],
meta_predicate/1, volatile/1, add_advice/3,
check_advice/[0,1], current_predicate/2
ref-mod-ilm-vis