prolog_deps.pl -- Compute file dependencies
This module computes file dependencies for modules as a set of
directives.
- file_autoload_directives(+File, -Directives, +Options) is det
- Compute the dependencies as autoload/2 directives. Options
- missing(+Bool)
- If
true
(default false
), only generate directives
for called predicates that are not already imported.
- directive(+Directive)
- Directive to use for adding dependencies. Defined
options are:
- use_autoload/2
- (Default). This uses use_module/2 for files that
cannot be imported using use_autoload/2.
- use_autoload/1
- This uses use_module/1 for files that cannot be
imported using use_autoload/1.
- use_module/2
- use_module/1
- update(Old)
- Updated an existing set of directives. The returned
set of Directive starts with copies of Old. If a
member of Old is autoload/2 or use_module/2, new
dependencies are added at the end of this list.
New dependent files are added after the modified
copies of Old. Declared dependencies are never
removed, even if no proof of usage is found.
If no directive(+Directive)
option is provided a
default is determined from the given directives.
- undefined(+File, -Callable, +Options)[private]
- Callable is called in File, but no definition can be found. If
File is not a module file we consider other files that are not
module files.
- included_if_defined(+Condition, +Callable) is semidet[private]
- available(+File, +Callable, -HowDefined, +Options)[private]
- True if Callable is available in File.
- built_in_predicate(+Callable)[private]
- True if Callable is a built-in
- defined(?File, ?Callable)[private]
- True if Callable is defined in File and not imported.
- clean_missing(+Missing0, -Missing) is det[private]
- Hack to deal with library(main) and library(optparse) issues.
- To be done
- - Needs a more fundamental solution.
- directives(+File, +FileAndHeads, -Directives, +Options) is det[private]
- Assemble the final set of directives. Uses the option
update(Old)
.
- head_pi(+Exports, +Head, -PI) is det[private]
- subtract_pis(+Set, +Delete, -Result) is det[private]
- update_style(+OldDirectives, +Options0, -Options)[private]
- Determine the directive to use for new dependencies. This
establishes a default based on existing dependencies.
- directive(+Options, +FileAndHeads, -Directive)[private]
- Create a directive to import Heads from File.
- file_auto_import(+File, +Options)
- Update the autoload/2 directives for File. This predicate modifies
the file in place. Defined options are:
- backup(+Extension)
- Create a backup of File using Extension.
- rewrite_term(+In, -Keep, -OutList, +Options) is semidet[private]