pretty-print substitutions, and compare terms;
removed redundant datalog/logic.mli file (since datalog.mli subsumes it)