This is the first of two columns on logic programming. It gives an introduction
to the subject and develops a query evaluator in
Mathematica. This
query evaluator is an interpreter for a subset of the programming language
Prolog. A prerequisite for it is
unification, which is a generalization
of the pattern matching that underlies Mathematica's own evaluator.