Reengineering unification and t-entailment for Mantra in C++