Artificial Intelligence and Intelligent Systems: Logic programming as a framework for Knowledge Representation and Artificial Intelligence

2 Prolog as a simple database engine 4 2.1 The subset of Prolog called Datalog . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Example: Logical circuits in Prolog . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 How Prolog answers queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.4 A logical semantics for Prolog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5 Predefined predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19