CS 342 Lecture -*- Outline -*- * Introduction to Logic Programming and Prolog ** Goals extremely high level, declarative say what is to be done, instead of how WRITE programs efficiently (vs. running efficiently) ** Logic programming techniques *** programs are propositions that assert existence of desired result i.e., for all x, exists y such that P(x,y) is a function from x to y such that P(x,y) holds Specification = implementation *** proofs can be constructive to prove that for lists L1 there is a sorted version of L1, L2 show how to build L2 *** Think of programs as *relations* (plus X Y Z) {<1,3,4>, <2,9,11>, ...} (reverse L1 L2) {<[1,2,3], [3,2,1]>, ...}