Prolog - the standard: reference manual

1. Introduction. - 2. Prolog Data Structures. - 2.1 Terms. - 2.1. 1 Definition. - 2.1. 2 Order of the terms: the relation term-precedes. - 2.1. 3 Operator notation. - 2.2 Some particular terms. - 2.2.1 Predicate indicator. - 2.2.2 List and derived terms. - 2.2. 3 Clause, body and goal. - 3. Prolog Unification. - 3.1 Substitutions. - 3.2 Unifiers. - 3.2.1 Definitions. - 3.2.2 Computing a unifier. - 3.3 The definition of the unification in Standard Prolog. - 3.3.1 A first definition. - 3.3.2 The occurs-check problem. - 3.3.3 Subject to occurs-check and not subject to occurs-check. - 3.3. 4 Normal unification in Standard Prolog. - 4. Prolog Execution Model. - 4.1 Database and environment. - 4.1. 1 The database. - 4.1. 2 Sources and sinks. - 4.1. 3 Flags. - 4.1. 4 Operator and character conversion tables. - 4.2 The execution model for definite Prolog. - 4.2.1 The general resolution algorithm. - 4.2.2 The Prolog computation rule. - 4.2. 3 The Prolog search-tree. - 4.2. 4 A Prolog search-tree example. - 4.2. 5 The execution model of definite Prolog: search-tree visit and construction algorithm. - 4.2. 6 Backtracking. - 4.2. 7 An analogy with the box trace model. - 4.3 The execution model for Standard Prolog. - 4.3.1 The chosen predication corresponds to an existing user-defined procedure. - 4.3.2 The chosen predication does not correspond to any existing procedure. - 4.3.3 The chosen predication is a built-in predicate. - 4.4 Additional error situations. - 4.4.1 System error. - 4.4.2 Resource error. - 4.5 The side-effects of cut. - 5. The Built-in Predicates. - 5.1 Presentation. - 5.2 Templates. - 5.2.1 Mode of an argument. - 5.2.2 Type information. - 5.3 The built-in predicates. - 6. Prolog Arithmetic. - 6.1 Arithmetic expressions. - 6.1. 1 Arithmetic terms. - 6.1. 2 Numbers. - 6.2 Expression evaluation. - 6.2.1 Value of an expression. - 6.2.2 Arithmetic comparison operator definitions. - 6.2. 3 Arithmetic functors definitions. - 6.2. 4 Profile of the basic arithmetic operations. - 6.2. 5 Arithmetic functors defined in Standard Prolog. - 7. Prolog Environment: Sources and Sinks. - 7.1 Overview. - 7.2 Streams in Standard Prolog. - 7.2.1 Text streams. - 7.2.2 Binary streams. - 7.3 Properties of the streams. - 7.3.1 I/O modes. - 7.3.2 Options at stream creation. - 7.3.3 Options at stream closure. - 7.3. 4 Current stream properties. - 7.4 Inputting and outputting terms. - 7.4.1 Read-options list. - 7.4.2 Write-options list. - 7.4.3 Writing a term. - 8. Prolog Flags and Directives. - 8.1 Unchangeable flags. - 8.2 Changeable flags. - 8.3 Directives for initialising flags and tables. - 8.4 Directives for preparation of Prolog texts and goals. - 9. Prolog Syntax. - 9.1 Character sets and character conversion table. - 9.1. 1 The Prolog character set and other character sets. - 9.1. 2 The character conversion table. - 9.1. 3 Character code. - 9.2 Expression and operator table. - 9.2.1 The operator table. - 9.2.2 The predefined operator table. - 9.2. 3 Parsing an expression. - 9.2. 4 Valid operator table. - 9.3 Presentation of the syntax. - 9.4 Syntax of Prolog text. - 9.4.1 Syntax of directive. - 9.4.2 Syntax of clause. - 9.5 Syntax of read-term. - 9.5.1 Term definition. - 9.5.2 Procedures used in the DCG. - 9.6 Syntax errors. - 10. Writing Portable Programs. - 10.1 Unification. - 10.1. 1 A first solution. - 10.1. 2 Introduction of unification with occurs-check. - 10.1. 3 What to do with the built-in predicates. - 10.2 The database update view. - 10.2.1 The database update view in the execution model for a subset of Standard Prolog. - 10.2.2 The logical database update view. - 10.2. 3 The database update view in Standard Prolog. - 10.2. 4 A simple view. - 11. Annexes. - 11.1 Compliance. - 11.1. 1 Prolog processor. - 11.1. 2 Prolog text. - 11.1. 3 Prolog goal. - 11.1. 4 Documentation. - 11.1. 5 Extensions. - 11.2 The ftp package. - 11.2.1 The package. - 11.2.2 How to run the executable specification. - 11.2. 3 Examples of uses. - 11.3 Elements of lexical analysis. - 11.4 ASCII table. - 11.5 Glossary of auxiliary concepts. - Thematic classification of the built-in predicates.