a-1: About this Manual

a-1-1: Organization of the Core Manual Set

a-1-2: Reference Pages

a-1-3: Notational Conventions

a-1-3-1: Goal Templates and Mode Annotations

a-1-3-2: Predicate Names

a-1-3-3: Examples

a-1-4: Bibliographical Notes

a-2: Highlights of Release 3

a-2-1: Embeddability

a-2-2: QOF Loading and Saving

a-2-3: QUI: An X-based Development Environment

a-2-4: Source-linked Debugger

a-2-5: Other New Features

a-2-6: Compatibility Issues

a-2-6-1: Saved States

a-2-6-2: Error Reporting/Handling

a-2-7: New Built-in Predicates

a-2-8: New Hook Predicates

a-2-9: Removed Built-in Predicates

a-3: The Quintus Directory

a-3-1: Structure of the Quintus Directory

a-3-2: Search Paths

b-1: Getting Started

b-1-1: Starting Prolog

b-1-2: Exiting Prolog

b-1-3: The Top-level Prolog Prompt

b-1-4: Using the On-line Help System

b-2: Loading Programs into Prolog

b-2-1: Loading a File into Prolog

b-2-2: Loading Pre-Compiled (QOF) Files

b-2-3: Commands in Files

b-2-5: Style Warnings

b-2-6: Saving and Restoring a Program State

b-2-6-0: Basic Information

b-2-7: Using an Initialization File

b-3: Running Programs

b-3-2: Errors, Warnings and Informational Messages

b-3-3: Undefined Predicates

b-3-4: Executing UNIX Commands from Prolog

b-3-5: Dynamic Predicates

b-3-6: Prompts

b-4: Limits in Quintus Prolog

b-5: Writing Efficient Programs

b-5-1: The Cut

b-5-1-0: Overview

b-5-1-1: Making Predicates Determinate

b-5-1-2: Placement of Cuts

b-5-1-3: Terminating a Backtracking Loop

b-5-2: Indexing

b-5-2-0: Overview

b-5-2-1: Data Tables

b-5-2-2: Determinacy Detection

b-5-3: Last Clause Determinacy Detection

b-5-4-1: Accumulating Parameters

b-5-4-2: Accumulating Lists

b-5-5: Building and Dismantling Terms

b-5-6: Conditionals and Disjunction

c-1: Quintus User Interface

c-1-1: Starting Up QUI

c-1-2: Exiting QUI

c-2: QUI Main Window

c-2-1: Main Window Menu Bar

c-2-1-1: File Pulldown

c-2-1-2: Debug Pulldown

c-2-1-3: Help Pulldown

c-2-2: QUI Query History Menu

c-2-3: QUI Query Interpreter Sub-Window

c-2-3-1: Prolog Output and Input

c-2-3-2: Key Bindings

c-2-4: QUI Interrupt Button

c-2-5: QUI Next Answer Buttons

c-2-6: QUI Error Dialogue Window

c-3: Edit Windows

c-3-1: Invoking an Edit Window

c-3-2: File Menu

c-3-3: Misc Menu

c-3-4: Help Menu

c-3-5: Key Bindings

c-4: Interface to External Editors

c-4-1-1: Invoking GNU Emacs to Edit Files From QUI

c-4-1-2: Key Bindings in "qui" mode

c-5: QUI Debug Window

c-6: QUI Help Window

c-6-1: Invoking Help

c-6-2: Help Window

c-6-2-1: Selecting a Sub-Section from a Menu

c-6-2-2: Following Cross-References in Text

c-6-2-3: Selecting a Topic in Text

c-6-3-1: File Pulldown

c-6-3-2: Goto Pulldown

c-6-3-3: Invoking Goto Options from Prolog Predicates

c-6-3-4: History Pulldown

c-6-3-5: Misc Pulldown -- Search

c-7: Customizing and Interfacing with QUI

c-7-1: The QUI Resource File

c-7-2: Customizing QUI Resources

c-7-2-1: Global Resources

c-7-2-2: Labels and Messages

c-7-2-3: Menu Entries

c-7-2-4: Key Bindings

c-7-2-5: Editor Resources

c-7-2-6: Debugger Resources

c-7-2-7: Help System Resources

c-7-3: Restrictions on developing programs under QUI

c-7-3-1: Hook Predicates

c-7-3-2: Embeddable C Function

c-7-3-3: Unix Signal Handling

d-1: Overview

d-1-1: Environment Variables

