C.2 Notes on specific dialects
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Compatibility with other Prolog dialects
        • Notes on specific dialects
          • Notes on specific dialects
          • The XSB import directive
    • Packages

C.2.2 The XSB import directive

The XSB import directive takes the form as below.

:- import p/1, q/2, ... from <lib>.

This import directive is resolved as follows:

  • If the referenced library is found as a local file, it is loaded and the requested predicates are imported.
  • Otherwise, the referenced library is searched for in the dialect/xsb directory of the SWI-Prolog library. If found, the predicates are imported from this library.
  • The referenced predicates are searched for in SWI-Prolog built-in predicates and the SWI-Prolog library. If found, they are made available if necessary.