Programming in prolog
Material type: TextPublication details: New York Springer-Verlag 1984Description: xv,297,iipISBN:- 3540150110
- 005.133 CLO
Item type | Current library | Collection | Call number | Status | Date due | Barcode | Item holds | |
---|---|---|---|---|---|---|---|---|
Book | CEPT Library | BK | 005.133 CLO | Available | 015496 |
CONTENTS
Chapter 1. Tutorial Introduction 1
Gives the student a "feci" for what it is like to program in Prolog. Introduces objects, relationships, facts, rules, variables.
1 Facts
2 Questions
3 Variables
4 Conjunctions
5 Rules
6 Summary and Exercises
Chapter 2. A Closer Look 23
More detailed presentation of Prolog syntax and data structures.
1 Syntax
2 Characters
3 Operators
4 Equality and Matching
5 Arithmetic
6 Summary of Satisfying Goals
Chapter 3. Using Data Structures 47
Representing objects and relationships by using "trees" and "lists". Developing several example Prolog programs.
1 Structures and Trees
2 Lists
3 Membership of a List
4 Example: Changing a Sentence into Another
5 Example: Comparing Alphabetic Order
6 Using append and a Parts Inventory
Chapter 4. Backtracking and "Cut" 68
How a set of clauses generates a set of solutions. Using "cut" to modify the control sequence of running Prolog programs.
1 Generating Multiple Solutions
2 The "Cut"
3 Common Uses of the "Cut"
4 Problems with "Cut"
Chapter 5. Input and Output 94
Facilities available for the input and output of characters and struc¬tures. Developing a program to read sentences from the user and represent the sentence as a list of words, which can be used with the Grammar Rules of Chapter 9.
1 Reading and Writing Terms
2 Reading and Writing Characters
3 Reading English Sentences
4 Reading and Writing Files
5 Declaring Operators
Chapter 6. Built-in Predicates 111
Definition of the "core" built-in predicates, with sensible examples of how each one is used. By this point, the reader should be able to read reasonably complex programs, and should therefore be able to absorb the built-in predicates by seeing them in use.
1 Entering New Clauses
2 Success and Failure
3 Classifying Terms
4 Treating Clauses as Terms
5 Constructing and Accessing Components of Terms
6 Affecting Backtracking
7 Constructing Compound Goals
8 Equality
9 Input and Output
10 Handling Files
11 Evaluating Arithmetic Expressions
12 Comparing Numbers
13 Watching Prolog at Work
Chapter 7. More Example Programs 138
Many example programs are given, covering a wide range of inter¬ests. New examples include list processing, set operations, symbolic differentiation and simplification of formulae.
1 A Sorted-Tree Dictionary
2 Searching A Maze
3 The Towers of Hanoi
4 Parts Inventory
5 List Processing
6 Representing and Manipulating Sets
7 Sorting
8 Using the Database: random, gensym, findall
9 Searching Graphs
10 Sift the Two's and Sift the Three's
11 Symbolic Differentiation
12 Mapping Structures and Transforming Trees
13 Using clause and retract
Chapter 8. Debugging Prolog Programs 181
By this point, the reader will be able to write reasonable programs, and so the problem of debugging will be relevant. Flow of control model, hints about common bugs, techniques of debugging.
1 Laying out Programs
2 Common Errors
3 The Tracing Model
4 Tracing and Spy Points
5 Fixing Bugs
Chapter 9. Using Prolog Grammar Rules 210
Applications of existing techniques. Using Grammar Rules. Examin¬ing the design decisions for some aspects of analysing natural language with Grammar Rules.
1 The Parsing Problem
2 Representing the Parsing Problem in Prolog
3 The Grammar Rule Notation
4 Adding Extra Arguments
5 Adding Extra Tests
6 Summary
Chapter 10. The Relation of Prolog to Logic 233
Predicate Calculus, clausal form, resolution theorem proving, logic programming.
1 Brief Introduction to Predicate Calculus
2 Clausal Form
3 A Notation for Clauses
4 Resolution and Proving Theorems
5 Horn Clauses
6 Prolog
7 Prolog and Logic Programming
Chapter 11. Projects in Prolog 257
A selection of suggested exercises, projects, and problems.
1 Easier Projects
2 Advanced Projects
APPENDICES
A. Answers to Selected Exercises 264
B. Clausal Form Program Listings 269
C. Different Versions of Prolog 275
D. DECsystem-10 Prolog 279
E. MicroProlog 289
Index 294
There are no comments on this title.