tailieunhanh - Learn Prolog Now!

There are only three basic constructs in Prolog: facts, rules, and queries. A collection of facts and rules is called a knowledge base (or a database) and Prolog programming is all about writing knowledge bases. That is, Prolog programs simply are knowledge bases, collections of facts and rules which describe some collection of relationships that we find interesting. So how do we use a Prolog program? By posing queries. That is, by asking questions about the information stored in the knowledge base. | Learn Prolog Now Patrick Blackburn Johan Bos Kristina Striegnitz Copyright @ by Patrick Blackburn Johan Bos and Kristina Striegnitz 2001 patrick@ jbos@ kris@ This course is also available online http kris learn-prolog-now Contents 1 Facts Rules and Queries 1 Some simple examples. 1 Knowledge Base 1. 1 Knowledge Base 2. 3 Knowledge Base 3. 4 Knowledge Base 4. 6 Knowledge Base 5. 8 Prolog Syntax. 8 Atoms . 9 Numbers. 9 Variables. 9 Complex terms. 10 Exercises. 11 Practical Session 1. 13 2 Matching and Proof Search 17 Matching. 17 Examples. 19 The occurs check. 22 Programming with matching. 23 Proof Search. 26 Exercises. 31 Practical Session 2. .

TỪ KHÓA LIÊN QUAN