@Override
    public ExpressionNode transform(ExpressionNode node, TransformContext context) {
        if (node instanceof CompositeNode)
            node = transformChildren((CompositeNode) node, context); // depth first
        if (node instanceof IfNode)
            node = transformIf((IfNode) node);
        if (node instanceof EmbracedNode e && hasSingleUndividableChild(e))
            node = e.children().get(0);
        if (node instanceof OperationNode)
            node = transformArithmetic((OperationNode) node);
        if (node instanceof NegativeNode)
            node = transformNegativeNode((NegativeNode) node);
        return node;
    }
Performs simple algebraic simplification of expressions

@author bratseth
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/transform/Simplifier.java