private ExpressionNode transformBooleanArithmetics(OperationNode node, TransformContext context) {
        Iterator<ExpressionNode> child = node.children().iterator();

        // Transform in precedence order:
        Deque<ChildNode> stack = new ArrayDeque<>();
        stack.push(new ChildNode(null, child.next()));
        for (Iterator<Operator> it = node.operators().iterator(); it.hasNext() && child.hasNext();) {
            Operator op = it.next();
            if ( ! stack.isEmpty()) {
                while (stack.size() > 1 && ! op.hasPrecedenceOver(stack.peek().op)) {
                    popStack(stack, context);
                }
            }
            stack.push(new ChildNode(op, child.next()));
        }
        while (stack.size() > 1)
            popStack(stack, context);
        return stack.getFirst().child;
    }
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