public object Visit(CogniPy.CNL.DL.Equivalence e) { StringBuilder sb = new StringBuilder(); if (e.Equivalents.Count == 2) { sb.Append(e.Equivalents[0].accept(this)); sb.Append("≡"); sb.Append(Modality(e.modality)); sb.Append(e.Equivalents[1].accept(this)); } else { sb.Append("≡"); sb.Append(Modality(e.modality)); sb.Append("("); bool first = true; foreach (var x in e.Equivalents) { if (first) { first = false; } else { sb.Append(","); } sb.Append(x.accept(this)); } sb.Append(")"); } return(sb.ToString()); }
public virtual object Visit(CogniPy.CNL.DL.Equivalence e) { for (int i = 0; i < e.Equivalents.Count; i++) { e.Equivalents[i].accept(this); } return(e); }