Ejemplo n.º 1
0
        public ForAllFormula(ForAllFormula 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;
        }
Ejemplo n.º 2
0
        public ForAll(ForAll another)
        {
            Oid refOid = null;
            ForAllFormula refForallformula = null;
            declare = new ArrayList();

            try
            {
                if (another.Oid != null)
                {
                    refOid = (Oid)another.Oid.Clone();
                }

                if (another.Formula != null)
                {
                    refForallformula = (ForAllFormula)another.Formula.Clone();
                }

                if (another.Declare != null)
                {
                    Declare[] items = (Declare[])another.Declare.Clone();
                    declare.Clear();
                    foreach (Declare item in items)
                    {
                        declare.Add(new Declare(item));
                    }
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            oid = refOid;
            formula = refForallformula;
        }
Ejemplo n.º 3
0
        public override bool Equals(object o)
        {
            if (o == null || GetType() != o.GetType())
            {
                return false;
            }

            ForAllFormula other = new ForAllFormula((ForAllFormula)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;
        }