dependency.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:
- Requirement reasons
- Files needed by one and provided by another package
- Tokens needed by one and provided by another package
- Conflict reasons
- Packages holding files that provide the same module
- Packages holding files with the same path
- Satisfied status
- file_used_by_file_in_package(+File, -UsedBy, -Package) is nondet
- True when UsedBy is a file in Package that imports File.
- 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
- 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.
- cpack_list(+Pack, -PackList) is det
- 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.
- dependency_ugraph(+Pack, -Ugraph) is det[private]
- Create a full dependency graph for pack as a ugraph.
- sort_dependencies(+Graph, -List)[private]
- List is a package list that satisfies the dependencies in Graph.
- connect_graph(+Graph, -Start, -Connected) is det[private]
- Turn Graph into a connected graph by putting a shared starting point before all vertices.
- before(+Term, -Before) is det[private]
- Unify Before to a term that comes before Term in the standard order of terms.
- cpack_not_satisfied(+Package, -WhyNot) is semidet
- True when WhyNot describes why Package is not satisfied.
- file_not_satisfied(+File, -Reasons) is semidet
- True when File's conditions are not satisfied due to Reasons.
- file_not_satisfied_due(+File, -Problem)[private]
- True when Conflict describes an import problem for File. There
are two types of import problems:
- double_import(PI, File1, File2)
- File imports File1 and File2 using use_module/1, both of which export PI.
- locally_defined(PI, File)
- A locally defined predicate is also imported from File.
- file_not_found(FileRef)
- The given symbolic path cannot be found.
- file_imports_from(+File, -Predicates, -From) is nondet
- True if File imports Predicates from the file From.
- 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.