Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            PredicateFormula fOther = null;

            if (obj is CompoundFormula)
            {
                Formula fSimplify = ((CompoundFormula)obj).Simplify();
                if (fSimplify is PredicateFormula)
                {
                    fOther = (PredicateFormula)fSimplify;
                }
                else
                {
                    return(false);//might not be accurate - could be not
                }
            }
            else if (obj is PredicateFormula)
            {
                fOther = (PredicateFormula)obj;
            }
            else
            {
                return(false);
            }
            return(Predicate.Equals(fOther.Predicate));
        }
Exemplo n.º 2
0
        public override Formula GenerateGiven(string sTag, List <string> lAlwaysKnown)
        {
            if (lAlwaysKnown.Contains(Predicate.Name))
            {
                return(this);
            }
            PredicateFormula pfGiven = new PredicateFormula(Predicate.GenerateKnowGiven(sTag));

            return(pfGiven);
        }
Exemplo n.º 3
0
        public override Formula Clone()
        {
            PredicateFormula f = new PredicateFormula(Predicate.Clone());

            return(f);
        }