Logic Programming
06-25433
Autumn 2012

 

 

 

Lectures

This is the list of lectures giving for each:

  • preparing for lecture
  • lecture slides/handout
  • lecture summary
  • programs
  • individual study suggestions and further reading


Topics for Logic Programming


Number


Summary

1 First programs in Prolog including:
  • working with objects to
    • display information
    • change contents of an object
  • comparing and contrasting Prolog and Java
  • briefly introducing variables and assignment in Prolog
2 Writing and running simple Prolog programs including:
  • revision of unification;
  • introducing facts;
  • Prolog use of unification when searching for clauses;
  • writing rules that use facts;
  • how Prolog works - its "hidden" data structure.
3 Writing and running recursive Prolog programs including writing and running:
  • rules to allow us to write conjunctive queries more concisely and to reuse them;
  • recursive programs that describe uncertain and unpredictable situations;
  • to process recursive structures recursively.
4 Search and non-determinism including:
  • rewriting iteration in recursion;
  • search trees and strategies with reference to searching acyclic directed graphs;
  • searching cyclic directed graphs.
5 Manipulating atomics and clauses including:
  • reading input from the keyboard using recursion;
  • using sub_atom/5 to build a simple morphological analyser ;
  • using Prolog's operator notation to make code more readable;
  • using clause/2 to access clauses
6 An AI application: propositional calculus including:
  • more on using Prolog's operator notation to make code more readable;
  • an application of reading input from the keyboard using recursion;
  • Wang's theorem prover for the propositional calculus.
7 Processing lists in Prolog 1 including:
  • the versatility of lists;
  • the syntax of lists;
  • unification of lists;
  • termination patterns in list processing.
8 Processing lists in Prolog 2 including:
  • writing procedures with one or more terminating or recursive clauses;
  • one/all deletions - deleting one or all instances of an element from a list;
  • the effects of matching v. unification;
  • changing the order in which solutions are presented by changing clause order.
9 Processing lists in Prolog 3 including:
  • using accumulators to write more efficient (and especially tail-recursive) procedures;
  • writing list processing rules that are called from within list processing rules;
  • doing the "impossible" - adding to the end of a list;
  • rewriting procedures to make them more efficient - by adding extra arguments.
10 Writing and debugging programs including:
  • designing programs top-down;
  • building the code for a program bottom-up;
  • using a good style to make programs more easily understood;
  • testing programs systematically and analytically so to be as certain as possible each part works as intended.
11 Prolog's execution strategy explained more precisely including:
  • optimizations to the elementary model based on indexing;
  • optimizations to the elementary model based on determinism;
  • the if...then...else construct and the proper use of the cut.
12 Definite Clause Grammar including:
  • the basic framework;
  • embedding calls to "ordinary" Prolog;
  • building structures.
13 Logical inference with a NL interface including:
  • writing rules of inference in CHR;
  • integrating syntax and semantics;
  • inferring new knowledge from existing knowledge.
14 Inductive Logic Programming as a machine learning technique including:
  • forming the problem description;
  • refining hypotheses;
  • a depth-first, depth-limited prover;
  • a generate-and-test search for ILP solutions to learning problems;
  • limitations of a simple approach and some solutions.
15 Writing meta-circular interpreters in Prolog including:
  • writing simple meta-interpreters;
  • taking control of the Prolog stack to change scheduling of search.
16 The theory behind logic programming including:
  • revision of predicate logic;
  • how formulae in the predicate calculus are transformed into clauses in conjunctive normal form;
  • resolution as a method of inference;
  • how Prolog uses a restricted form of clauses called horn clauses;
  • brief description of how LP can differ from Prolog.
17 Beyond Prolog: Constraint Logic Programming 1 introducing:
  • idea of constraints and constraint satisfaction;
  • programming with constraints over several domains;
  • programming in CLP(R);
  • applications of CLPs.
18 Beyond Prolog: Constraint Logic Programming 2 including:
  • "generate and test" as a problem solving approach in Prolog;
  • introduction to programming with CLP(FD);
  • using constraints to solve a puzzle;
  • applications of CLP(FD).
19 Beyond Prolog: Concurrent Logic Programming 1 including:
  • parallel and concurrent processing and programming;
  • synchronization through shared variables;
  • don't care non-determinism.
20 Beyond Prolog: Concurrent Logic Programming 2 including programming in FCP(|):
  • using the logic variable as a communication channel;
  • using the logic variable to synchronize processes;
  • the necessity for mutual exclusion;
  • the stream parallelism model.