public bool Visit(Variable lhsVariable) { if (lhsVariable.ConcreteValue == null) { lhsVariable.BoundTo = rhsValue; boundVariables.Add(lhsVariable); return(true); } return(rhsValue.Accept(new LhsConcreteValueUnifier(lhsVariable.ConcreteValue, boundVariables))); }
public bool Visit(Variable rhsVariable) { if (rhsVariable.BoundTo == null) { rhsVariable.BoundTo = lhsConcreteValue; boundVariables.Add(rhsVariable); return(true); } if (rhsVariable.ConcreteValue == null) { throw new Exception(); } return(lhsConcreteValue.Accept(new Unifier(rhsVariable.ConcreteValue, boundVariables))); }