CS 541 Lecture -*- Outline -*- * Introduction to Logic Programming ** History 1930s Herbrand and others develop proof procedures for pred. calculus 1960 Prawitz introduces unification as aid to theorem proving 1965 Robinson's resolution algorithm 1973 first FORTRAN version of Prolog (U. Marseille-Aix, Colmerauer) 1977 first Prolog compiler (Edinburgh, due to Warren) as fast as LISP! 1981 Japanese adopt Prolog for fifth-generation computing effort ** Claims of Logic programming: (questions we'll look at) Algorithm = logic + control vs Algorithms + data structures = programs Specification = implementation Good for rapid prototyping (partly because it may be inefficient) Human-oriented (friendly) ** Logic programming techniques *** nonprocedural, what is to be done, instead of how *** proofs can be constructive to prove that there is an sorted version of list X, exhibit the sorted version of the list *** programs are propositions that assert existence of desired result the computation is a constructive proof *** Think of programs as *relations* plus(X,Y,Z) {<1,3,4>, <2,9,11>, ...} reverse(L1,L2) {<[1,2,3], [3,2,1]>, ...}