public IPCExpression ReplaceVariables(SubstitutionSet s) { if (s.IsBound(this)) { return(s.GetBinding(this).ReplaceVariables(s)); } else { return(this); } }
public SubstitutionSet Unify(IUnifiable p, SubstitutionSet s) { if (this == p) { return(s); } if (s.IsBound(this)) { return(s.GetBinding(this).Unify(p, s)); } SubstitutionSet sNew = new SubstitutionSet(s); sNew.Add(p, this); return(sNew); }