d-1-2: Using Prolog with the Emacs Editor

d-1-2-0: Overview

d-1-2-1: Terminal and Operating System Requirements

d-1-2-2: Entering Prolog and Emacs

d-1-2-3: Exiting Emacs

d-1-2-4: Suspending an Emacs Session

d-1-3: Accessing the On-line Manual

d-1-3-1: Finding Cross-references under Emacs

d-1-4: Loading Programs

d-1-4-0: Basic Information

d-1-4-1: Loading an Entire Buffer

d-1-4-2: Loading a Region in a Buffer

d-1-4-3: Loading a Single Procedure

d-1-5-1: Repeating Queries under Gnu Emacs

d-1-6: Displaying Previous Input

d-1-7: Locating Procedures

d-2: The GNU Emacs Interface

d-2-1: Overview

d-2-2: Key Bindings

d-2-3: Prolog Mode

d-2-4: Prolog Source Code Layout Restrictions

d-2-5: Rebinding Keys in Your Initialization File

d-2-6: Programming the Prolog/GNU Emacs Interface

d-2-6-1: Submitting Prolog Queries from GNU Emacs

d-2-6-2: Invoking Emacs-Lisp Functions from Prolog

e-1: Debugging Basics

e-1-1: The Procedure Box Control Flow Model

e-1-2: Understanding Prolog Execution Using The Debugger

e-1-3: Traveling Between Ports

e-1-3-1: Basic Traveling Commands

e-1-3-2: Spypoints

e-1-3-3: Traveling Commands Sensitive to Spypoints

e-1-3-4: Commands That Change The Flow Of Control

e-1-4: Debugger Concepts

e-1-4-1: Trace Mode, Debug Mode, And Zip Mode

e-1-4-2: Leashing

e-1-4-3: Locked Predicates

e-1-4-4: Unknown Procedures

e-1-4-5: Current Debugging State

e-1-5: Summary of Predicates

e-2: The Source Linked Debugger

e-2-1: Showing Your Place In The Source Code

e-2-1-1: The Call Port

e-2-1-2: The Exit And Done Ports

e-2-1-3: The Redo Port

e-2-1-4: The Fail Port

e-2-1-5: The Head Port

e-2-1-6: The Exception Port

e-2-2: When Source Linking Is Not Possible

e-2-3: Traveling Between Ports

e-2-4: Seeing Ancestor Frames

e-2-5: Debugger Menus

e-2-5-1: The File Menu

e-2-5-2: The Options Menu

e-2-5-3: The Spypoint Menu

e-2-5-4: The Window Menu

e-2-5-5: The Travel Menu

e-2-5-6: The Help Menu

e-2-6: The Status Panel

e-2-7: Other Windows

e-2-7-1: The Variable Bindings Window

e-2-7-2: The Standard Debugger Window

e-2-7-3: The Ancestors Window

e-2-7-4: Menus For These Windows

e-3: The Standard Debugger

e-3-1: Format of Debugging Messages

e-3-1-1: Format of Head Port Messages

e-3-1-2: Format of Exception Port Messages

e-3-2: Options Available during Debugging

e-3-2-0: Introduction

e-3-2-1: Basic Control Options

e-3-2-2: Printing Options

e-3-2-3: Advanced Control Options

e-3-2-4: Environment Options

e-3-2-5: Help Options

e-4: The Advice Facility

e-4-1: Use of Advice Predicates

e-4-2: Performance

e-4-3: Summary of Predicates

e-5: The Profiler

e-5-1: Use of the Profiler

e-5-2: Customized Output

e-5-3: Performance

e-5-4: Summary of Predicates

f-1: Glossary

g-1: Syntax

g-1-1-0: Overview

g-1-1-1: Integers

g-1-1-2: Floating-point Numbers

g-1-1-3: Atoms

g-1-1-4: Variables

g-1-1-5: Foreign Terms

g-1-2: Compound Terms

g-1-2-1: Lists

g-1-2-2: Strings As Lists

g-1-4: Operators and their Built-in Predicates

g-1-4-1: Overview

g-1-4-2: Manipulating and Inspecting Operators

g-1-4-3: Syntax Restrictions

g-1-4-4: Built-in Operators

g-1-5: Commenting

g-1-7: Formal Syntax

g-1-7-0: Overview

g-1-7-1: Notation

g-1-7-2: Syntax of Sentences as Terms

g-1-7-3: Syntax of Terms as Tokens

