Here is the Library:
prolog.h
history.html
And here are some sample clients:
analysis.cc
example1.cc
family.cc
lazy.cc