161162163164165166167168169170171
// bug: occNb not accurate when adding artif. '[]' head V.unify(new PseudoVar(s), trail); } } Clause NewC = (Clause) numberVars(); trail.unwind(0); return NewC; } /** * Extracts the body of a clause
146147148149150151152153154155156
*/ synchronized public boolean matches(Term that) { Trail trail = new Trail(); boolean ok = unify(that, trail); trail.unwind(0); return ok; } /** * Returns a copy of the result if the unification of this and that. Side
165166167168169170171172173174175
// if(ok) that=that.copy(); if (ok) { that = copy(); } trail.unwind(0); return ok ? that : null; } /** * Replaces variables with uppercase constants named `V1', 'V2', etc. to be