g-1-7-4: Syntax of Tokens as Character Strings

g-1-7-5: Notes

g-1-8: Summary of Predicates

g-2: Semantics

g-2-2: Types of Predicates Supplied with Quintus Prolog

g-2-2-1: Hook Predicates

g-2-2-2: Redefinable Predicates

g-2-3: Disjunction

g-2-4: Declarative and Procedural Semantics

g-2-5: The Cut

g-2-6: Occur Check

g-2-7: Control

g-3: Invoking Prolog

g-3-1: Prolog Command Line Argument Handling

g-3-1-1: The Initialization File

g-3-2: Exiting Prolog

g-4: Loading Programs

g-4-2: Redefining Procedures during Program Execution

g-5: Saving and Loading the Prolog Database

g-5-1: Overview of QOF Files

g-5-2: Compatibility with save/restore in previous releases

g-5-3: Foreign Code

g-5-4: Saved-States

g-5-5: Selective saving and loading of QOF files

g-5-6: Initializing Goals in Saved States

g-5-6-1: The Initialization Declaration

g-5-6-2: Volatile Predicates

g-5-6-3: Fine Tuning

g-5-7: Predicate List

g-6: Files and Directories

g-6-1: The File Search Path Mechanism

g-6-1-1: Defining File Search Paths

g-6-1-2: Frequently Used File Specifications

g-6-1-3: Filename Defaults

g-6-1-4: Predefined file_search_path Facts

g-6-1-5: The system file_search_path

g-6-1-6: The Library Paths

g-6-1-7: Editor Command for Library Search

g-6-2: List of Predicates

g-7: Input and Output

g-7-1: About Streams

g-7-1-1: Stream Categories

g-7-2: Term Input

g-7-2-1: Reading Terms: The 'Read' Predicates

g-7-2-2: Changing the Prompt

g-7-3-1: Writing Terms: the 'Write' Predicates

g-7-3-2: Common Characteristics

g-7-3-3: Distinctions Among the 'write' Predicates

g-7-3-4: Displaying Terms

g-7-3-5: Using the 'portray' hook

g-7-3-6: Portraying a Clause

g-7-4: Character Input

g-7-4-0: Overview

g-7-4-1: Reading Characters

g-7-4-2: Peeking

g-7-4-3: Skipping

g-7-4-4: Finding the End of Line and End of File

g-7-5: Character Output

g-7-5-1: Writing Characters

g-7-5-2: New Line

g-7-5-3: Tabs

g-7-5-4: Formatted Output

g-7-6: Stream and File Handling

g-7-6-1: Stream Objects

g-7-6-2: Exceptions related to Streams

g-7-6-3: Suppressing Error Messages

g-7-6-4: Opening a Stream

g-7-6-5: Finding the Current Input Stream

g-7-6-6: Finding the current output stream

g-7-6-7: Backtracking through Open Streams

g-7-6-8: Closing a Stream

g-7-6-9: Flushing Output

g-7-7: Reading the State of Opened Streams

g-7-7-1: Stream Position Information for Terminal I/O

g-7-8: Random Access to Files

g-7-9: Summary of Predicates and Functions

g-7-10: Library Support

g-8: Arithmetic

g-8-1: Evaluating Arithmetic Expressions

g-8-2: Arithmetic Comparison

g-8-3: Arithmetic Expressions

g-8-3-1: Arithmetic calculations

g-8-3-2: Peeking into Memory

g-8-3-3: Bit-vector Operations

g-8-3-4: Character Codes

g-8-4: Predicate Summary

g-8-5: Library Support

g-9: Looking at Terms

g-9-1-1: Type Checking

g-9-1-2: Unification and Subsumption

g-9-2: Analyzing and Constructing Terms

g-9-4: Converting between Constants and Text

g-9-5: Assigning Names to Variables

g-9-7: Comparing Terms

g-9-7-0: Introduction

g-9-7-1: Standard Order of Terms

g-9-7-2: Sorting Terms

g-9-8: Library Support

g-9-9: Summary of Predicates

g-10: Looking at the Program State

g-10-1: Associating Predicates with their Properties

g-10-2: Associating Predicates with Files

g-10-3: Prolog Flags

g-10-3-1: Changing or Querying System Parameters

g-10-3-2: Parameters which can be Queried Only

g-10-4: Load Context

g-10-4-1: Predicate Summary

g-11: Interrupting Execution

g-11-1: Control-c Interrupts

