public override AbstractFormulaNode Simplify() { var child = Child.Simplify(); Child = child; if (!(Child is AbstractErrorNode)) { return(new AbstractTypeNode(ParentFormula, new Types(VarType.Bool))); } return(this); }
public override AbstractFormulaNode Simplify() { var child = Child.Simplify(); Child = child; if (Child is AbstractTypeNode) { Types tp = ((AbstractTypeNode)Child).Type; if (tp.AllNumeric()) { return(new AbstractTypeNode(ParentFormula, tp)); } } return(this); }
public override AbstractFormulaNode Simplify() { var child = Child.Simplify(); Child = child; if (Child is AbstractTypeNode) { Types tp = ((AbstractTypeNode)Child).Type; if (tp.OnlyHasType(VarType.Bool)) { return(new AbstractTypeNode(ParentFormula, tp)); } } return(this); }
public override AbstractFormulaNode Simplify() { var child = Child.Simplify(); Child = child; if (Child is AbstractTypeNode) { AbstractTypeNode typeNode = (AbstractTypeNode)Child; if (typeNode.Type.OnlyHasType(VarType.TypeError) || typeNode.Type.AllNumeric()) { return(typeNode); } return(new AbstractTypeNode(ParentFormula, new Types(VarType.Int))); } return(this); }
public AbstractPosNode(AbstractFormula formula, AbstractFormulaNode child) : base(formula) { Child = child; }
public AbstractOrNode(AbstractFormula formula, AbstractFormulaNode child1, AbstractFormulaNode child2) : base(formula) { Children = new Tuple <AbstractFormulaNode, AbstractFormulaNode>(child1, child2); }
public AbstractIsnaFuncNode(AbstractFormula formula, AbstractFormulaNode child) : base(formula) { Child = child; }
public AbstractIfFuncNode(AbstractFormula formula, AbstractFormulaNode child1, AbstractFormulaNode child2, AbstractFormulaNode child3) : base(formula) { Children = new Tuple <AbstractFormulaNode, AbstractFormulaNode, AbstractFormulaNode>(child1, child2, child3); }