Ejemplo n.º 1
0
        public override IExpression?Simplify()
        {
            var newChild = Child?.Simplify();

            if (newChild is ConstantExpression childConst)
            {
                // child is constant
                return(new ConstantExpression(BooleanFunctions.Not(childConst.Value)));
            }
            return(new NegateExpression(newChild));
        }
Ejemplo n.º 2
0
 protected override Number Evaluate(Number number)
 {
     return(BooleanFunctions.Not(number));
 }