A The SWI-Prolog library

This chapter documents the SWI-Prolog library. As SWI-Prolog provides auto-loading, there is little difference between library predicates and built-in predicates. Part of the library is therefore documented in the rest of the manual. Library predicates differ from built-in predicates in the following ways:

The documentation of the library has just started. Material from the standard packages should be moved here, some material from other parts of the manual should be moved too and various libraries are not documented at all.


Section Index


A.1 library(aggregate): Aggregation operators on backtrackable predicates
A.2 library(apply): Apply predicates on a list
A.3 library(assoc): Association lists
A.4 library(broadcast): Broadcast and receive event notifications
A.5 library(charsio): I/O on Lists of Character Codes
A.6 library(check): Consistency checking
A.7 library(clpb): Constraint Logic Programming over Boolean Variables
A.7.1 Introduction
A.7.2 Boolean expressions
A.7.3 Interface predicates
A.7.4 Examples
A.8 library(clpfd): Constraint Logic Programming over Finite Domains
A.8.1 Introduction
A.8.2 Arithmetic constraints
A.8.3 Declarative integer arithmetic
A.8.4 Reification
A.8.5 Domains
A.8.6 Examples
A.8.7 Enumeration predicates and search
A.8.8 Advanced topics
A.9 library(clpqr): Constraint Logic Programming over Rationals and Reals
A.9.1 Solver predicates
A.9.2 Syntax of the predicate arguments
A.9.3 Use of unification
A.9.4 Non-linear constraints
A.9.5 Status and known problems
A.10 library(csv): Process CSV (Comma-Separated Values) data
A.11 library(debug): Print debug messages and test assertions
A.12 library(gensym): Generate unique identifiers
A.13 library(iostream): Utilities to deal with streams
A.14 library(lists): List Manipulation
A.15 library(nb_set): Non-backtrackable set
A.16 library(www_browser): Activating your Web-browser
A.17 library(option): Option list processing
A.18 library(optparse): command line parsing
A.18.1 Notes and tips
A.19 library(ordsets): Ordered set manipulation
A.20 library(pairs): Operations on key-value lists
A.21 library(persistency): Provide persistent dynamic predicates
A.22 library(pio): Pure I/O
A.22.1 library(pure_input): Pure Input from files
A.23 library(predicate_options): Declare option-processing of predicates
A.23.1 The strength and weakness of predicate options
A.23.2 Options as arguments or environment?
A.23.3 Improving on the current situation
A.23.3.1 Options as types
A.23.3.2 Reflective access to options
A.24 library(prolog_pack): A package manager for Prolog
A.25 library(prolog_xref): Cross-reference data collection library
A.25.1 Extending the library
A.26 library(quasi_quotations): Define Quasi Quotation syntax
A.27 library(random): Random numbers
A.28 library(readutil): Reading lines, streams and files
A.29 library(record): Access named fields in a term
A.30 library(registry): Manipulating the Windows registry
A.31 library(simplex): Solve linear programming problems
A.31.1 Example 1
A.31.2 Example 2
A.31.3 Example 3
A.32 library(solution_sequences): Modify solution sequences
A.33 library(thread_pool): Resource bounded thread management
A.34 library(ugraphs): Unweighted Graphs
A.35 library(url): Analysing and constructing URL
A.36 library(varnumbers): Utilities for numbered terms