public virtual Object visitBinarySentence(BinarySentence bs, Object arg)
{
List<Sentence> s = new List<Sentence>();
if (arg is List<Symbol>)
{
List<Symbol> symbols = ((List<Symbol>)arg);
foreach (Symbol symbol in symbols)
{
s.Add((Sentence)symbol);
}
}
else
{
throw new ArgumentException("Could not cast arg to List<Sentence>");
}
List<Sentence> termunion = SetOps.union((List<Sentence>)bs.getFirst().accept(this, arg),
(List<Sentence>)bs.getSecond().accept(this, arg));
return SetOps.union(s, termunion);
}