Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
7Activity

Table Of Contents

Contents
Preface
What is Prolog?
What are strengths and Weaknesses?
Section 1: Introduction
The Compiler
Horn Clause Logic
PIE: Prolog Inference Engine
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
Loading the Program
Running a query
Section 4: Facts and Rules
The Rules
The Family Tree Example
Section 5: Operators and Arithmetic
Some Prolog Details
Arity
Spaces
Comments
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:
No results containing your search query
P. 1
Tutorial

Tutorial

Ratings: (0)|Views: 7,995|Likes:
Published by Yosimar Cano

More info:

Published by: Yosimar Cano on May 05, 2011
Copyright:Attribution Non-commercial

Availability:

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

12/28/2012

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 (7)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Amna Gulzar liked this
Richa Amin liked this
Ar Li liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->