Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 public int AddFormula(AssertFormula item)
 {
     return formula.Add(item);
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        public int CompareTo(object o)
        {
            AssertFormula another = new AssertFormula((AssertFormula)o);

            if (another.Atom != null && Atom != null)
            {
                return atom.CompareTo(another.Atom);
            }

            return 0;
        }