g-11-2: Interrupt Handling

g-11-2-1: Changing Prolog's Control Flow from C

g-11-2-2: User-specified signal handlers

g-11-2-3: Critical Regions

g-11-4: Library Support

g-12: Memory Use and Garbage Collection

g-12-1: Overview

g-12-1-1: Reclaiming Space

g-12-1-2: Displaying Statistics

g-12-2: Garbage Collection and Programming Style

g-12-3: Enabling and Disabling the Garbage Collector

g-12-4: Monitoring Garbage Collections

g-12-5: Interaction of Garbage Collection and Heap Expansion

g-12-6: Invoking the Garbage Collector Directly

g-12-7: Operating System Interaction

g-12-7-1: PROLOGINITSIZE

g-12-7-2: PROLOGMAXSIZE

g-12-7-3: PROLOGINCSIZE

g-12-7-4: PROLOGKEEPSIZE

g-12-7-5: PROLOGLOCALMIN

g-12-7-6: PROLOGGLOBALMIN

g-12-8: Atom Garbage Collection

g-12-8-1: The Atom Garbage Collector User Interface

g-12-8-2: Protecting Atoms in Foreign Memory

g-12-8-3: Permanent Atoms

g-12-8-4: Details of Atom Registration

g-12-9: Summary of Predicates

g-13: Modules

g-13-9: Module Prefixes on Clauses

g-13-9-1: Current Modules

g-13-13-1: Predicates Defined in a Module

g-13-13-2: Predicates Visible in a Module

g-13-17: Predicate Summary

g-14: Modification of the Database

g-14-1: Dynamic and Static Procedures

g-14-2: Database References

g-14-3: Adding Clauses to the Database

g-14-4: Removing Clauses from the Database

g-14-4-1: A Note on Efficient Use of retract/1

g-14-5: Accessing Clauses

g-14-6: Modification of Running Code: Examples

g-14-6-1: Example: assertz

g-14-6-2: Example: retract

g-14-6-3: Example: abolish

g-14-7: The Internal Database

g-14-8: Summary of Predicates

g-15: Sets and Bags: Collecting Solutions to a Goal

g-15-1: Collecting a Sorted List

g-15-1-1: Existential Quantifier

g-15-2: Collecting a Bag of Solutions

g-15-2-1: Collecting All Instances

g-15-3: Library Support

g-15-4: Predicate Summary

g-16: Grammar Rules

g-16-2: How to Use the Grammar Rule Facility

g-16-3: An Example

g-16-4: Translation of Grammar Rules into Prolog Clauses

g-16-5: Summary of Predicates

g-17: On-line Help

g-17-1: Help Files

g-17-1-0: Overview

g-17-1-1: Menu Files

g-17-1-2: Text Files

g-17-1-3: Displaying help files

g-17-2: Emacs Commands for Using the Help System

g-17-2-0: Introduction

g-17-2-1: Menu Commands

g-17-2-2: Text Commands

g-17-2-3: Predicate Summary

g-18: Access to the Operating System

g-18-1: Executing UNIX Commands from Prolog

g-18-1-1: Changing the Working Directory

g-18-1-2: Other UNIX Commands

g-18-1-3: Spawning an Interactive Shell

g-18-2: Accessing Command Line Arguments

g-18-2-1: Arguments as Numbers or as Strings

g-18-2-2: Accessing Prolog's Arguments from C

g-18-3: Predicate Summary

g-18-4: Library Support

g-19: Errors and Exceptions

g-19-1: Overview

g-19-2: Raising Exceptions

g-19-3: Handling Exceptions

g-19-3-1: Protecting a Particular Goal

g-19-3-2: Handling Unknown Predicates

g-19-4: Error Classes

g-19-4-1: Instantiation Errors

g-19-4-2: Type Errors

g-19-4-3: Domain Errors

g-19-4-4: Range Errors

g-19-4-5: Representation Errors

g-19-4-6: Existence Errors

g-19-4-7: Permission Errors

g-19-4-8: Context Errors

g-19-4-9: Consistency Errors

g-19-4-10: Syntax Errors

g-19-4-11: Resource Errors

g-19-4-12: System Errors

g-19-5: An Example

g-19-6: Exceptions and Critical Regions

g-19-7: Summary of Predicates and Functions

g-19-8: Summary of Relevant Libraries

g-20: Messages

g-20-1: Overview

g-20-2: Implementation: Term-Based Messages

