All predicatesShow -- Compute dependencies between CPACKs

This module runs the Prolog cross-referencer on a submitted pack to analyse the package dependencies.

Source xref_cpack(+Pack) is det
Create cross-reference info for a complete pack.
Source xref_cpack_file(+File) is det
Do cross-reference analysis on the CPACK file File. This adds various properties to help dependency tracking to File:
  • cpack:module
  • cpack:exportsPredicate
Source file_property(+File, ?P, ?O) is nondet[private]
True when rdf(File,P,O) describes a property of File. Used to generate all properties from the cross-referencer output.
To be done
- We can compute other dependencies (referenced RDF namespaces, used HTML resources, etc.)
- We can also compute possible dangerous code. See safecode as developed as part of SWAPP.
Source system_file(+Path, -FileURI, -Graph) is semidet[private]
Source cliopatria_file(+Path, -FileURI, -Graph) is semidet[private]
Classify file according to their origin.
Source search_file(+Spec, -File:uri) is nondet[private]
True when File is a candidate for resolving the given symbolic path Spec. The trick is that the path cpacks refers to all packs in our database, so we need to rewrite our specification as cpacks(Path). I.e.,
library(X) --> cpacks(lib/X)

The last clause finds embedded Prolog packs, assuming these have a meta-file and a directory prolog that is attached to the library path.

Source file_ref(+Spec, -URI) is det[private]
True when URI is the URI for a FileRef instance that represents the symbolic file-reference Spec. If there is already an existing URI for the file-reference, this is returned. Otherwise it creates an instance of cpack:FileRef.
Source resolve_file(+File) is det[private]
Create links to the FileRef objects to which this file may resolve.
Source resolve_file_ref(+FileRef) is det[private]
File files to which FileRef can resolve and add relate the file to this FileRef.
Source prolog:xref_source_file(+Spec, -File, +Options) is semidet[multifile]
True when File is the URI of a file referenced by Spec. This predicate hooks into xref_source_file/3, making it possible for the cross-referencer to analyse files in GIT repositories.