Đang chuẩn bị liên kết để tải về tài liệu:
Learn Prolog Now!

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

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@aplog.org jbos@cogsci.ed.ac.uk kris@coli.uni-sb.de This course is also available online http www.coli.uni-sb.de kris learn-prolog-now Contents 1 Facts Rules and Queries 1 1.1 Some simple examples. 1 1.1.1 Knowledge Base 1. 1 1.1.2 Knowledge Base 2. 3 1.1.3 Knowledge Base 3. 4 1.1.4 Knowledge Base 4. 6 1.1.5 Knowledge Base 5. 8 1.2 Prolog Syntax. 8 1.2.1 Atoms . 9 1.2.2 Numbers. 9 1.2.3 Variables. 9 1.2.4 Complex terms. 10 1.3 Exercises. 11 1.4 Practical Session 1. 13 2 Matching and Proof Search 17 2.1 Matching. 17 2.1.1 Examples. 19 2.1.2 The occurs check. 22 2.1.3 Programming with matching. 23 2.2 Proof Search. 26 2.3 Exercises. 31 2.4 Practical Session 2. .