g-20-3: Examples of Using the Message Facility

g-20-3-1: Adding messages

g-20-3-2: Changing message text

g-20-3-3: Intercepting the printing of a message

g-20-3-4: Interaction

g-20-4: Internationalization of Quintus Prolog messages

g-20-4-1: Translating the Messages

g-20-4-2: Testing and Installing the Translated Messages

g-20-4-3: Building a Version of Prolog using the Translated Messages

g-20-4-4: Using Kanji characters

g-20-5: Summary of Predicates

h-1: Creating Executables

h-1-1: Introduction

h-1-1-1: Terminology

h-1-1-2: Shared Libraries and Delivering Execuatables

h-1-1-3: Stand-Alone Programs

h-1-1-4: Runtime Systems

h-1-1-5: Compiling and Linking

h-1-1-6: The Runtime Kernel vs. Development Kernel

h-1-2: Invoking qpc, the Prolog-to-QOF Compiler

h-1-3: Invoking qld, the QOF Link Editor

h-1-3-1: Implicit invocation via qpc

h-1-3-2: Explicit Invocation

h-1-4: Dependencies of QOF files

h-1-4-1: Generating QOF Files and Dependencies

h-1-4-2: Example

h-1-4-3: Using the UNIX make utility

h-1-5: File Search Paths and qld

h-1-6: Embedded Commands and Initialization Files

h-1-6-1: Compile-time code vs. Runtime code

h-1-6-2: Initialization Files

h-1-6-3: Side-Effects in Compile-Time Code

h-1-6-4: Modules and Embedded Commands

h-1-6-5: Predicates Treated in a Special Way

h-1-6-6: Restriction on Compile-Time Code

h-1-7: Operator Declarations

h-1-8: Saved-States and QOF files

h-1-9: Dynamic Foreign Interface

h-1-10: Linking with QUI

h-2: The Runtime Generator

h-2-1: Introduction

h-2-2: Predicates not supported by the Runtime Kernel

h-2-3: Providing a Starting Point: runtime_entry/1

h-2-4: Control-c Interrupt Handling

h-2-5: Shared Object Files under SunOS4

h-2-6: Installing an Application: runtime(File)

i-1: Overview

i-2: Embedding Prolog Programs

i-2-1-1: Contrasting Old and New Models

i-2-2: How Embedding Works

i-2-2-1: Defining your own main()

i-2-2-2: The Embedding Functions for Memory Management

i-2-2-3: The Embedding Functions For Input/Output

i-2-3: Summary of Functions

i-3: Prolog Calling Foreign Code

i-3-1: Introduction

i-3-1-1: Summary of steps

i-3-2: Using Shared Object Files

i-3-2-1: Loading Foreign Executables

i-3-2-2: Loading Foreign Files

i-3-3: Linking Foreign Functions to Prolog Procedures

i-3-4: Specifying the Argument Passing Interface

i-3-5: Passing Integers

i-3-5-1: Passing an Integer to a Foreign Function

i-3-5-2: Returning an Integer from a Foreign Function

i-3-5-3: An Integer Function Return Value

i-3-6: Passing Floats

i-3-6-1: Passing a Float to a Foreign Function

i-3-6-2: Returning a Float from a Foreign Function

i-3-6-3: A Floating-point Function Return Value

i-3-7: Passing Atoms

i-3-7-1: Passing Atoms in Canonical Form

i-3-7-2: Passing Atoms as Strings between Prolog and C

i-3-7-3: Passing Atoms as Strings to/from Pascal or FORTRAN

i-3-7-4: Converting between Atoms and Strings

i-3-8-1: Passing a Prolog term to a Foreign Function

i-3-8-2: Returning a Prolog term from a Foreign Function

i-3-8-3: A Prolog term returned as a value of a Foreign Function

i-3-10: Important Prolog Assumptions

i-3-11: Debugging Foreign Code Routines

i-3-12: Implementation of load_foreign_executable/1

i-3-13: Implementation of load_foreign_files/2

i-3-14: Library support for linking foreign code

i-3-15: Foreign Code Examples: Unix

i-3-15-1: C Interface

i-3-15-2: Pascal Interface

i-3-15-3: FORTRAN Interface

i-3-15-4: Assembly Code Interface

i-3-15-5: Passing pointers between Prolog and Foreign Code

i-3-16: Summary of Predicates and Functions

i-3-17: Library Support

i-4: Foreign Functions Calling Prolog

