PublicShow sourcedependency.pl -- Query the CPACK dependency graph

This module queries the RDF graph produced by xref.pl to compute high-level dependencies between objects. Currently, we keep track of:

To be done
- Extend reasoning
Source file_used_by_file_in_package(+File, -UsedBy, -Package) is nondet
True when UsedBy is a file in Package that imports File.
Source cpack_requires(+Package, -Required, -Reasons) is nondet
True when Package requires Required. Reasons is an ordered set of reasons. Individual reasons are one of:
token(Name)
Package requires token that is provided by Required.
file_ref(FileRef)
Package uses the file FileRef, which is provided by Required
Source cpack_conflicts(+Package, -Conflict, -Why) is nondet
True when Package and Conflict are in conflict. Defined conflicts are:
same_module(Module, File1, File2)
Both files define the same module. They cannot be loaded into the same Prolog instance. Note that this can cause a package to conflict with itself!
same_file(Path, File1, File2)
Two packages define files at the same path. This is actually not an issue in itself. It only becomes an issue if there are file_ref objects that resolve them ambiguously.
Source cpack_list(+Pack, -PackList) is det
Source cpack_list(+Pack, -PackList, -UGraph) is det
PackList is a list of all packages that need to be installed to get Pack working. This list is ensured to contain Pack.
Arguments:
Pack- is either the URI of a single Pack or a list of these.
UGraph- is a ugraph of Pack-ListOfRequired. See library(ugraph) for details.
To be done
- Toplogical sorting may not be possible. As ordering is not always necessary, we should try to relax dependencies if a topological sort is not possible due to cycles. There are two heuristics here. First of all, explicit (token) dependencies may be removed and second, libraries must be loaded before applications.
Source cpack_not_satisfied(+Package, -WhyNot) is semidet
True when WhyNot describes why Package is not satisfied.
Source file_not_satisfied(+File, -Reasons) is semidet
True when File's conditions are not satisfied due to Reasons.
Source file_imports_from(+File, -Predicates, -From) is nondet
True if File imports Predicates from the file From.
Arguments:
Predicates- is a list of canonical predicate indicators.
Source file_calls_public_from(+File, -UsedFile, +PI) is semidet
True if PI is a module-qualified term that can be called in UsedFile, that is imported from File.