Logic Programming

Bob Paige

Courant Institute, New York University

This topic discusses logic programming, and demonstrates how Prolog can be used to implement operational semantics. Lectures will be based on Krzysztof Apt's article on logic programming found here. The Prolog language manual is found here. To execute Prolog, just type


When running interactive mode, the end-of-input character is control-d, and not control-Z as it says in the manual.


1. Give all rules for the Operational Semantics of IMP (without multiplication) without side conditions; i.e., evaluate expressions to strings or lists instead of integers and truth values. Program your operational semantics in prolog. Try it out on Euclid's algorithm from p. 33 in Winskel.