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

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
brna

brna

Ratings:

4.0

(2)
|Views: 219 |Likes:
Published by findingbooks

More info:

Published by: findingbooks on Mar 27, 2009
Copyright:Attribution Non-commercial

Availability:

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

10/17/2011

pdf

text

original

 
Prolog
ProgrammingA First Course
Paul BrnaMarch 5, 2001
 
Abstract
The course for which these notes are designed is intended for undergraduatestudents who have some programming experience and may even have writtena few programs in
Prolog
. They are not assumed to have had any formalcourse in either propositional or predicate logic.At the end of the course, the students should have enough familiarity with
Prolog
to be able to pursue any undergraduate course which makes use of 
Prolog
.This is a rather ambitious undertaking for a course of only twelve lecturesso the lectures are supplemented with exercises and small practical projectswherever possible.The
Prolog
implementation used is SICStus Prolog which is closely mod-elled on Quintus Prolog (SICS is the Swedish Institute of Computer Science).The reference manual should also be available for consultation [SICStus, 1988].c
Paul Brna 1988
 
Contents
1 Introduction 1
1.1 Declarative vs Procedural Programming . . . . . . . . . . . . 11.2 What Kind of Logic? . . . . . . . . . . . . . . . . . . . . . . . 11.3 A Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.4 A Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Knowledge Representation 3
2.1 Propositional Calculus . . . . . . . . . . . . . . . . . . . . . . 32.2 First Order Predicate Calculus . . . . . . . . . . . . . . . . . 42.3 We Turn to
Prolog
. . . . . . . . . . . . . . . . . . . . . . . 52.4
Prolog
Constants . . . . . . . . . . . . . . . . . . . . . . . . 72.5 Goals and Clauses . . . . . . . . . . . . . . . . . . . . . . . . 82.6 Multiple Clauses . . . . . . . . . . . . . . . . . . . . . . . . . 82.7 Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.8 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.9 The Logical Variable . . . . . . . . . . . . . . . . . . . . . . . 112.10 Rules and Conjunctions . . . . . . . . . . . . . . . . . . . . . 122.11 Rules and Disjunctions . . . . . . . . . . . . . . . . . . . . . . 132.12 Both Disjunctions and Conjunctions . . . . . . . . . . . . . . 142.13 What You Should Be Able To Do . . . . . . . . . . . . . . . . 15
3 Prologs Search Strategy 16
3.1 Queries and Disjunctions . . . . . . . . . . . . . . . . . . . . 163.2 A Simple Conjunction . . . . . . . . . . . . . . . . . . . . . . 193.3 Conjunctions and Disjunctions . . . . . . . . . . . . . . . . . 213.4 What You Should Be Able To Do . . . . . . . . . . . . . . . . 23
4 Unication, Recursion and Lists 26
4.1 Unication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.2 Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.3 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.4 What You Should Be Able To Do . . . . . . . . . . . . . . . . 32i

Activity (3)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Kavita Dagar liked this

You're Reading a Free Preview

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