Logic Programming
- A kind of declarative programming: say what we want to compute, not howThis is the same basic idea as in functional programming.
- Underneath, a program is a (first-order) logic formula; running it finds the variable assignments that make it true.
- We will use two complementary, practical views throughout:
- Database view: predicates are tables of rows; we query existing tables and build new ones.
- Deductive view: a program is a set of rules; given an initial set of facts, find the facts that follow.