i-4-1: Introduction

i-4-1-1: Summary of steps

i-4-2: Making Prolog Procedures Callable by Foreign Functions

i-4-2-1: Specifying the Argument Passing Interface: extern/1

i-4-3: Passing Data to and from Prolog

i-4-3-1: Passing Integers

i-4-3-2: Passing Floats

i-4-3-3: Passing Atoms in Canonical Form

i-4-4: Converting Between Atoms and Strings

i-4-4-1: Passing Atoms as Strings

i-4-4-2: Passing Terms

i-4-4-3: Passing Addresses

i-4-5: Invoking a Callable Predicate from C

i-4-5-1: Looking Up a Callable Prolog Predicate

i-4-5-2: Making a Determinate Prolog Query

i-4-5-3: Initiating a Nondeterminate Prolog Query

i-4-5-4: Requesting a Solution to a Nondeterminate Prolog Query

i-4-5-5: Terminating a Nondeterminate Prolog Query

i-4-6: Examples

i-4-6-1: Calling Arbitrary Prolog Goals from C

i-4-6-2: Generating Fibonacci Numbers

i-4-6-3: Calling a Non-determinate Predicate

i-4-6-4: Nested Prolog Queries

i-4-7: Calling Prolog from Pascal and FORTRAN

i-4-8: Summary of Predicates and Functions

i-4-9: Library Support

i-5: Quintus Prolog Input / Output System

i-5-1: Overview

i-5-2: Input/Output Model

i-5-3: Stream Structure

i-5-3-1: Filename of A Stream

i-5-3-2: Mode of A Stream

i-5-3-3: Format of A Stream

i-5-3-4: Maximum Record Length

i-5-3-5: Line Border Code

i-5-3-6: File Border Code

i-5-3-7: Reading Past End Of File

i-5-3-8: Prompt String

i-5-3-9: Record Trimming

i-5-3-10: Seek Type

i-5-3-11: Flushing An Output Stream

i-5-3-12: Output Stream Buffer Overflow

i-5-3-13: Storing Error Condition Of A Stream

i-5-3-14: System-Dependent Address In A File Stream

i-5-3-15: Bottom Layer Functions

i-5-4: TTY Stream

i-5-5: Defining A Customized Prolog Stream

i-5-5-1: Summary of Steps

i-5-5-2: Defining a Stream Structure

i-5-5-3: Opening The User-Defined Stream

i-5-5-4: Allocating Space And Setting Field Values For the User-Defin

i-5-5-5: Setting Up The QP_stream Structure

i-5-5-6: Initialize and Register The Created Stream

i-5-5-7: TTY Group For TTY Stream

i-5-6: The Bottom Layer Functions

i-5-6-1: The Bottom Layer Read Function

i-5-6-2: The Bottom Layer Write Function

i-5-6-3: The Bottom Layer Flush Function

i-5-6-4: The Bottom Layer Seek Function

i-5-6-5: The Bottom Layer Close Function

i-5-7: Examples Of User-Defined Streams

i-5-7-1: Creating A Binary Stream

i-5-7-2: Creating A Stream To Read An Encrypted File

i-5-7-3: Creating A Stream Based On C Standard I/O Library

i-5-8: Built-in C Functions And Macros For I/O

i-5-9: Backward Compatibility I/O Issues

i-5-9-1: Default Stream

i-5-9-2: User_defined Streams

j-1: tcp: Network Communication Package

j-1-1: The client/server relationship

j-1-2: Using tcp

j-1-2-1: tcp_trace(-OldValue, +On_or_Off)

j-1-2-2: tcp_watch_user(-Old, +On_or_Off)

j-1-2-3: tcp_reset/0

j-1-3: Maintaining Connections

j-1-3-1: tcp_create_listener(?Address, -PassiveSocket)

j-1-3-2: tcp_destroy_listener(+PassiveSocket)

j-1-3-3: tcp_listener(?PassiveSocket)

j-1-3-4: tcp_address_to_file(+ServerFile, +Address)

j-1-3-5: tcp_address_from_file(+ServerFile, -Address)

j-1-3-6: tcp_address_from_shell(+Host, +ServerFile, -Address)

