Prolog

Páginas: 148 (36780 palabras) Publicado: 4 de abril de 2011
Learn Prolog Now!

Patrick Blackburn, Johan Bos and Kristina Striegnitz

Learning Prolog Now!

q

Table of Contents 1 Facts, Rules, and Queries 2 Matching and Proof Search 3 Recursion 4 Lists 5 Arithmetic 6 More Lists 7 Definite Clause Grammars 8 More Definite Clause Grammars 9 A Closer Look at Terms 10 Cuts and Negation 11 Database Manipulation and Collecting Solutions 12 Working WithFiles

q

q

q

q

q

q

q

q

q

q

q

q

© 2006, Patrick Blackburn, Johan Bos, Kristina Striegnitz

http://www.coli.uni-saarland.de/~kris/learn-prolog-now/lpnpage.php?pageid=online (2 of 2)11/3/2006 7:23:04 PM

Table of Contents

- Up -

Next >>

Table of Contents
Table of Contents 1 Facts, Rules, and Queries r 1.1 Some simple examples s 1.1.1 Knowledge Base 1s 1.1.2 Knowledge Base 2 s 1.1.3 Knowledge Base 3 s 1.1.4 Knowledge Base 4 s 1.1.5 Knowledge Base 5 r 1.2 Prolog Syntax s 1.2.1 Atoms s 1.2.2 Numbers s 1.2.3 Variables s 1.2.4 Complex terms r 1.3 Exercises r 1.4 Practical Session 1 2 Matching and Proof Search r 2.1 Matching s 2.1.1 Examples s 2.1.2 The occurs check s 2.1.3 Programming with matching r 2.2 Proof Search r 2.3 Exercises r 2.4Practical Session 2 3 Recursion r 3.1 Recursive definitions s 3.1.1 Example 1: Eating s 3.1.2 Example 2: Descendant s 3.1.3 Example 3: Successor s 3.1.4 Example 3: Addition r 3.2 Clause ordering, goal ordering, and termination r 3.3 Exercises

q q

q

q

http://www.coli.uni-saarland.de/~kris/learn-prolog-now/html/toc.html (1 of 4)11/3/2006 7:25:24 PM

Table of Contents
r q

3.4 PracticalSession 3

4 Lists 4.1 Lists r 4.2 Member r 4.3 Recursing down lists r 4.4 Exercises r 4.5 Practical Session 4 Arithmetic r 5.1 Arithmetic in Prolog r 5.2 A closer look r 5.3 Arithmetic and lists r 5.4 Comparing integers r 5.5 Exercises r 5.6 Practical Session 5 More Lists r 6.1 Append s 6.1.1 Defining append s 6.1.2 Using append r 6.2 Reversing a list s 6.2.1 Naive reverse using append s 6.2.2Reverse using an accumulator r 6.3 Exercises r 6.4 Practical Session 6 Definite Clause Grammars r 7.1 Context free grammars s 7.1.1 CFG recognition using append s 7.1.2 CFG recognition using difference lists r 7.2 Definite clause grammars s 7.2.1 A first example s 7.2.2 Adding recursive rules s 7.2.3 A DCG for a simple formal language r 7.3 Exercises r 7.4 Practical Session 7 More Definite ClauseGrammars r 8.1 Extra arguments s 8.1.1 Context free grammars with features s 8.1.2 Building parse trees s 8.1.3 Beyond context free languages
r

q

5

q

6

q

7

q

8

http://www.coli.uni-saarland.de/~kris/learn-prolog-now/html/toc.html (2 of 4)11/3/2006 7:25:24 PM

Table of Contents

q

q

q

q

8.2 Extra goals s 8.2.1 Separating rules and lexicon r 8.3 Concludingremarks r 8.4 Exercises r 8.5 Practical Session 8 9 A Closer Look at Terms r 9.1 Comparing terms r 9.2 Terms with a special notation s 9.2.1 Arithmetic terms s 9.2.2 Lists as terms r 9.3 Examining Terms s 9.3.1 Types of Terms s 9.3.2 The Structure of Terms r 9.4 Operators s 9.4.1 Properties of operators s 9.4.2 Defining operators r 9.5 Exercises r 9.6 Practical Session 10 Cuts and Negation r 10.1The cut r 10.2 If-then-else r 10.3 Negation as failure r 10.4 Exercises r 10.5 Practical Session 10 11 Database Manipulation and Collecting Solutions r 11.1 Database manipulation r 11.2 Collecting solutions s 11.2.1 findall/3 s 11.2.2 bagof/3 s 11.2.3 setof/3 r 11.3 Exercises r 11.4 Practical Session 11 12 Working With Files r 12.1 Splitting Programs Over Files s 12.1.1 Reading in Programs s 12.1.2Modules s 12.1.3 Libraries r 12.2 Writing To and Reading From Files
r

http://www.coli.uni-saarland.de/~kris/learn-prolog-now/html/toc.html (3 of 4)11/3/2006 7:25:24 PM

Table of Contents
r

12.3 Practical Session s 12.3.1 Step 1 s 12.3.2 Step 2 s 12.3.3 Step 3 s 12.3.4 Step 4 s 12.3.5 Step 5 s 12.3.6 Step 6

- Up -

Next >>

Patrick Blackburn, Johan Bos and Kristina Striegnitz...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • prologo
  • Prologo
  • Prologo
  • Prólogo
  • prologo
  • Prólogo
  • prologar
  • Prologo

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS