private Clause SaIfRequired(Clause othClause) { // If performing resolution with self // then need to standardize apart in // order to work correctly. if (this.IsStandardizedApartCheckRequired() || this == othClause) { var mVariables = _variableCollector.CollectAllVariables(this); var oVariables = _variableCollector.CollectAllVariables(othClause); var cVariables = new HashSet <Variable>(); cVariables.UnionWith(mVariables); cVariables.UnionWith(oVariables); if (cVariables.Count < (mVariables.Count + oVariables.Count)) { othClause = _standardizeApart.GetStandardizeApartResult(othClause, _saIndexical); } } return(othClause); }
public ISet <Variable> CollectAllVariables(ISentence aSentence) { return(variableCollector.CollectAllVariables(aSentence)); }