private static OperationNode resolve(ChildNode left, ChildNode right) {
        if (! (left.child instanceof OperationNode) && ! (right.child instanceof OperationNode))
            return new OperationNode(left.child, right.op, right.child);

        // Collapse inserted ArithmeticNodes
        List<Operator> joinedOps = new ArrayList<>();
        joinOps(left, joinedOps);
        joinedOps.add(right.op);
        joinOps(right, joinedOps);
        List<ExpressionNode> joinedChildren = new ArrayList<>();
        joinChildren(left, joinedChildren);
        joinChildren(right, joinedChildren);
        return new OperationNode(joinedChildren, joinedOps);
    }
Transforms
       a &amp;&amp; b into if(a, b, false)
and
       a || b into if(a, true, b)
to avoid computing b if a is false and true respectively.

This may increase performance since boolean expressions are not short-circuited.

@author bratseth
config-model/src/main/java/com/yahoo/schema/expressiontransforms/BooleanExpressionTransformer.java