
prolog_xref.pl -- Prolog cross-referencer data collectionThis module implements to data-collection part of the cross-referencer. This code is used in two places:
prolog:called_by(+Goal, +Module, +Context, -Called) is semidet[multifile]
prolog:called_by(+Goal, -ListOfCalled)[multifile]
prolog:meta_goal(+Goal, -Pattern)[multifile]
prolog:hook(Goal)[multifile]
hide_called(:Callable, +Src) is semidet[private]register_called.
xref_source(+Source) is det
xref_source(+Source, +Options) is dettrue (default false), emit warning messages.all, non_iso or non_built_in.store, comments are stored into
the database as if the file was compiled. If collect,
comments are entered to the xref database and made available
through xref_mode/2 and xref_comment/4. If ignore,
comments are simply ignored. Default is to collect comments.true).
xref_cleanup(+State) is det[private]
set_initial_mode(+Stream, +Options) is det[private]
xref_input_stream(-Stream) is det[private]
xref_push_op(Source, +Prec, +Type, :Name)[private]
xref_set_prolog_flag(+Flag, +Value, +Src, +Line)[private]
xref_clean(+Source) is det
xref_current_source(?Source)
xref_done(+Source, -Time) is det
xref_called(?Source, ?Called, ?By) is nondet
xref_called(?Source, ?Called, ?By, ?Cond) is nondet
xref_defined(?Source, +Goal, ?How) is nondetinclude(File)) directive.
dynamic(Location)thread_local(Location)multifile(Location)public(Location)local(Location)foreign(Location)constraint(Location)imported(From)
xref_definition_line(+How, -Line)
xref_exported(?Source, ?Head) is nondet
xref_module(?Source, ?Module) is nondet
xref_uses_file(?Source, ?Spec, ?Path) is nondet
xref_op(?Source, Op) is nondet
xref_prolog_flag(?Source, ?Flag, ?Value, ?Line) is nondet
collect(+Source, +File, +Stream, +Options)[private]
update_condition(+Term) is det[private]
current_condition(-Condition) is det[private]
process(+Expanded, +Comments, +TermPos, +Src, -EOF) is det[private]
process(+Term, +Src) is det[private]
xref_comments(+Comments, +FilePos, +Src) is det[private]
xref_comment(?Source, ?Title, ?Comment) is nondet
xref_comment(?Source, ?Head, ?Summary, ?Comment) is nondet
xref_mode(?Source, ?Mode, ?Det) is nondet
xref_option(?Source, ?Option) is nondet
process_meta_predicate(+Decl, +Src)[private]
xref_meta(+Source, +Head, -Called) is semidet
xref_meta(+Head, -Called) is semidet
xref_meta_src(+Head, -Called, +Src) is semidet
head_of(+Rule, -Head)[private]
xref_hook(?Callable)
arith_callable(+Spec, -Callable)[private]
process_body(+Body, +Origin, +Src) is det[private]We limit the number of explored paths to 100 to avoid getting trapped in this analysis.
process_goal(+Goal, +Origin, +Src, ?Partial) is multi[private]true if there was a
partial evalation inside Goal that has bound variables.
process_dcg_goal(+Grammar, +Origin, +Src, ?Partial) is det[private]
variants(+SortedList, +Max, -Variants) is det[private]
partial_evaluate(+Goal, ?Parrial) is det[private]
T = hello(X),
findall(T, T, List),
process_use_module(+Modules, +Src, +Rexport) is det[private]
process_use_module2(+File, +Import, +Src, +Reexport) is det[private]
xref_public_list(+Spec, +Source, +Options) is semidetThe information collected by this predicate is cached. The cached data is considered valid as long as the modification time of the file does not change.
xref_public_list(+File, -Path, -Export, +Src) is semidet
xref_public_list(+File, -Path, -Module, -Export, -Meta, +Src) is semidet
xref_public_list(+File, -Path, -Module, -Export, -Public, -Meta, +Src) is semidetThese predicates fail if File is not a module-file.
public_list(+Path, -Module, -Meta, -Export, -Public, +Options)[private]true, ignore (syntax) errors. If not specified the default
is inherited from xref_source/2.
reexport_files(+Files, +Src, -Meta, ?MetaTail, -Exports, ?ExportsTail, -Public, ?PublicTail)[private]
except(+Remove, +AllExports, -Exports)[private]
open_include_file(+Path, -In, -Refs)[private]include(File) referenced file. Note that we cannot
use prolog_open_source/2 because we should not safe/restore
the lexical context.
process_foreign(+Spec, +Src)[private]
assert_called(+Src, +From, +Head) is det[private]
expand_hide_called(:Callable) is semidet[private]
assert_import(+Src, +Import, +ExportList, +From, +Reexport) is det[private]true, re-export the
imported predicates.
process_import(:Import, +Src)[private]
assert_xmodule_callable(PIs, Module, Src, From)[private]
assert_op(+Src, +Op) is det[private]
assert_module(+Src, +Module)[private]
assert_module3(+Import, +Src)[private]
process_predicates(:Closure, +Predicates, +Src)[private]call(Closure, PI,
Src). Handles both lists of specifications and (PI,...)
specifications.
pi_to_head(+PI, -Head) is semidet[private]
generalise(+Callable, -General)[private]
xref_source_file(+Spec, -File, +Src) is semidet
xref_source_file(+Spec, -File, +Src, +Options) is semidet
canonical_source(?Source, ?Src) is det[private]
goal_name_arity(+Goal, -Name, -Arity)[private]name()
goals.
xref_source(+Source) is det
xref_source(+Source, +Options) is dettrue (default false), emit warning messages.all, non_iso or non_built_in.store, comments are stored into
the database as if the file was compiled. If collect,
comments are entered to the xref database and made available
through xref_mode/2 and xref_comment/4. If ignore,
comments are simply ignored. Default is to collect comments.true).
xref_called(?Source, ?Called, ?By) is nondet
xref_called(?Source, ?Called, ?By, ?Cond) is nondet
xref_meta(+Head, -Called) is semidet[private]
xref_meta_src(+Head, -Called, +Src) is semidet[private]
xref_public_list(+File, -Path, -Export, +Src) is semidet
xref_public_list(+File, -Path, -Module, -Export, -Meta, +Src) is semidet
xref_public_list(+File, -Path, -Module, -Export, -Public, -Meta, +Src) is semidetThese predicates fail if File is not a module-file.
xref_public_list(+File, -Path, -Export, +Src) is semidet
xref_public_list(+File, -Path, -Module, -Export, -Meta, +Src) is semidet
xref_public_list(+File, -Path, -Module, -Export, -Public, -Meta, +Src) is semidetThese predicates fail if File is not a module-file.
xref_source_file(+Spec, -File, +Src) is semidet
xref_source_file(+Spec, -File, +Src, +Options) is semidetThe following predicates are exported, but not or incorrectly documented.
xref_used_class(Arg1, Arg2)
xref_defined_class(Arg1, Arg2, Arg3)
xref_built_in(Arg1)