Week 2
By this point, you should have mastered the material in Chapters 1 and 2. From Chapter 1, you should be familiar with the basic idea of Logic Programming - logic programs as runnable specifications. From Chapter 2, you should understand the concept of datasets and some of the issues involved in creating datasets to describe application areas. In fact, you should be more than familiar with this material - ideally, you should be saying to yourself (and others) that, when all is said and done, this stuff is pretty easy. In fact, it *is* easy. But it is also very important, as we use datasets not just for practical purposes but also in defining the semantics of more complex notions to come.
Judging from the feedback we have received, it appears that, for some of you, the toughest part of the first assignment set was figuring out how to use the meta-vocabulary of types and predicates and attributes to describe types and predicates and attributes. Most of our work will be closer to the first assignment of the week (describing real world things, like movies), but we wanted you to do the metadata and escher assignments to get you to think explicitly about those concepts.
Week 2 focusses on queries. We add variables and logical operators to our language and show how to use them in writing queries, and we give a formal semantics for queries written within this language. As we shall see, the semantics is simple and very precise. However, it is not very practical from a computational point of view, and so we look at more practical algorithms for computing answers.
A reminder that we would like you to take advantage of the Forum. If you are confused about something, you might be able to get insight from others. If you have mastered the material, you might be able to help others; and explaining things might help you to understand the material more deeply.
Week 1
Okay. We are on our way! The course begins now. On Tuesday, we will have an introductory presentation on the subject matter of the course and course logistics. On Thursday, we will have our first substantive class.
Your goal this week is to read through and understand the first two chapters of the notes. The first chapter is just an overview, and it is an easy read. That said, you should not shortchange the material. The chapter talks about the main ideas of Logic Programming and how they relate to each other. The second chapter introduces Datasets. Datasets are fundamental to the theory of Logic Programming, and they are important in practical applications. The concept is simple, but there are some nuances; and we recommend you read the notes carefully and do the exercises.
You should also drop by the Forum to check out what others in the class are saying. There are some subtleties in Logic Programming that you can miss and that can lead to confusion. Engaging in discussion on the Forum is a good way to deal with these subtleties. And, even if you think you understand everything, you might consider using the Forum to help others and thus consolidate your understanding of the issues.
Note that this week's assignments are due by midnight next Sunday. After this, the assignments for each unit will be due every other week. Note that, when you click on an assignment, you will be asked to sign in. If you have not previously created an account, click Sign Up and enter your SUNet Id. The system will send a passcode to your id@stanford.edu. You can then use your id and this passcode to sign in.
The "Project" is not due this week. But you should start thinking about what you might want to do. Look at the assignments from previous years. And read the suggestions that we will post occasionally on the Forum. Finally, we would like you to form teams to do the project. Ideally three members per team, but four ok and two possible in extreme circumstances. If you have not found teammates after the first class or two, drop by the Forum and use the Teammate thread to find others in need of teammates.
Course Overview
Logic Programming is a style of programming based on Symbolic Logic. In recent years, there has been increasing interest in Logic Programming due to applications in deductive databases, automated worksheets, Enterprise Management (business rules), Computational Law, and General Game Playing.
This course is an introduction to Logic Programming theory, current technology, and popular applications. Work in the course takes the form of lectures, readings, online exercises, programming assignments, and a term project.
There will be twenty in-person class sessions - on Tuesdays and Thursdays from 1:30 pm - 2:50 pm. See the table below for a summary of the topics of these sessions. Note that you should attend all sessions. We will occasionally present material in class that is not in the notes, and the sessions will not be recorded.
| Date | Topic | Location | Time |
| March 31 |
Introduction |
Hewlett 201 |
1:30 - 2:50 |
| April 2 |
Datasets |
Hewlett 201 |
1:30 - 2:50 |
| April 7 |
Relational Queries |
Hewlett 201 |
1:30 - 2:50 |
| April 9 |
Query Evaluation |
Hewlett 201 |
1:30 - 2:50 |
| April 14 |
Functional Queries |
Hewlett 201 |
1:30 - 2:50 |
| April 16 |
Transitions |
Hewlett 201 |
1:30 - 2:50 |
| April 21 |
Views |
Hewlett 201 |
1:30 - 2:50 |
| April 23 |
View Evaluation |
Hewlett 201 |
1:30 - 2:50 |
| April 28 |
Simple Examples |
Hewlett 201 |
1:30 - 2:50 |
| April 30 |
Lists, Sets, Trees |
Hewlett 201 |
1:30 - 2:50 |
| May 5 |
Functions |
Hewlett 201 |
1:30 - 2:50 |
| May 7 |
Operations |
Hewlett 201 |
1:30 - 2:50 |
| May 12 |
Applications |
Hewlett 201 |
1:30 - 2:50 |
| May 14 |
Worksheets |
Hewlett 201 |
1:30 - 2:50 |
| May 19 |
Incomplete Data |
Hewlett 201 |
1:30 - 2:50 |
| May 21 |
Goals and Constraints |
Hewlett 201 |
1:30 - 2:50 |
| May 26 |
Advanced Logic Programming |
Hewlett 201 |
1:30 - 2:50 |
| May 28 |
Past Projects |
Hewlett 201 |
1:30 - 2:50 |
| June 2 |
Project Reports |
Hewlett 201 |
1:30 - 2:50 |
| June 4 |
Project Reports |
Hewlett 201 |
1:30 - 2:50 |
All of the course materials are online here. There are links to lessons, additional readings, the Epilog language, the Sierra interactive development environment, examples, games, and an online discussion forum. Click the tabs at the top of this page to access this content. The Lessons tab is your friend. Use it. And be sure to check this page frequently, as we will be posting periodic updates here.
If you are desperate for a printed version of the course text, click on the image below to purchase a copy from Amazon. However, it is redundant with the online course materials and is not required.
Note that, as you proceed through the online materials, you may occasionally encounter minor errors or inconsistencies. Apologies in advance for this. We are still working on the course. You may get extra credit for reporting such problems (especially if your reports are not overly irate).
Teaching Staff
| Michael Genesereth |
| Email: genesereth@stanford.edu |
| Office Hours: Wed 3:00 pm - 4:00 pm |
| Location: Gates 308 |
|
| Manav Kant |
| Email: manavk@stanford.edu |
| Office Hours: Thu 3:00 pm - 4:00 pm |
| Location: Outside Gates 308 |
|
|