Ejemplo n.º 1
0
        public override Formula Negate(bool keepAND)
        {
            CompoundFormula cfNegate = new ParametrizedFormula(this);

            foreach (Formula fOperand in Operands)
            {
                cfNegate.AddOperand(fOperand.Negate(keepAND));
            }
            return(cfNegate);
        }
Ejemplo n.º 2
0
        public override Formula PartiallyGround(Dictionary <string, Constant> dBindings)
        {
            ParametrizedFormula cfGrounded = new ParametrizedFormula(this);

            foreach (Formula fSub in Operands)
            {
                Formula fGrounded = fSub.PartiallyGround(dBindings);
                cfGrounded.AddOperand(fGrounded);
            }
            return(cfGrounded);
        }
Ejemplo n.º 3
0
        public override Formula Simplify()
        {
            if (Simplified)
            {
                return(this);
            }
            ParametrizedFormula pf = new ParametrizedFormula(this);

            foreach (Formula f in Operands)
            {
                pf.AddOperand(f.Simplify());
            }
            return(pf);
        }
Ejemplo n.º 4
0
 public ParametrizedFormula(ParametrizedFormula cf)
     : this(cf.Operator)
 {
     Parameters = new Dictionary <string, string>(cf.Parameters);
 }