public AssertFormula(AssertFormula another) { Atom refAtom = null; ForAll refForall = null; Implies refImplies = null; Equivalent refEquivalent = null; try { if (another.Atom != null) { refAtom = (Atom)another.Atom.Clone(); } if (another.Equivalent != null) { refEquivalent = (Equivalent)another.Equivalent.Clone(); } if (another.Implies != null) { refImplies = (Implies)another.Implies.Clone(); } if (another.InnerForAll != null) { refForall = (ForAll)another.InnerForAll.Clone(); } } catch (Exception e) { e.ToString(); } atom = refAtom; imp = refImplies; forall = refForall; eq = refEquivalent; }
public int AddFormula(AssertFormula item) { return formula.Add(item); }
public override bool Equals(object o) { if (o == null || GetType() != o.GetType()) { return false; } AssertFormula other = new AssertFormula((AssertFormula)o); if (this.Atom != null) { if (!this.Atom.Equals(other.Atom)) { return false; } } if (this.InnerForAll != null) { if (!this.InnerForAll.Equals(other.InnerForAll)) { return false; } } if (this.Implies != null) { if (!this.Implies.Equals(other.Implies)) { return false; } } if (this.Equivalent != null) { if (!this.Equivalent.Equals(other.Equivalent)) { return false; } } return true; }
public int CompareTo(object o) { AssertFormula another = new AssertFormula((AssertFormula)o); if (another.Atom != null && Atom != null) { return atom.CompareTo(another.Atom); } return 0; }