j-1-3-7: tcp_address_from_shell(+Host, +UserId, +ServerFile, -Addr

j-1-3-8: tcp_connect(+Address, -Socket)

j-1-3-9: tcp_connected(?Socket)

j-1-3-10: tcp_connected(?Socket,?PassiveSocket)

j-1-3-11: tcp_shutdown(+Socket)

j-1-3-12: Short lived connections

j-1-4: Sending and Receiving Terms

j-1-4-1: tcp_select(-Term)

j-1-4-2: tcp_select(+Timeout, -Term)

j-1-4-3: tcp_send(+Socket, +Term)

j-1-5: Time Predicates

j-1-5-1: tcp_now(-Timeval)

j-1-5-2: tcp_time_plus(?Timeval1, ?DeltaTime, ?Timeval2)

j-1-5-3: tcp_schedule_wakeup(+Timeval, +Term)

j-1-5-4: tcp_scheduled_wakeup(?Timeval, ?Term)

j-1-5-5: Canceling Wakeups

j-1-5-6: tcp_daily(+Hour, +Minute, +Seconds, -Timeval)

j-1-5-7: tcp_date_timeval(?Date, ?Timeval)

j-1-6: Using Prolog streams

j-1-6-1: tcp_select_from(-Term)

j-1-6-2: tcp_select_from(+Timeout, -Term)

j-1-6-3: tcp_input_stream(?Socket, -Stream)

j-1-6-4: tcp_output_stream(?Socket, -Stream)

j-1-7: The Callback Interface

j-1-7-1: tcp_create_input_callback(+Socket, +Goal)

j-1-7-2: tcp_destroy_input_callback(+Socket)

j-1-7-3: tcp_input_callback(*Socket, *Goal)

j-1-7-4: tcp_create_timer_callback(+Timeval, +Goal, -TimerId)

j-1-7-5: tcp_destroy_timer_callback(+TimerId)

j-1-7-6: tcp_timer_callback(*Timerid, *Goal)

j-1-7-7: tcp_accept(+PassiveSocket, -Socket)

j-1-8: The C functions

j-1-8-1: tcp_create_listener()

j-1-8-2: tcp_address_to_file()

j-1-8-3: tcp_address_from_file()

j-1-8-4: tcp_address_from_shell()

j-1-8-5: tcp_connect()

j-1-8-6: tcp_accept()

j-1-8-7: tcp_select()

j-1-8-8: tcp_shutdown()

j-1-9: Examples

j-2: IPC/RPC: Remote Predicate Calling

j-2-1: Prolog Process Calling Prolog Process

j-2-1-1: save_servant(+SavedState)

j-2-1-2: create_servant(+Machine, +SavedState, +OutFile)

j-2-1-3: call_servant(+Goal)

j-2-1-4: bag_of_all_servant(?Template, +Goal, -Bag)

j-2-1-5: set_of_all_servant(?Template, +Goal, -Set)

j-2-1-6: reset_servant

j-2-1-7: shutdown_servant

j-2-2: C Process Calling Prolog Process

j-2-2-1: The Prolog Side

j-2-2-2: save_ipc_servant(+SavedState)

j-2-2-3: The C Side

j-2-2-4: QP_ipc_create_servant

j-2-2-5: QP_ipc_lookup

j-2-2-6: QP_ipc_prepare

j-2-2-7: QP_ipc_next

j-2-2-8: QP_ipc_close

j-2-2-9: QP_ipc_shutdown_servant

j-2-2-10: QP_ipc_atom_from_string

j-2-2-11: QP_ipc_string_from_atom

j-2-2-12: Examples

j-2-3: Tracing

j-2-3-1: msg_trace(-OldValue, +OnOrOff)

j-2-4: Known Bugs

k-1: Introduction

k-1-1: Directory Structure

k-1-2: Status of Library Packages

k-1-3: Documentation of Library Packages

k-1-3-1: Accessing Code Comments

k-1-4: Notation

k-1-4-1: Character Codes

k-1-4-2: Mode Annotations

k-2: List Processing

k-2-1: Introduction

k-2-2: What is a "Proper" list?

k-2-3: Five List Processing Packages

k-2-4: Basic List Processing -- library(basics)

k-2-4-0: Related Built-in Predicates

k-2-4-1: member(?Element, ?List)

k-2-4-2: memberchk(+Element, +List)

k-2-4-3: nonmember(+Element, +List)

k-2-5: Lists as Sequences -- library(lists)

k-2-6: Lists as Sets

k-2-6-1: Set Processing -- library(sets)

k-2-6-2: Predicates Related to Sets

k-2-7: Lists as Ordered Sets -- library(ordsets)

k-2-8: Parts of lists -- library(listparts)

k-3: Term Manipulation

k-3-1: Introduction

k-3-2: The Six Term Manipulation Packages

k-3-3: Finding a Term's Arguments -- library(arg)

k-3-4: Altering Term Arguments -- library(change_arg)

k-3-5: Checking Terms for Subterms -- library(occurs)

k-3-6: Note on Argument Order

k-3-7: Checking Functors -- library(same_functor)

k-3-8: Term Subsumption -- library(subsumes)

k-3-9: Unification -- library(unify)

k-3-10: termdepth.pl

k-4: Text Processing

k-4-1: Introduction -- library(strings)

k-4-1-1: Access to operating system -- system/1

k-4-2: Type Testing

k-4-3: Converting Between Constants and Characters

k-4-3-1: name(+Constant, -Chars)

k-4-3-2: atom_chars(+Atom, -Chars)

k-4-3-3: number_chars(+Number, -Chars)

k-4-3-4: char_atom(?Char, ?Atom)

k-4-4: Comparing Text Objects

k-4-5: Concatenation

k-4-5-1: Concatenation Functions

k-4-6: Finding the Length and Contents of a Text Object

k-4-7: Finding the width of a term -- library(print_length)

k-4-8: Finding and Extracting Substrings

k-4-8-1: midstring/[3-6]

k-4-8-2: substring/[4,5]

k-4-8-3: subchars/[4,5]

k-4-8-4: The "span" family

k-4-9: Generating Atoms

k-4-10: Case Conversion -- library(ctypes)

k-4-11: Note

k-5: Negation

k-5-1: Introduction -- library(not)

k-5-2: The "is-not-provable" operator

k-5-4: Inequality

k-5-4-1: Term1 \= Term2

k-5-4-2: Term1 ~= Term2

k-5-6: Summary

k-6: Operations on Files

k-6-1: Introduction -- library(files)

k-6-2: Built-in Operations on Files

k-6-3: Renaming and Deleting Files

k-6-4: Checking To See If A File Exists

k-6-5: Other Related Library Files

k-6-5-1: library(ask)

k-6-5-2: library(crypt)

k-6-5-3: library(fromonto)

k-7: Looking Up Files

k-7-1: Introduction -- library(directory)

k-7-2: Finding Files in Directories

k-7-3: Finding Subdirectories

k-7-4: Finding Properties of Files and Directories

k-7-5: Summary

k-8: Obtaining User Input

k-8-1: Introduction

k-8-2: Classifying Characters -- library(ctypes)

k-8-3: Reading and Writing Lines -- library(lineio)

k-8-4: Reading Continued Lines -- library(continued)

k-8-5: Reading English Sentences

k-8-5-0: overview

k-8-5-1: library(read_in)

k-8-5-2: library(read_sent)

k-8-6: Yes-no Questions, and Others -- library(ask)

k-8-7: Other Prompted Input -- library(prompt)

k-8-8: Pascal-like Input -- library(readconstant)

k-9: Interface to Math Library

k-9-1: Introduction -- library(math.{c,pl})

k-10: The Structs Package

k-10-1-1: Declaring Types

k-10-2: Using Structs with QPC

k-10-3: Checking Foreign Term Types

k-10-4: Creating and Destroying Foreign Terms

k-10-5: Accessing and Modifying Foreign Term Contents

k-10-6: Casting

k-10-7: Null Foreign Terms

k-10-8: Interfacing with Foreign Code

k-10-9: Examining Type Definitions at Runtime

k-10-10: Structs to C

k-10-11: Tips

k-11: Miscellaneous Packages

k-11-1: ctr.{pl,c}

k-11-2: date.{c,pl}

k-11-3: Arbitrary Expressions -- library(activeread)

k-11-4: addportray.pl

k-12: Abstracts

l-1: Reading the Reference pages

l-1-1: Mode Annotations

l-1-2: Predicate Categories

l-1-3: Argument Types

l-1-3-1: Simple Types

l-1-3-2: Extended Types

l-2: Topical List of Prolog Built-ins

l-2-1: Arithmetic

l-2-2: Character I/O

l-2-3: Control

l-2-4: Database

l-2-5: Debugging

l-2-6: Executables and QOF-Saving

l-2-7: Execution State

l-2-8: File Name Manipulation

l-2-9: File and Stream Handling

l-2-10: Foreign Interface

l-2-11: Grammar Rules

l-2-12: Help

l-2-13: Hook Predicates