Directory Structure

The Quintus Prolog Library directory (part of the installation directory described in int-man) contain files written in Prolog and C, which supplement the Quintus Prolog kernel. The structure of the Library Directory differs slightly between UNIX and Windows, as shown in the following figures.

images/lib-dir.png

The Quintus Prolog Library Directory under UNIX, qplib3.5

images/lib-wdir.png

The Quintus Prolog Library Directory under Windows, src

library
contains a large number of predicates that can be regarded as extensions to the set of predicates that are built into the Prolog system. Both source and QOF versions are provided.
tools
source files for Quintus-supplied development tools, independent programs that perform various functions such as determinancy checking and cross-referencing. They can be used to analyze your programs statically (that is, without running them) and possibly locate bugs.
structs
contains the Structs Package, which allows access to C data structures from Prolog. The directory includes demos.
objects
contains the Objects Package, which enables programmers to write object-oriented programs in Quintus Prolog. It can be regarded as a high-level alternative to the Structs Package.
prologbeans
contains the PrologBeans Package, which provides an interface from Java to Prolog.
vbqp
An interface from Visual Basic to Prolog. Only available under Windows.
IPC
two inter-process communication packages: Remote Predicate Call (RPC, not available under Windows) and Transmission Control Protocol (TCP).
include
Contains <quintus/quintus.h>, a header file containing #defines, typedefs, struct definitions, etc., which are needed to compile C code that needs to call API functions or use Quintus data structures. Under Windows, the include directory is placed directly under quintus-directory.
embed
contains modules for user customization of the message handler (see ref-msg) and source code for the Embedding Layer.

The predicate library_directory/1 has predefined clauses for the library and tools directories. These depend on the file_search_path/2 definition of qplib. You can see these clauses by typing listing. or listing(library_directory). after starting up Prolog. This definition of library_directory/1 means that you can refer, from within Prolog, to any file in any of these areas using the form library(File). For example either (A) or (B) would load the file lists.qof from the library directory.

     | ?- [library(lists)]. (A)
     
     | ?- load_files(library(lists)). (B)
     

Library packages are typically loaded by doing (C) if the package is not a module-file or if it is a module and you want all the exported predicates.

     | ?- ensure_loaded(library(addportray)). (C)
     

See the descriptions of ensure_loaded/1 and use_module/[1,2,3].

In addition to the loadable QOF files, source files (.pl or .c) are provided for each package.