- Up -
Next >>
Table of Contents
Table of Contents
1 Facts, Rules, and Queries
1.1 Some simple examples
1.1.1 Knowledge Base 1
1.1.2 Knowledge Base 2
1.1.3 Knowledge Base 3
1.1.4 Knowledge Base 4
1.1.5 Knowledge Base 5
1.2 Prolog Syntax
1.2.1 Atoms
1.2.2 Numbers
1.2.3 Variables
1.2.4 Complex terms
1.3 Exercises
1.4 Practical Session 1
2 Matching and Proof Search
2.1 Matching
2.1.1 Examples
2.1.2 The occurs check
2.1.3 Programming with matching
2.2 Proof Search
2.3 Exercises
2.4 Practical Session 2
3 Recursion
3.1 Recursive definitions
3.1.1 Example 1: Eating
3.1.2 Example 2: Descendant
3.1.3 Example 3: Successor
3.1.4 Example 3: Addition
3.2 Clause ordering, goal ordering, and termination
3.3 Exercises
3.4 Practical Session 3
4 Lists
4.1 Lists
4.2 Member
4.3 Recursing down lists
4.4 Exercises
4.5 Practical Session 4
5 Arithmetic
5.1 Arithmetic in Prolog
5.2 A closer look
5.3 Arithmetic and lists
5.4 Comparing integers
5.5 Exercises
5.6 Practical Session 5
6 More Lists
6.1 Append
6.1.1 Defining append
6.1.2 Using append
6.2 Reversing a list
6.2.1 Naive reverse using append
6.2.2 Reverse using an accumulator
6.3 Exercises
6.4 Practical Session 6
7 Definite Clause Grammars
7.1 Context free grammars
7.1.1 CFG recognition using append
7.1.2 CFG recognition using difference lists
7.2 Definite clause grammars
7.2.1 A first example
7.2.2 Adding recursive rules
7.2.3 A DCG for a simple formal language
7.3 Exercises
7.4 Practical Session 7
8 More Definite Clause Grammars
8.1 Extra arguments
8.1.1 Context free grammars with features
8.1.2 Building parse trees
8.1.3 Beyond context free languages
8.2 Extra goals
8.2.1 Separating rules and lexicon
8.3 Concluding remarks
8.4 Exercises
8.5 Practical Session 8
9 A Closer Look at Terms
9.1 Comparing terms
9.2 Terms with a special notation
9.2.1 Arithmetic terms
9.2.2 Lists as terms
9.3 Examining Terms
9.3.1 Types of Terms
9.3.2 The Structure of Terms
9.4 Operators
9.4.1 Properties of operators
9.4.2 Defining operators
9.5 Exercises
9.6 Practical Session
10 Cuts and Negation
10.1 The cut
10.2 If-then-else
10.3 Negation as failure
10.4 Exercises
10.5 Practical Session 10
11 Database Manipulation and Collecting Solutions
11.1 Database manipulation
11.2 Collecting solutions
11.2.1
findall/3
11.2.2
bagof/3
11.2.3
setof/3
11.3 Exercises
11.4 Practical Session 11
12 Working With Files
12.1 Splitting Programs Over Files
12.1.1 Reading in Programs
12.1.2 Modules
12.1.3 Libraries
12.2 Writing To and Reading From Files
12.3 Practical Session
12.3.1 Step 1
12.3.2 Step 2
12.3.3 Step 3
12.3.4 Step 4
12.3.5 Step 5
12.3.6 Step 6
- Up -
Next >>
Patrick Blackburn
,
Johan Bos
and
Kristina Striegnitz
Version 1.2.5 (20030212)