AbsFile is the absolute name of a loaded file, and ClauseNumber is the number of a clause for Pred in that file.
Loaded files include compiled, QOF loaded and pre-linked files.
If AbsFile is not the name of a loaded file, then
) simply fails. If AbsFile is
bound to an illegal filename,
If Pred is not a loaded predicate, then
simply fails. If bound to an illegal predicate specification, it
fails. Pred is assumed to refer to the source module. Thus,
to find any predicates defined in a given file, use the form:
source_file/3 is true if clause number ClauseNumber of
predicate Pred comes from file AbsFile.
source_file/3 is useful for handling multifile predicates, but it
works for predicates defined completely in one file, as well.
Any combination of bound and unbound arguments is possible, and
source_file/3 will generate the others.
If AbsFile is unbound, it is
successively unified with the absolute names of all currently loaded
files. Files loaded through the foreign function interface are not
If Pred is instantiated to the skeletal specification of a loaded predicate, then AbsFile will be successively unified with the absolute names of the files in which the Pred was defined.
If AbsFile is instantiated to the absolute name of a loaded file, then Pred will be successively unified with the skeletal specifications of all predicates defined in AbsFile.