Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .

Contents
Preface
What is Prolog?
What are strengths and Weaknesses?
Section 1: Introduction
The Compiler
Horn Clause Logic
Extending the Family Theory
Prolog is a Programming Language
Failing
Backtracking
Improving the Family Theory
Recursion
Side Effects
Conclusion
Section 2: A First Example
Open Visual Prolog
Running a query
Section 4: Facts and Rules
The Rules
The Family Tree Example
Section 5: Operators and Arithmetic
Some Prolog Details
Arity
Spaces
Simple I/O in Prolog
Arithmetic in Prolog
Built-In Predicates
Arithmetic Operators
Some queries:
Defining your own relations
Exercises
Section 6: Recursion
Using Recursion
Some Examples
Exercise:
The Towers of Hanoi
The Grid Example
Section 7: Structures
The General Form of a Structure
Arithmetic "Functions" and Structures
A simple example of using structures
Section 8: Recursive Structures
Inserting an element
Binary Trees
Exercise
Section 9: Introducing Lists
Format of Lists
Empty and Non-Empty Lists
The length of a list
Summing a list
List Membership
Section 10: Lists as Accumulators
Collecting information
Joining two lists
Reversing a List
Built-In list predicates
Section 11: Backtracking and Cut
Analysing Cases
An Example Of Using The Cut
The First Cut
Another Cut
Yet Another Cut
Section 12: More Control Features
Kinds of cut
Green cuts
Red cuts
Negation as Failure
Warning!
If-then-else in Prolog
The repeat predicate
Section 13: Input and Output
More on I/O
File I/O
Saving and Restoring a Knowledge-Base
Other Approaches to I/O
An Exercise
0 of .
Results for:
P. 1
tutorial

# tutorial

Ratings: (0)|Views: 82|Likes:

Published by: Muhammed Abd El Fatah on Apr 17, 2011

### Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

04/17/2011

pdf

text

original

You're Reading a Free Preview
Pages 4 to 21 are not shown in this preview.
You're Reading a Free Preview
Pages 25 to 62 are not shown in this preview.

## Activity (2)

You've already reviewed this. Edit your review.